The script.sh is in a particular branch and not in master, so how do I specify in the script identifier to locate the file in that branch.
build_job:
stage: build
script:
- ./project/config/script.sh > job.yml
The script.sh is in a particular branch and not in master, so how do I specify in the script identifier to locate the file in that branch.
build_job:
stage: build
script:
- ./project/config/script.sh > job.yml
If you want to swap branches during a pipeline job, then you will need to:
before_script using HTTPS or SSH method,script section, add the standard git commands, such as git checkout, to get to the correct branch,Just keep in mind that if you've checked out the branch it's on, the job is using that branch. So, if you want to run the script against the current branch or commit, you'll have to copy the file to a temporary location that the job can access, then switch to the current branch/commit again to run the script against.