From 8a52ef5b54378c4ffc9eeb8b92005e4c29da7850 Mon Sep 17 00:00:00 2001 From: Levin Faber Date: Wed, 3 Jul 2019 06:29:32 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d5b1b3d..725db77 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,19 +2,19 @@ stages: - build_docker - build_frontend +before_script: +- eval $(ssh-agent -s) +- ssh-add <(echo "${DEPLOY_ENV_KEY}") +- mkdir -p ~/.ssh +- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config +- docker info +- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY build_frontend: stage: build_frontend tags: - docker image: registry.gitlab.com/fia72-dev/eva_lernsituation/frontend-build - before_script: - - eval $(ssh-agent -s) - - ssh-add <(echo "${DEPLOY_ENV_KEY}") - - mkdir -p ~/.ssh - - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config' - - cp -r Frontend/src/ /workdir/src/ - - cp -r Frontend/public/ /workdir/public/ script: - pwd - ls -la @@ -36,13 +36,6 @@ build_docker_host: stage: build_docker tags: - docker-builder - before_script: - - eval $(ssh-agent -s) - - ssh-add <(echo "${DEPLOY_ENV_KEY}") - - mkdir -p ~/.ssh - - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - - docker info - - docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY script: - docker build -f Docker/Dockerfile_FE_Host.dockerfile -t registry.gitlab.com/fia72-dev/eva_lernsituation/frontend-serve . - docker push registry.gitlab.com/fia72-dev/eva_lernsituation/frontend-serve