Update 2 files
- /job-templates.tpl.yml - /scripts/render-pipelines-branch.sh
This commit is contained in:
@@ -26,3 +26,15 @@ render-job-templates-yml:
|
|||||||
- templates/**
|
- templates/**
|
||||||
- job-templates.yml
|
- job-templates.yml
|
||||||
- job-templates.tpl.yml
|
- job-templates.tpl.yml
|
||||||
|
|
||||||
|
render-pipelines-to-branch:
|
||||||
|
stage: render
|
||||||
|
image: "${CI_REGISTRY}/containerized-applications/ci-images/ci-scripts:1.0.2"
|
||||||
|
script:
|
||||||
|
- ./scripts/install-curl.sh
|
||||||
|
- ./scripts/install-git.sh
|
||||||
|
- ./scripts/install-yq.sh
|
||||||
|
- ./scripts/render-pipelines-branch.sh
|
||||||
|
- ./scripts/commit-and-push-changes.sh
|
||||||
|
rules:
|
||||||
|
- if: $CI_COMMIT_BRANCH =~ /^release*/
|
||||||
13
scripts/render-pipelines-branch.sh
Normal file
13
scripts/render-pipelines-branch.sh
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
#%%MULTILINE_YAML_START
|
||||||
|
#Replace main branch with current branch
|
||||||
|
|
||||||
|
for file in pipelines/*.yml
|
||||||
|
do
|
||||||
|
sed -i "s;ref: 'main';ref: '$CI_COMMIT_BRANCH';g" ./$file
|
||||||
|
done
|
||||||
|
|
||||||
|
for file in compliance/*.yml
|
||||||
|
do
|
||||||
|
sed -i "s;ref: 'main';ref: '$CI_COMMIT_BRANCH';g" ./$file
|
||||||
|
done
|
||||||
Reference in New Issue
Block a user