From a3db4925057e3793a59174ec4590888421653d23 Mon Sep 17 00:00:00 2001 From: Eduard Frankford <e.frankford@student.uibk.ac.at> Date: Tue, 28 Jun 2022 17:22:04 +0200 Subject: [PATCH] testing --- .gitlab-ci.yml | 42 ++++++++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 84c4f14e1..3a09a3e66 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -124,29 +124,31 @@ docker-push: REGISTRY_URL: sharing-codeability.uibk.ac.at:5051 IMAGE_TAG: sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform script: + - shopt -s dotglob + - rm -r /builds/sharing/codeability-sharing-platform/target/* - ./mvnw package -Pprod verify -DskipTests jib:build -Djib.to.image=$IMAGE_TAG -Djib.to.auth.username=gitlab-ci-token -Djib.to.auth.password=$CI_BUILD_TOKEN -Dmaven.repo.local=$MAVEN_USER_HOME when: on_success -deploy: - stage: deploy - cache: [] - # only: - # refs: - # - development - dependencies: - - docker-push - - maven-test - - frontend-test - before_script: - - mkdir -p ~/.ssh - - echo "${SSH_BKY_DEPLOY}" > ~/.ssh/id_rsa - - chmod 700 ~/.ssh/id_rsa - - eval "$(ssh-agent -s)" - - ssh-add ~/.ssh/id_rsa - - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - script: - - ssh contDeploy@codeability-austria -p 1022 "cd /home/michael/gitsearch && git pull && cd src/main/docker/ && docker pull sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform && GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` COMMIT_ID=`git rev-parse HEAD` SPRING_PROFILES_ACTIVE=staging,swagger docker-compose -f gitsearch.yml up -d --no-deps --build --force-recreate gitsearch-app && exit" - when: on_success +# deploy: +# stage: deploy +# cache: [] +# # only: +# # refs: +# # - development +# dependencies: +# - docker-push +# - maven-test +# - frontend-test +# before_script: +# - mkdir -p ~/.ssh +# - echo "${SSH_BKY_DEPLOY}" > ~/.ssh/id_rsa +# - chmod 700 ~/.ssh/id_rsa +# - eval "$(ssh-agent -s)" +# - ssh-add ~/.ssh/id_rsa +# - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config +# script: +# - ssh contDeploy@codeability-austria -p 1022 "cd /home/michael/gitsearch && git pull && cd src/main/docker/ && docker pull sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform && GIT_BRANCH=`git rev-parse --abbrev-ref HEAD` COMMIT_ID=`git rev-parse HEAD` SPRING_PROFILES_ACTIVE=staging,swagger docker-compose -f gitsearch.yml up -d --no-deps --build --force-recreate gitsearch-app && exit" +# when: on_success e2e-test: stage: e2e -- GitLab