File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,16 @@ pipeline {
84
84
}
85
85
post {
86
86
success {
87
- archiveArtifacts allowEmptyArchive : false , artifacts : ' coverage.html'
88
87
archiveArtifacts allowEmptyArchive : false , artifacts : ' bin/*'
88
+ publishHTML([
89
+ allowMissing : false ,
90
+ alwaysLinkToLastBuild : true ,
91
+ keepAll : false ,
92
+ reportDir : ' backend-coverage' ,
93
+ reportFiles : ' index.html' ,
94
+ reportName : ' Backend Coverage' ,
95
+ useWrapperFileDirectly : true
96
+ ])
89
97
}
90
98
}
91
99
}
Original file line number Diff line number Diff line change @@ -44,9 +44,10 @@ if [ "${1:-}" = "--inside-docker" ]; then
44
44
cd /app/backend
45
45
[ -z " $( go tool fix -diff ./internal) " ]
46
46
go test -json -cover -coverprofile=" $DIR /../../coverage.out" ./internal/... | tparse
47
- go tool cover -html=" $DIR /../../coverage.out" -o " $DIR /../../coverage.html"
48
- rm -f " $DIR /../../coverage.out"
49
- chown 1000:1000 " $DIR /../../coverage.html"
47
+ mkdir " $DIR /../../backend-coverage"
48
+ go tool cover -html=" /tmp/coverage.out" -o " $DIR /../../backend-coverage/index.html"
49
+ rm -f " /tmp/coverage.out"
50
+ chown -R 1000:1000 " $DIR /../../backend-coverage"
50
51
golangci-lint -v run ./...
51
52
else
52
53
# run this script from within docker
You can’t perform that action at this time.
0 commit comments