I have quite a few repeated steps in multiple branches where only one or two variables are different:
- step:
name: Deploy to S3
deployment: staging <- Different
script:
- pipe: atlassian/aws-s3-deploy:0.2.4
variables:
AWS_ACCESS_KEY_ID: $AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY: $AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION: 'ap-southeast-2'
S3_BUCKET: 'xxx-xxx-staging' <- Different
ACL: 'public-read' LOCAL_PATH: 'build'
DELETE_FLAG: 'true'
Can I define that step as a definition with 2 variables passed as params?