mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Update .gitlab-ci.yml file
This commit is contained in:
+7
-10
@@ -118,18 +118,15 @@ deploy_production:
|
||||
seed_production:
|
||||
stage: seed
|
||||
rules:
|
||||
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "production"'
|
||||
needs:
|
||||
- job: deploy_production
|
||||
artifacts: false
|
||||
when: manual
|
||||
allow_failure: false
|
||||
- if: '$CI_COMMIT_BRANCH == "production"'
|
||||
when: manual
|
||||
script: |
|
||||
set -e
|
||||
cd "$DEPLOY_DIR"
|
||||
test -f "$COMPOSE_FILE" || (echo "❌ $COMPOSE_FILE not found" && exit 1)
|
||||
cd /opt/deploy/lti-prod
|
||||
test -f .env || (echo "❌ .env not found" && exit 1)
|
||||
|
||||
docker compose -f "$COMPOSE_FILE" pull seed || true
|
||||
docker compose -f "$COMPOSE_FILE" run --rm seed
|
||||
echo "$CI_REGISTRY_PASSWORD" | docker login -u "$CI_REGISTRY_USER" --password-stdin "$CI_REGISTRY"
|
||||
|
||||
docker compose --env-file .env pull seed
|
||||
docker compose --env-file .env run --rm seed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user