Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 770325b

Browse files
committed
Moved License Scan to Validate stage
Signed-off-by: Zuhayr Elahi <[email protected]>
1 parent 963997c commit 770325b

File tree

1 file changed

+19
-22
lines changed

1 file changed

+19
-22
lines changed

Jenkinsfile

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
properties([buildDiscarder(logRotator(numToKeepStr: '20'))])
22

3+
hubCred = [
4+
$class: 'UsernamePasswordMultiBinding',
5+
usernameVariable: 'REGISTRY_USERNAME',
6+
passwordVariable: 'REGISTRY_PASSWORD',
7+
credentialsId: 'orcaeng-hub.docker.com',
8+
]
9+
310
pipeline {
411
agent {
512
label 'linux && x86_64'
@@ -17,15 +24,22 @@ pipeline {
1724
stage('Build') {
1825
parallel {
1926
stage("Validate") {
27+
environment {
28+
FOSSA_API_KEY=credentials('cb07b147-32a4-4400-aaac-21c3f8c9e62e')
29+
}
2030
agent {
2131
label 'ubuntu-1604-aufs-edge'
2232
}
2333
steps {
24-
dir('src/github.com/docker/app') {
25-
checkout scm
26-
ansiColor('xterm') {
27-
sh 'make -f docker.Makefile lint'
28-
sh 'make -f docker.Makefile check-vendor'
34+
withCredentials([hubCred]) {
35+
dir('src/github.com/docker/app') {
36+
checkout scm
37+
ansiColor('xterm') {
38+
sh 'make -f docker.Makefile lint'
39+
sh 'make -f docker.Makefile check-vendor'
40+
sh "BRANCH_NAME='${BRANCH_NAME}' make fossa-analyze"
41+
sh 'make fossa-test'
42+
}
2943
}
3044
}
3145
}
@@ -35,23 +49,6 @@ pipeline {
3549
}
3650
}
3751
}
38-
stage("License Scan") {
39-
environment {
40-
FOSSA_API_KEY=credentials('cb07b147-32a4-4400-aaac-21c3f8c9e62e')
41-
}
42-
agent {
43-
label 'ubuntu-1604-aufs-edge'
44-
}
45-
steps {
46-
dir('src/github.com/docker/app') {
47-
checkout scm
48-
ansiColor(xterm) {
49-
sh "BRANCH_NAME='${BRANCH_NAME}' make fossa-analyze"
50-
sh 'make fossa-test'
51-
}
52-
}
53-
}
54-
}
5552
stage("Binaries"){
5653
agent {
5754
label 'ubuntu-1604-aufs-edge'

0 commit comments

Comments
 (0)