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.
For some reason I can't find this info anywhere. So I'm working on my first pipeline and I want to have it call a .sh script. Where should I store the .sh script for the pipeline below to be able to call it?
pipelines:
branches: #anytime a branch push is performed
prod_/*: #any branch with a prod_ prefix
- step:
script:
- /bin/bash increment_version.sh
Hello @Michael Pietrefesa ,
Thank you for reaching out to Atlassian Community.
Just to give you a background, every step in a Pipeline runs within a docker container, and the repository where the pipeline is running is always cloned into that container.
That said, you can store your script files anywhere within your repository, and reference it on your build step as you would normally do using shell.
Allow me to share some examples:
pipelines:
branches:
master:
- step:
script:
- /bin/bash my_script.sh
pipelines:
branches:
master:
- step:
script:
- /bin/bash my_folder/my_script.sh
Hope that helps. Let me know in case you have any question.
Thanks @Michael Pietrefesa !
Kind regards,
Patrik S.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.