Use Node image and streamline Git configuration steps
This commit is contained in:
@@ -100,16 +100,15 @@ deploy:
|
|||||||
|
|
||||||
sync_branches:
|
sync_branches:
|
||||||
stage: sync
|
stage: sync
|
||||||
image: alpine/git:latest
|
image: node:20 # <-- reuse existing node image
|
||||||
rules:
|
rules:
|
||||||
- if: '$CI_COMMIT_BRANCH == "production"'
|
- if: '$CI_COMMIT_BRANCH == "production"'
|
||||||
|
before_script:
|
||||||
|
- git config --global user.email "gitlab-ci@rheinsw.com"
|
||||||
|
- git config --global user.name "GitLab CI"
|
||||||
script:
|
script:
|
||||||
- |
|
- git remote set-url origin "https://oauth2:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
|
||||||
git config --global user.email "gitlab-ci@rheinsw.com"
|
- git checkout dev
|
||||||
git config --global user.name "RheinSW GitLab CI"
|
- git pull origin dev
|
||||||
git remote set-url origin "https://oauth2:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
|
- git merge --no-ff origin/production
|
||||||
|
- git push origin dev
|
||||||
git checkout dev
|
|
||||||
git pull origin dev
|
|
||||||
git merge --no-ff origin/production
|
|
||||||
git push origin dev
|
|
||||||
|
|||||||
Reference in New Issue
Block a user