This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 56339161 authored by Eduard Frankford's avatar Eduard Frankford
Browse files

deploy changes

parent 27df0750
5 merge requests!132Bringing July Release to production,!128Fixing #315 and #319,!126Continous Deployment with E2E Tests,!125Publish docker image,!119Publish docker image
......@@ -8,12 +8,12 @@ cache:
stages:
# - lint
# - build
- test
- e2e
# - test
# - e2e
# - analyze
# - package
# - release
# - deploy
- release
- deploy
before_script:
- export NG_CLI_ANALYTICS="false"
......@@ -86,34 +86,34 @@ before_script:
# expire_in: 15 days
# needs: []
frontend-test:
stage: test
cache: {}
script:
# - npm install
- npm test
artifacts:
reports:
junit: target/test-results/TESTS-results-jest.xml
paths:
- target/test-results
- target/jacoco
when: always
expire_in: 15 days
needs: []
# frontend-test:
# stage: test
# cache: {}
# script:
# # - npm install
# - npm test
# artifacts:
# reports:
# junit: target/test-results/TESTS-results-jest.xml
# paths:
# - target/test-results
# - target/jacoco
# when: always
# expire_in: 15 days
# needs: []
e2e-test:
services:
- selenium/standalone-chrome
image: node
stage: e2e
cache: {}
dependencies:
- frontend-test
script:
- apt-get install default-jre
- apt-get -f install
- npm run e2e
# e2e-test:
# services:
# - selenium/standalone-chrome
# image: node
# stage: e2e
# cache: {}
# dependencies:
# - frontend-test
# script:
# - apt-get install default-jre
# - apt-get -f install
# - npm run e2e
# sonar-analyze:
# stage: analyze
# dependencies:
......@@ -130,33 +130,33 @@ e2e-test:
# - ./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
# variables:
# # only:
# # refs:
# # - development
# REGISTRY_URL: sharing-codeability.uibk.ac.at:5051
# IMAGE_TAG: sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform
# script:
# - ./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: always
docker-push:
stage: release
variables:
# only:
# refs:
# - development
REGISTRY_URL: sharing-codeability.uibk.ac.at:5051
IMAGE_TAG: sharing-codeability.uibk.ac.at:5051/sharing/codeability-sharing-platform
script:
- ./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: always
# deploy:
# stage: deploy
# dependencies:
# - 'docker-push'
# image: ubuntu:20.04
# before_script:
# - apt-get update -qy
# - apt-get install -y rsync openssh-client
# - 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:
# - whoami
# - 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: always
deploy:
stage: deploy
dependencies:
- 'docker-push'
image: ubuntu:20.04
before_script:
- apt-get update -qy
- apt-get install -y rsync openssh-client
- 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:
- whoami
- 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: always
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment