Reference implementation of the Cache Service to be used in the Results Cache Plugin.
GET /job-results/v2/{hash}
: Returns a JSON with the cached result and build number from its job hash. Returns 'NOT_BUILT' and '-1' respectively, if the job hash is not found.POST /job-results/v2/{hash}
: Adds a new result, and related build number, in the cache for the provided job hash.- Body:
- Content-type: application/json
- Example:
{"result": "SUCCESS", "build": 10}
- Body:
DELETE /job-results/clear
: Removes all the cache values.
GET /job-results/{hash}
: Returns a cached result from its job hash. Returns 'NOT_BUILT' if the job hash is not found.POST /job-results/{hash}/{result}
: Adds a new result in the cache for the provided job hash.
1.1.0 - Every cached result now also contains build number.
- Every cached result now also contains build number.
- Deprecated version 1 operations.
- Basic implementation of the API using EHCache and SpringBoot.
./gradlew bootJar
- using gradle:
./gradlew bootRun
- using built jar file:
java -jar ./build/libs/results-cache-service-<release>.jar