Condition is the 'when' you want to update
The "condition" stage test based on a third "resource" like a file, an api, etc…, if we can proceed the pipeline or if we must abort.
Define the resource type used for the
Small description used in message, reports, etc.
Define resource parameters, cfr to appropriated documentation
# Source return v1.0.0 conditions: docker: name: "Docker Image Published on Registry" kind: dockerImage spec: image: "jenkinsciinfra/plugin-site-api" # stop here because the condition doesn't pass
In this example, we use the dockerImage condition. According to its documentation, we are checking if the docker image 'jenkinsciinfra/plugin-site-api' with the tag 'v1.0.0' (returned from the source) exist on DockerHub. it’s not the case so it stop the pipeline here