Commit 56878081 authored by Dainius Simelevicius's avatar Dainius Simelevicius
Browse files

references #151: configuring ssh before 'staging' and 'production' jobs

parent 85ef6a13
......@@ -608,7 +608,20 @@ deploy:
except:
- pushes
.ssh_init:
before_script:
- which ssh-agent
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- ssh-add -l
- echo "Host gitlab.cern.ch" > ~/.ssh/config
- echo " HostName gitlab.cern.ch" >> ~/.ssh/config
- echo " UserKnownHostsFile /dev/null" >> ~/.ssh/config
- echo " StrictHostKeyChecking=no" >> ~/.ssh/config
- cat ~/.ssh/config
git:
extends: .ssh_init
stage: distribute
dependencies:
- all
......@@ -705,16 +718,6 @@ git:
- elastic/api
- elastic/timestream
- amc13controller
before_script:
- which ssh-agent
- eval $(ssh-agent -s)
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- ssh-add -l
- echo "Host gitlab.cern.ch" > ~/.ssh/config
- echo " HostName gitlab.cern.ch" >> ~/.ssh/config
- echo " UserKnownHostsFile /dev/null" >> ~/.ssh/config
- echo " StrictHostKeyChecking=no" >> ~/.ssh/config
- cat ~/.ssh/config
script:
- export RELEASE_NUMBER=$(echo $CI_COMMIT_REF_NAME | awk '{split($0,a,"_"); print a[2]}')
- export SNAPSHOT_DIR=$RPM_REPO_DIR/$RELEASE_NUMBER/cc7/x86_64/RPMS/
......@@ -898,9 +901,11 @@ yum:
- pushes
staging:
extends: .ssh_init
stage: staging
<<: *release_definition
production:
extends: .ssh_init
stage: production
<<: *release_definition
Supports Markdown
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