-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathJenkinsfile.release
40 lines (37 loc) · 1.48 KB
/
Jenkinsfile.release
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
#!/usr/bin/env groovy
ansiColor('xterm') {
node('JenkinsMarathonCI-Debian8-2017-10-23') {
properties([
parameters([
string(name: 'gitsha',
defaultValue: '',
description: 'Git Commit SHA to Build and Release (ex. 167d7fb86 or 167)'
),
string(name: 'version',
defaultValue: '',
description: 'Community Release Version (ex. v1.5.2). This is a verification of the version.'
)]
)
])
stage("Run Pipeline") {
try {
checkout scm
withCredentials([
usernamePassword(credentialsId: 'a7ac7f84-64ea-4483-8e66-bb204484e58f', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USER'),
string(credentialsId: '3f0dbb48-de33-431f-b91c-2366d2f0e1cf',variable: 'AWS_ACCESS_KEY_ID'),
string(credentialsId: 'f585ec9a-3c38-4f67-8bdb-79e5d4761937',variable: 'AWS_SECRET_ACCESS_KEY'),
]) {
sshagent (credentials: ['0f7ec9c9-99b2-4797-9ed5-625572d5931d']) {
sh "ci/ci_provision.sh"
sh """PATH=\$PATH:\$HOME/protobuf/bin ci/pipeline release $params.version $params.gitsha"""
}
}
} finally {
junit(allowEmptyResults: true, testResults: '*/target/test-reports/*.xml')
archiveArtifacts "sandboxes.tar.gz"
archiveArtifacts "ci-${env.BUILD_TAG}.log.tar.gz"
archiveArtifacts "ci-${env.BUILD_TAG}.log" // Only in case the build was aborted and the logs weren't zipped
}
}
}
}