Team,
In Azure Devops yaml pipeline, where Im connecting to a server using ssh and running a curl command to look for an image presence in registry,
It works fine and gives back the result, but I want to fail the job if the curl command couldn't find the specific image.
Curl -s -X GET "https://registry/api/v2.0/Projects/test/repositories/repository%2Ftest-module/artifacts/1.0.0/tags?page=1&page_size=10&with_signature=false&with_immutable_status=false" -H "accept: application/json"
Image is available in the registry - The job succeeds with the artifactid, tag output
Image not available in the registry - Still the job succeeds with the output Errors code not found ..,
Basically, I need help to fail the job if no image in repository