You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
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?
Hi @locky ,
good question, thank you!
aws-s3-deploy pipe provides default variables for AWS credentials:
You just needed to setup Repository variables
Some details provided in the variables section of the README:
AWS_ACCESS_KEY_ID (**)
AWS_SECRET_ACCESS_KEY (**)
AWS_DEFAULT_REGION (**)
(**) = required variable. If this variable is configured as a repository, account or environment variable, it doesn’t need to be declared in the pipe as it will be taken from the context. It can still be overridden when using the pipe.
Other variables should be provided.
so your pipe simplified:
- step:
name: Deploy to S3
deployment: staging
script:
- pipe: atlassian/aws-s3-deploy:0.2.4
variables:
S3_BUCKET: 'xxx-xxx-staging'
ACL: 'public-read' LOCAL_PATH: 'build'
DELETE_FLAG: 'true'
Cheers,
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.