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 @[deleted] ,
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 @[deleted] !
Kind regards,
Patrik S.
Awesome, thanks Patrik!
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.