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
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.
My pipeline script is able to successfully build and an Artifact is available for download in the artifact section. however, I want to move the artifact to a folder in the same branch as a pipeline script. How do I do that?
Hello @vivek.gopalakrishnan and welcome to the community!
My understanding is that you would like to push the artifact back to your repository during your pipeline build. It's possible to push changes back to the repository by committing the changes and doing a git push :
name: Build React application
- npm rebuild node-sass
- npm run build-react
- npm run build-cicd
- export ARTIFACT_NAME=example-$(date +%Y-%m-%d-%H%M%S).tar.gz
- ls $ARTIFACT_NAME
- tar -xzvf $ARTIFACT_NAME -C artifacts-dev/
- git add $ARTIFACT_NAME # adding the artifact to the staging area
- git commit -m "[skip ci] saving artifact to the repository"
- git push
The [skip ci] flag in the commit message is for this push to not trigger a new build, otherwise, the builds could enter a loop state. It's important to note that pushing artifacts directly to the repository is not a good practice, as this will start to inflate the repository size and you can reach the repository size limits of 4GB, which would put your repository in read-only mode.
If your goal is to store the artifacts for more than 14 days, you can either upload it to a third-party storage solution or upload it to the Downloads section of your repository by using the bitbucket cloud API endpoint below :
Files uploaded as a Download artifact are available by navigating to the repository and selecting the Downloads option in the left side panel.
Hope that helps! Let me know in case you have any questions.
Thank you, @vivek.gopalakrishnan !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.