From 8c3fdbe518e498eca42da92adab790666a8ddf27 Mon Sep 17 00:00:00 2001 From: Daya Adianto <dayaadianto@cs.ui.ac.id> Date: Mon, 13 Nov 2023 18:03:54 +0700 Subject: [PATCH] Add debug calls in the CI shell script --- .gitlab-ci.yml | 19 +++++++++---------- .gitlab/ci/deploy-template.gitlab-ci.yml | 2 ++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ae349d1..77d7235a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -16,7 +16,6 @@ include: - template: Jobs/Dependency-Scanning.latest.gitlab-ci.yml - template: Workflows/MergeRequest-Pipelines.gitlab-ci.yml - local: .gitlab/ci/deploy-template.gitlab-ci.yml - - local: .gitlab/ci/deploy-parallel-matrix.gitlab-ci.yml stages: - build @@ -86,18 +85,18 @@ deploy: DOKKU_APP_NAME: spring-petclinic-rest DOKKU_SSH_REMOTE: "ssh://dokku@dokku-ppl.cs.ui.ac.id:22" DOKKU_SSH_PRIVATE_KEY: $PRODUCTION_SSH_PRIVATE_KEY - script: > - dokku network:exists "${APP_NAME}-network" || dokku network:create "${APP_NAME}-network" - dokku postgres:exists "${APP_NAME}-database" || dokku postgres:create "${APP_NAME}-database" \ + script: + - dokku network:exists "${APP_NAME}-network" || dokku network:create "${APP_NAME}-network" + - dokku postgres:exists "${APP_NAME}-database" || dokku postgres:create "${APP_NAME}-database" \ --image docker.io/library/postgres \ --image-version 16.0-alpine \ --post-create-network "${APP_NAME}-network" - dokku apps:exists "$APP_NAME" || dokku apps:create "$APP_NAME" - dokku network:set "$APP_NAME" attach-post-create "${APP_NAME}-network" - dokku postgres:link "${APP_NAME}-database" "$APP_NAME" - dokku config:set "$APP_NAME" SPRING_PROFILES_ACTIVE="default,csui" - dokku-deploy - sh .gitlab/bin/dokku-ci-post-deploy.sh + - dokku apps:exists "$APP_NAME" || dokku apps:create "$APP_NAME" + - dokku network:set "$APP_NAME" attach-post-create "${APP_NAME}-network" + - dokku postgres:link "${APP_NAME}-database" "$APP_NAME" + - dokku config:set "$APP_NAME" SPRING_PROFILES_ACTIVE="default,csui" + - dokku-deploy + - sh .gitlab/bin/dokku-ci-post-deploy.sh needs: [] environment: name: production diff --git a/.gitlab/ci/deploy-template.gitlab-ci.yml b/.gitlab/ci/deploy-template.gitlab-ci.yml index b03669fc..1d8a5664 100644 --- a/.gitlab/ci/deploy-template.gitlab-ci.yml +++ b/.gitlab/ci/deploy-template.gitlab-ci.yml @@ -11,4 +11,6 @@ before_script: - chmod +x .gitlab/bin/dokku.sh - cp .gitlab/bin/dokku.sh /bin/dokku + - echo "[debug] APP_NAME: $APP_NAME" + - echo "[debug] SSH_REMOTE: $SSH_REMOTE" dependencies: [] -- GitLab