diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1897afaf4c32b244acce362a120d4da1f26236e..38580201a146e42af373f6a621d8bdcbe2c97293 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,11 +6,11 @@ cache: - .maven/ stages: # - lint - - build + # - build # - test # - analyze - - package - - release + # - package + # - release - deploy before_script: @@ -46,16 +46,16 @@ before_script: # paths: # - pmd.log -maven-compile: - stage: build - script: - - ./mvnw -ntp compile -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME - artifacts: - paths: - - target/classes/ - - target/generated-sources/ - expire_in: 10 days - needs: [] +# maven-compile: +# stage: build +# script: +# - ./mvnw -ntp compile -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME +# artifacts: +# paths: +# - target/classes/ +# - target/generated-sources/ +# expire_in: 10 days +# needs: [] # maven-test: # # DinD service is required for Testcontainers @@ -108,30 +108,30 @@ maven-compile: # # - ./mvnw -ntp org.jacoco:jacoco-maven-plugin:prepare-agent initialize sonar:sonar -Dsonar.organization=codeAbility -Dsonar.host.url=https://server.arctis.at/sonar/ -Dsonar.login=${SONAR_TOKEN} -Dmaven.repo.local=$MAVEN_USER_HOME # allow_failure: true -maven-package: - stage: package - script: - - ./mvnw -ntp verify -Pprod -DskipTests -Dmaven.repo.local=$MAVEN_USER_HOME +# maven-package: +# stage: package +# script: +# - ./mvnw -ntp verify -Pprod -DskipTests -Dmaven.repo.local=$MAVEN_USER_HOME # Uncomment the following line to use gitlabs container registry. You need to adapt the REGISTRY_URL in case you are not using gitlab.com -docker-push: - stage: release - # only: - # refs: - # - development - variables: - REGISTRY_URL: sharing-codeability.uibk.ac.at:5051 - IMAGE_TAG: sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform - script: - - ./mvnw -ntp verify -Pprod -DskipTests -Dmaven.repo.local=$MAVEN_USER_HOME - - ./mvnw -ntp jib:build -Pprod -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: always +# docker-push: +# stage: release +# only: +# refs: +# - development +# variables: +# REGISTRY_URL: sharing-codeability.uibk.ac.at:5051 +# IMAGE_TAG: sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform +# script: +# - ./mvnw -ntp verify -Pprod -DskipTests -Dmaven.repo.local=$MAVEN_USER_HOME +# - ./mvnw -ntp jib:build -Pprod -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: always deploy: stage: deploy - dependencies: - - 'docker-push' + # dependencies: + # - 'docker-push' before_script: - - apt-get update -qy + - sudo apt-get update -qy - apt-get install -y rsync openssh-client - mkdir -p ~/.ssh - echo "${SSH_BKY_DEPLOY}" > ~/.ssh/id_rsa @@ -142,4 +142,4 @@ deploy: script: - echo "Hello world" - ssh contDeploy@codeability-austria -p 1022 -f "(cd /home/michael/gitsearch git pull && cd src/main/docker/; 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 gitsearch-app)" - when: manual + when: always