I have multiple steps that should be run on different conditions, and every step should run on the same deployment, so instead of using the inbuild condition which the bitbucket pipeline provided I've started checking within the scripts
- step: &DeployUI
oidc: true
size: 2x
name: Deploy UI
caches:
- node
script:
- |
if git diff-tree --no-commit-id --name-only -r HEAD | grep -q "src" || git diff-tree --no-commit-id --name-only -r HEAD | grep -q "public"; then
npm install
CI=false npm run build
pipe: atlassian/aws-s3-deploy:1.2.0
variables:
AWS_DEFAULT_REGION: $REGION
AWS_OIDC_ROLE_ARN: "arn:aws:iam::$ACC_ID:role/Admin"
S3_BUCKET: $content_bucket
LOCAL_PATH: "build"
pipe: atlassian/aws-cloudfront-invalidate:0.7.0
variables:
AWS_DEFAULT_REGION: $REGION
AWS_OIDC_ROLE_ARN: "arn:aws:iam::$ACC_ID:role/Admin"
DISTRIBUTION_ID: $cloudfront_dist_id
but its not identifying this pipe what should I do