You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
In the first step in my pipeline, I am building my application with docker and deploying it to AWS ECR. However, in a follow up step, I would like to use those same build files I uploaded to AWS for a shell script. They need to be the same files I uploaded because each `npm run build` creates different hashed file names. How can I export the build folder from step 1 to use in future pipeline steps?
- step: &build-staging
name: Build and publish docker image
services:
- docker
caches:
- docker
script:
- docker build -t web . #/dist folder gets created and uploaded to AWS
- pipe: atlassian/aws-ecr-push-image:1.4.2
- step: &upload-source-maps-staging
name: Upload source maps
script:
- npm ci
- /bin/bash upload-source-maps.sh #I want to use the /dist folder created in the build-staging step above
Hi James and welcome to the community!
If the dist folder is created in the clone directory, then you can define it as an artifact so that its contents become available for the next step. You can do this the following way:
- step: &build-staging
name: Build and publish docker image
services:
- docker
caches:
- docker
script:
- docker build -t web . #/dist folder gets created and uploaded to AWS
- pipe: atlassian/aws-ecr-push-image:1.4.2
artifacts:
- dist/**
You can check the following documentation page for more info:
Keep in mind that the step that generates the artifact and the steps that use it cannot be parallel steps.
Please feel free to let me know how it goes and if you have any questions.
Kind regards,
Theodora
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.