Cachet Gate1.0.6Minimum Jenkins requirement: 2.62ID: cachet-gating
Version 1.0.6 (Feb 21, 2019)
Add missing Operational status to metrics. (#9)
Before the plugin may be used, you must configure the Cachet API URL in the Jenkins global configuration:
You can also specify the following snippet as a Groovy Hook Script
def cachetUrl = "https://status.example.com/api/v1/"
GlobalCachetConfiguration gcc = GlobalCachetConfiguration.get();
To gate jobs, in the job configuration check the box to confirm resource availability before building and then select the required resource from the list. Note that all selected resources must be available for the job to run.
Below is an example of a build that is blocked or gated:
Job setup using JJB
From jenkins-job-builder 2.10.2 you can setup your jobs using JJB. Here is an example snippet:
Job setup using Job DSL
You can also use the job dsl plugin to configure gating for your jobs. Here is an example snippet:
You can use the following snippet to gathering metrics once build has started after being gated: