Skip to content

Commit 2989f65

Browse files
author
Vitaly Korolev
committed
move blackduck scan after publishing
1 parent 667c031 commit 2989f65

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

Jenkinsfile

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ void runMinikubeCleanup() {
145145
'''
146146
}
147147

148-
void runSecurityScan() {
149-
build job: 'securityscans/Blackduck/KubeNinjas/kubernetes-operator', wait: false, parameters: [ string(name: 'branch', value: "${env.BRANCH_NAME}") ]
148+
void runBlackDuckScan() {
149+
build job: 'securityscans/Blackduck/KubeNinjas/kubernetes-operator', wait: false, parameters: [ string(name: 'branch', value: "${env.BRANCH_NAME}"), string(name: 'CONTAINER_IMAGES', value: "${operatorRepo}:${VERSION}-${branchNameTag}") ]
150150
}
151151

152152
/**
@@ -210,12 +210,6 @@ pipeline {
210210
}
211211
}
212212

213-
stage('Run-Security-Scan') {
214-
steps {
215-
runSecurityScan()
216-
}
217-
}
218-
219213
stage('Run-tests') {
220214
steps {
221215
runTests()
@@ -252,6 +246,17 @@ pipeline {
252246
publishToInternalRegistry()
253247
}
254248
}
249+
250+
stage('Run-BlackDuck-Scan') {
251+
when {
252+
anyOf {
253+
expression { return params.PUBLISH_IMAGE }
254+
}
255+
}
256+
steps {
257+
runBlackDuckScan()
258+
}
259+
}
255260

256261
}
257262

0 commit comments

Comments
 (0)