Hi Team,
I am working on a gitlab pipeline, basically my pipeline will execute when a merge request is approved so it becomes a branch pipeline here, so i need to fetch the new/changed bash script from the gitlab which will be pushed to the main and use it in the pipeline, as i am passing the script as a payload to my python script which is in another repo.,so the question is : how can i fetch those newly commited/changed script in my pipeline after the merge request approval. currently i am doing as:
stage: python script download
image: gitscm/git
variables:
GIT_STRATEGY: fetch
before_script:
- chmod 766 /builds/example/*.sh
- export
- cd $CI_PROJECT_DIR
- yum install -y git
- git --version
- git clone
- yum install -y python39 && rm -rf /var/cache/yum
- python3 --version
script:
- python3 .main.py .sh
only:
refs:
- CI_MERGE_REQUEST_APPROVED == true
- main
changes:
- ".sh"
- “.py”
allow_failure: false
Currently it does not fetch the scripts which are approved by merge request, i am stuck in this badly, any ideas or suggestions are most welcome, thank u in advance