Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Override/Add S3_BUCKET variable via anchors

I have multiple buckets defined which are targeted based on the branch I'm using. I have defined an anchored step like so:

- step: &bucket-upload
name: Upload to S3
deployment: test
script:
- pipe: atlassian/aws-s3-deploy:0.4.0
variables:
AWS_ACCESS_KEY_ID: $AWS_DEV_ACCESS_KEY
AWS_SECRET_ACCESS_KEY: $AWS_DEV_SECRET
AWS_DEFAULT_REGION: $AWS_DEFAULT_REGION
S3_BUCKET: 'one-of-the-buckets'
LOCAL_PATH: 'client/dist/client'
ACL: 'public-read'
DELETE_FLAG: 'true'

Is there any non-hack way to override the variable  when defining the pipeline? I've tried before and nothing happens, even tried ommiting the variable completely.

e.g.

pipelines:
branches:
develop:
- step:
<<: *bucket-upload
deployment: test
S3_BUCKET: 'dev-bucket'
master:
- step:
<<: *bucket-upload
deployment: prod
S3_BUCKET: 'master-bucket'

 

1 answer

@Nenad Domuz -  I have same concern. I want to reuse codedeploy pipe and override the DEPLOYMENT_GROUP variable.

 master:
- step: *build
- step:
<<: *deploy
name: Deploy to Prod
deployment: production
trigger: manual
script:
variables:
DEPLOYMENT_GROUP: 'production-deployment-group'

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

481 views 16 17
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you