I have a pipe which pushes to Amazon ECR. The repository is immutable. Can I configure the plugin, so that the pipeline skips pushing the image, if it already exists in ECR?
Hi @Tom Müller
Welcome to the community.
Unfortunately, it's not possible to skip the entire build for validating if an ECR image exists.
However, I do believe it would be possible if you could validate if an ECR image exists first then do a signal through an environment variable and lastly, do an if/else against the result.
Here's an example YAML configuration:
pipelines: default: - step: name: Test script: - export ECR_PUSH=0 - echo "Validation here" # Validate if an ECR exists here then change the ECR_PUSH to 1 if it exists - if [ $ECR_PUSH = 1 ]; then echo "Proceed"; else exit 0; fi - pipe: some/pipes_here:1.0.1 variables: VAR_TEST: "TEST"
Hope it helps and let me know if you have further questions that I can help with.
Regards,
Mark C
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.