Files
rheinsw/.gitlab-ci.yml
Thatsaphorn Atchariyaphap e77fe53b15 Update CI configurations to use Node 22 Docker image
- Replaced alpine/git v2.47.2 image with node:22 image for the sync_branches job.
- Added node:22 image to the frontend_build_job for consistency in builds.
- This ensures compatibility with Node.js-based tasks and streamlines CI setup.
2025-04-27 22:46:06 +02:00

41 lines
1.0 KiB
YAML

image: docker:20.10@sha256:2967f0819c84dd589ed0a023b9d25dcfe7a3c123d5bf784ffbb77edf55335f0c
include:
- local: 'backend/.gitlab-ci.yml'
- local: 'frontend/.gitlab-ci.yml'
stages:
- backend_build
- frontend_build
- deploy
- sync
sync_branches:
stage: sync
image: node:22@sha256:f6b9c31ace05502dd98ef777aaa20464362435dcc5e312b0e213121dcf7d8b95
rules:
- if: '$CI_COMMIT_BRANCH == "production"'
before_script:
- git config --global user.email "gitlab-ci@rhein-software.dev"
- git config --global user.name "GitLab CI"
script:
- git remote set-url origin "https://oauth2:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git"
- git checkout dev
- git pull origin dev
- git merge --no-ff origin/production
- git push origin dev
deploy_dev:
stage: deploy
rules:
- if: '$CI_COMMIT_BRANCH == "dev"'
script:
- echo "Deploying DEV environment"
deploy_production:
stage: deploy
rules:
- if: '$CI_COMMIT_BRANCH == "production"'
script:
- echo "Deploying PROD environment"