This repository was archived by the owner on Jul 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Expand file tree Collapse file tree 3 files changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,23 @@ pipeline {
35
35
}
36
36
}
37
37
}
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
+ }
38
55
stage(" Binaries" ){
39
56
agent {
40
57
label ' ubuntu-1604-aufs-edge'
Original file line number Diff line number Diff line change @@ -111,6 +111,19 @@ coverage: coverage-test-unit coverage-test-e2e ## run tests with coverage
111
111
go tool cover -func _build/cov/all.out
112
112
go tool cover -html _build/cov/all.out -o _build/cov/coverage.html
113
113
114
+ fossa-analyze :
115
+ docker run -i --rm -e FOSSA_API_KEY=$(FOSSA_API_KEY ) \
116
+ -e GO111MODULE=off \
117
+ -v $(CURDIR ) /$* :/go/src/github.com/docker/app \
118
+ -w /go/src/github.com/docker/app \
119
+ $(BUILD_ANALYZER ) analyze $(FOSSA_OPTS ) --branch $(BRANCH_NAME )
120
+
121
+ fossa-test :
122
+ docker run -i --rm -e FOSSA_API_KEY=$(FOSSA_API_KEY ) \
123
+ -v $(CURDIR ) /$* :/go/src/github.com/docker/app \
124
+ -w /go/src/github.com/docker/app \
125
+ $(BUILD_ANALYZER ) test --debug
126
+
114
127
clean : # # clean build artifacts
115
128
$(call rmdir,bin)
116
129
$(call rmdir,_build)
Original file line number Diff line number Diff line change @@ -3,6 +3,10 @@ BIN_NAME ?= docker-app
3
3
BIN_STANDALONE_NAME := ${BIN_NAME}-standalone
4
4
E2E_NAME := $(BIN_NAME ) -e2e
5
5
6
+ # Variables for fossa scan
7
+ BUILD_ANALYZER? =dockereng/fossa-analyzer
8
+ FOSSA_OPTS? =--option all-tags:true --option allow-unresolved:true
9
+
6
10
# Enable experimental features. "on" or "off"
7
11
EXPERIMENTAL := off
8
12
You can’t perform that action at this time.
0 commit comments