Skip to content
Snippets Groups Projects
Commit 9cb7c716 authored by michael.minelli's avatar michael.minelli
Browse files

CI/CD => Adapt to SSH CI/CD

parent 2faa1b13
Branches
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment