Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cmsos
worksuite
Commits
56878081
Commit
56878081
authored
May 18, 2020
by
Dainius Simelevicius
Browse files
references #151: configuring ssh before 'staging' and 'production' jobs
parent
85ef6a13
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
56878081
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment