forked from RedHatInsights/insights-core-assets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJenkinsfile
48 lines (48 loc) · 1.73 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
pipeline {
agent {
node {
label 'python27'
}
}
stages {
stage('Write SSH Key') {
steps {
writeFile file: "/tmp/akamai-ssh", text: "${env.AKAMAI_SSH_KEY}\n-----END RSA PRIVATE KEY-----"
sh 'chmod 600 /tmp/akamai-ssh'
}
}
stage('Check GPG') {
steps {
sh """
gpg --no-default-keyring --keyring ./redhattools.pub.gpg --verify uploader.v2.json.asc uploader.v2.json
gpg --no-default-keyring --keyring ./redhattools.pub.gpg --verify uploader.json.asc uploader.json
gpg --no-default-keyring --keyring ./redhattools.pub.gpg --verify insights-core.egg.asc insights-core.egg
"""
}
}
stage('Deploy Uploader JSON') {
when {
branch 'master'
not {
changeRequest()
}
}
steps {
sh 'rsync -arv -e "ssh -i /tmp/akamai-ssh -o StrictHostKeyChecking=no" ./uploader* [email protected]:/114034/r/insights/v1/static/core/'
sh 'rsync -arv -e "ssh -i /tmp/akamai-ssh -o StrictHostKeyChecking=no" ./uploader* [email protected]:/114034/r/insights/v1/static/'
}
}
stage('Deploy Egg') {
when {
branch 'master'
not {
changeRequest()
}
}
steps {
sh 'rsync -arv -e "ssh -i /tmp/akamai-ssh -o StrictHostKeyChecking=no" ./insights-core.egg* [email protected]:/114034/r/insights/v1/static/core/'
sh 'rsync -arv -e "ssh -i /tmp/akamai-ssh -o StrictHostKeyChecking=no" ./changelog.txt [email protected]:/114034/r/insights/v1/static/core/'
}
}
}
}