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