Skip to content

Commit 1556280

Browse files
author
Vaughn Dice
authored
Merge pull request #102 from vdice/unparallelize-lint-and-test-tasks
fix(Jenkinsfile): unparallel-ize lint and test tasks
2 parents 7e3b88e + 79b2877 commit 1556280

1 file changed

Lines changed: 20 additions & 23 deletions

File tree

Jenkinsfile

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -67,31 +67,28 @@ node('linux') {
6767
}
6868

6969
stage 'Lint and test container'
70-
parallel(
71-
lint: {
72-
node('linux') {
73-
sh "docker run --rm ${test_image} lint"
74-
}
75-
},
76-
test: {
77-
node('linux') {
78-
withCredentials([[$class: 'StringBinding',
79-
credentialsId: '2da033eb-2e34-4efd-b090-ad892f348065',
80-
variable: 'CODECOV_TOKEN']]) {
81-
def codecov = "codecov -Z -C ${git_commit} "
82-
if (git_branch == "remotes/origin/master") {
83-
codecov += "-B master"
84-
} else {
85-
def branch_name = env.BRANCH_NAME
86-
def branch_index = branch_name.indexOf('-')
87-
def pr = branch_name.substring(branch_index+1, branch_name.length())
88-
codecov += "-P ${pr}"
89-
}
90-
sh "docker run -e CODECOV_TOKEN=\${CODECOV_TOKEN} --rm ${test_image} sh -c 'test-cover.sh && ${codecov}'"
91-
}
70+
// TODO: re-parallelize these tasks when race condition is fixed.
71+
node('linux') {
72+
sh "docker run --rm ${test_image} lint"
73+
}
74+
75+
node('linux') {
76+
withCredentials([[$class: 'StringBinding',
77+
credentialsId: '2da033eb-2e34-4efd-b090-ad892f348065',
78+
variable: 'CODECOV_TOKEN']]) {
79+
def codecov = "codecov -Z -C ${git_commit} "
80+
if (git_branch == "remotes/origin/master") {
81+
codecov += "-B master"
82+
} else {
83+
def branch_name = env.BRANCH_NAME
84+
def branch_index = branch_name.indexOf('-')
85+
def pr = branch_name.substring(branch_index+1, branch_name.length())
86+
codecov += "-P ${pr}"
9287
}
88+
sh "docker run -e CODECOV_TOKEN=\${CODECOV_TOKEN} --rm ${test_image} sh -c 'test-cover.sh && ${codecov}'"
9389
}
94-
)
90+
}
91+
9592

9693
stage 'Build and Upload CLI built with SDK'
9794

0 commit comments

Comments
 (0)