Harness Built in Intelligence : Skip CI (for a commit id)
pending feedback
S
Scientific Silverfish
Need an ability in Harness to determine if for a given commit id CI was successful and that if an image already exist then skip the CI and proceed with the subsequent stages in the Pipeline
there is no real need for subsequent pipeline execution to run the CI stage again
Log In
N
Nofar Bluestein
pending feedback
N
Nofar Bluestein
Hey,
One option to achieve this use case could be to have a step running a script that makes an API call to your container registry, checks if an image with a specific tag exists, and stores the result in an output variable. you could use this as a first step in a CI stage , or in a stage that run before the CI stage, and skip subsequent steps/stage if the output variable indicates the image exists.
Would that work for you, in case you want to check for a condition based on an image tag existing in the registry.
There is an option on the 'push' trigger today:
Auto-abort Previous Execution
If a branch is updated, Harness will automatically cancel active builds for the same branch if invoked by the same Trigger.
Are you looking for something similar, that will auto-cancel new executions if an executions was already successful for the same commit ?
Thanks
Rohan Gupta
long-term