Skip to content

Commit 73a588c

Browse files
szhGitHub Enterprise
authored andcommitted
Merge pull request #6 from Conjur-Enterprise/fix-promote
CNJR-0000: Fix promote stage
2 parents f841074 + 313e89c commit 73a588c

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

Jenkinsfile

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ properties([
88
])
99

1010
if (params.MODE == "PROMOTE") {
11-
release.promote(params.VERSION_TO_PROMOTE) { sourceVersion, targetVersion, assetDirectory ->
12-
sh './publish.sh'
11+
release.promote(params.VERSION_TO_PROMOTE) { infrapool, sourceVersion, targetVersion, assetDirectory ->
12+
infrapool.agentSh './publish.sh'
1313
}
1414

1515
// Copy Github Enterprise release to Github
@@ -51,22 +51,22 @@ pipeline {
5151
stage('Get InfraPool Agent') {
5252
steps {
5353
script {
54-
INFRAPOOL_EXECUTORV2_AGENT_0 = getInfraPoolAgent.connected(type: "ExecutorV2", quantity: 1, duration: 1)[0]
54+
infrapool = getInfraPoolAgent.connected(type: "ExecutorV2", quantity: 1, duration: 1)[0]
5555
}
5656
}
5757
}
5858

5959
stage('Validate Changelog and set version') {
6060
steps {
61-
parseChangelog(INFRAPOOL_EXECUTORV2_AGENT_0)
62-
updateVersion(INFRAPOOL_EXECUTORV2_AGENT_0, "CHANGELOG.md", "${BUILD_NUMBER}")
61+
parseChangelog(infrapool)
62+
updateVersion(infrapool, "CHANGELOG.md", "${BUILD_NUMBER}")
6363
}
6464
}
6565

6666
stage('Prepare CC Report Dir'){
6767
steps {
6868
script {
69-
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh 'mkdir -p coverage'
69+
infrapool.agentSh 'mkdir -p coverage'
7070
}
7171
}
7272
}
@@ -77,8 +77,8 @@ pipeline {
7777
}
7878
steps {
7979
script {
80-
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh "./test.sh"
81-
INFRAPOOL_EXECUTORV2_AGENT_0.agentStash name: 'reports3.0', includes: '**/reports/*.xml'
80+
infrapool.agentSh "./test.sh"
81+
infrapool.agentStash name: 'reports3.0', includes: '**/reports/*.xml'
8282
}
8383
}
8484
post {
@@ -94,8 +94,8 @@ pipeline {
9494
}
9595
steps {
9696
script {
97-
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh "./test.sh"
98-
INFRAPOOL_EXECUTORV2_AGENT_0.agentStash name: 'reports3.1', includes: '**/reports/*.xml'
97+
infrapool.agentSh "./test.sh"
98+
infrapool.agentStash name: 'reports3.1', includes: '**/reports/*.xml'
9999
}
100100
}
101101
post {
@@ -111,8 +111,8 @@ pipeline {
111111
}
112112
steps {
113113
script {
114-
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh "./test.sh"
115-
INFRAPOOL_EXECUTORV2_AGENT_0.agentStash name: 'reports3.2', includes: '**/reports/*.xml'
114+
infrapool.agentSh "./test.sh"
115+
infrapool.agentStash name: 'reports3.2', includes: '**/reports/*.xml'
116116
}
117117
}
118118
post {
@@ -125,7 +125,7 @@ pipeline {
125125
stage('Submit Coverage Report'){
126126
steps{
127127
script {
128-
INFRAPOOL_EXECUTORV2_AGENT_0.agentStash name: 'coverage', includes: '**/coverage/**'
128+
infrapool.agentStash name: 'coverage', includes: '**/coverage/**'
129129
}
130130
unstash 'coverage'
131131

@@ -166,16 +166,16 @@ pipeline {
166166

167167
steps {
168168
script {
169-
release(INFRAPOOL_EXECUTORV2_AGENT_0) {
169+
release(infrapool) {
170170
// Clean up all but the calculated VERSION
171-
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh '''docker run -i --rm -v $(pwd):/src -w /src --entrypoint /bin/sh alpine/git \
171+
infrapool.agentSh '''docker run -i --rm -v $(pwd):/src -w /src --entrypoint /bin/sh alpine/git \
172172
-c "git config --global --add safe.directory /src && \
173173
git clean -fdx \
174174
-e VERSION \
175175
-e bom-assets/ \
176176
-e release-assets" '''
177-
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh './publish.sh'
178-
INFRAPOOL_EXECUTORV2_AGENT_0.agentSh 'cp conjur-api-*.gem release-assets/.'
177+
infrapool.agentSh './publish.sh'
178+
infrapool.agentSh 'cp conjur-api-*.gem release-assets/.'
179179
}
180180
}
181181
}

0 commit comments

Comments
 (0)