diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index cad533d028e32f668e421e340b8f444ac425d55c..bd50a4dc3a914dd68642aefbb246aa66c31634a0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,7 +11,7 @@ stages: - analyze - package - release - # - deploy + - deploy before_script: - export NG_CLI_ANALYTICS="false" @@ -125,3 +125,21 @@ docker-push: - ./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' + 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: + - echo "Hello world" + # - "rsync -a --progress ./server/ blockly@stair-lab.uibk.ac.at:/var/www/ros-blockly/server" + when: manual