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

Commit 6338683

Browse files
authored
Merge pull request #670 from ndeloof/fossa
Run fossa analysis in a distinct pipeline
2 parents 84e35ad + 981138a commit 6338683

2 files changed

Lines changed: 45 additions & 26 deletions

File tree

Jenkinsfile.baguette

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -56,32 +56,6 @@ pipeline {
5656
}
5757
}
5858
}
59-
stage("License Scan") {
60-
when {
61-
anyOf {
62-
changeset "Gopkg.lock"
63-
branch "master"
64-
}
65-
}
66-
agent {
67-
label 'ubuntu-1604-aufs-edge'
68-
}
69-
steps {
70-
withCredentials([
71-
usernamePassword(credentialsId: 'dockerbuildbot-hub.docker.com', usernameVariable: 'REGISTRY_USERNAME', passwordVariable: 'REGISTRY_PASSWORD'),
72-
string(credentialsId: 'fossa-api-key', variable: 'FOSSA_API_KEY')
73-
]) {
74-
dir('src/github.com/docker/app') {
75-
checkout scm
76-
ansiColor('xterm') {
77-
sh 'echo "${REGISTRY_PASSWORD}" | docker login -u "${REGISTRY_USERNAME}" --password-stdin'
78-
sh "FOSSA_API_KEY=$FOSSA_API_KEY BRANCH_NAME='${BRANCH_NAME}' make fossa-analyze"
79-
sh "FOSSA_API_KEY=$FOSSA_API_KEY make fossa-test"
80-
}
81-
}
82-
}
83-
}
84-
}
8559
stage('Invocation image'){
8660
agent {
8761
label 'ubuntu-1804'

Jenkinsfile.fossa

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
properties([buildDiscarder(logRotator(numToKeepStr: '20'))])
2+
3+
pipeline {
4+
agent {
5+
label 'ubuntu-1804'
6+
}
7+
8+
options {
9+
skipDefaultCheckout(true)
10+
}
11+
12+
environment {
13+
TAG = tag()
14+
BUILD_TAG = tag()
15+
}
16+
17+
stages {
18+
stage("License Scan") {
19+
when {
20+
anyOf {
21+
changeset "Gopkg.lock"
22+
branch "master"
23+
}
24+
}
25+
agent {
26+
label 'ubuntu-1604-aufs-edge'
27+
}
28+
steps {
29+
withCredentials([
30+
usernamePassword(credentialsId: 'dockerbuildbot-hub.docker.com', usernameVariable: 'REGISTRY_USERNAME', passwordVariable: 'REGISTRY_PASSWORD'),
31+
string(credentialsId: 'fossa-api-key', variable: 'FOSSA_API_KEY')
32+
]) {
33+
dir('src/github.com/docker/app') {
34+
checkout scm
35+
ansiColor('xterm') {
36+
sh 'echo "${REGISTRY_PASSWORD}" | docker login -u "${REGISTRY_USERNAME}" --password-stdin'
37+
sh "FOSSA_API_KEY=$FOSSA_API_KEY BRANCH_NAME='${BRANCH_NAME}' make fossa-analyze"
38+
sh "FOSSA_API_KEY=$FOSSA_API_KEY make fossa-test"
39+
}
40+
}
41+
}
42+
}
43+
}
44+
}
45+
}

0 commit comments

Comments
 (0)