From 9cb7c71688373f20920029ce8182621ffc73a75e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Minelli?= <michael@minelli.me> Date: Mon, 10 Jul 2023 16:52:59 +0200 Subject: [PATCH] CI/CD => Adapt to SSH CI/CD --- .gitlab-ci.yml | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 68115f4..eca9aaf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,30 +5,18 @@ deploy: image: docker:latest stage: deploy tags: - - deployment + - dojo_backend_deployment variables: GIT_SUBMODULE_STRATEGY: recursive GIT_SUBMODULE_FORCE_HTTPS: "true" SECURE_FILES_DOWNLOAD_PATH: './' script: - # Install dependencies - - apk update - - apk add openssh-client - - apk add curl - - apk add bash # Download secure files - curl --silent "https://gitlab.com/gitlab-org/incubation-engineering/mobile-devops/download-secure-files/-/raw/main/installer" | bash # Prepare environment - mv env .env - cp .env API/.env - # Add SSH informations - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - mv known_hosts ~/.ssh/known_hosts - - chmod 600 DojoDeploy - - eval `ssh-agent -s` - - ssh-add -k DojoDeploy # Deploy - - DOCKER_HOST="ssh://${SSH_USER}@${SSH_HOST}" ./infra --run + - ./infra --run only: - main \ No newline at end of file -- GitLab