Moved before script
@@ -16,14 +16,6 @@ stages:
# - build-thirdparty-docker
before_script:
- - set -e
- - eval $(ssh-agent -s)
- - ssh-add <(echo "$SSH")
- - mkdir ~/.ssh
- - touch ~/.ssh/known_hosts
- - ssh-keyscan -p 2222 -t rsa ipe-wim-gitlab.fzi.de > ~/.ssh/known_hosts
- - git config --global user.email 'zehnder@fzi.de'
- - git config --global user.name 'zehnder'
- echo "$MAVEN_CREDENTIALS" > /root/.m2/settings.xml
- git remote set-url origin $GIT_REPO_ORIGIN/$CI_PROJECT_NAMESPACE/$CI_PROJECT_NAME.git
@@ -67,6 +59,13 @@ start release:
image: maven:3-jdk-8
stage: release
script:
+ - eval $(ssh-agent -s)
+ - ssh-add <(echo "$SSH")
+ - mkdir ~/.ssh
+ - touch ~/.ssh/known_hosts
+ - ssh-keyscan -p 2222 -t rsa ipe-wim-gitlab.fzi.de > ~/.ssh/known_hosts
+ - git config --global user.email 'zehnder@fzi.de'
+ - git config --global user.name 'zehnder'
- git fetch
- git checkout master
- git checkout dev
@@ -80,6 +79,13 @@ finish release:
image: maven:3-jdk-8
stage: release
script:
+ - eval $(ssh-agent -s)
+ - ssh-add <(echo "$SSH")
+ - mkdir ~/.ssh
+ - touch ~/.ssh/known_hosts
+ - ssh-keyscan -p 2222 -t rsa ipe-wim-gitlab.fzi.de > ~/.ssh/known_hosts
+ - git config --global user.email 'zehnder@fzi.de'
+ - git config --global user.name 'zehnder'
- git checkout master
- git checkout dev
- git checkout $CI_BUILD_REF_NAME
