We can allow an INVALIDATE_CACHE repository variable to be set to 'yes' or 'no' to
- pipe: atlassian/aws-cloudfront-invalidate:0.4.1
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
DISTRIBUTION_ID: '123xyz'
manually change it from repo settings.
This would allow conditional execution efficiently in the package.
atlassian/aws-cli image doesn't have all the options from atlassian/default-image (e.g. ssh) so the only solution currently would be to manually install the aws-cli in our script and use it.