mirror of
https://github.com/jc21/nginx-proxy-manager.git
synced 2024-08-30 18:22:48 +00:00
Use Publish HTML in CI
This commit is contained in:
parent
1e0baa3911
commit
43d989474e
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -84,8 +84,16 @@ pipeline {
|
|||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
success {
|
success {
|
||||||
archiveArtifacts allowEmptyArchive: false, artifacts: 'coverage.html'
|
|
||||||
archiveArtifacts allowEmptyArchive: false, artifacts: 'bin/*'
|
archiveArtifacts allowEmptyArchive: false, artifacts: 'bin/*'
|
||||||
|
publishHTML([
|
||||||
|
allowMissing: false,
|
||||||
|
alwaysLinkToLastBuild: true,
|
||||||
|
keepAll: false,
|
||||||
|
reportDir: 'backend-coverage',
|
||||||
|
reportFiles: 'index.html',
|
||||||
|
reportName: 'Backend Coverage',
|
||||||
|
useWrapperFileDirectly: true
|
||||||
|
])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,9 +44,10 @@ if [ "${1:-}" = "--inside-docker" ]; then
|
|||||||
cd /app/backend
|
cd /app/backend
|
||||||
[ -z "$(go tool fix -diff ./internal)" ]
|
[ -z "$(go tool fix -diff ./internal)" ]
|
||||||
go test -json -cover -coverprofile="$DIR/../../coverage.out" ./internal/... | tparse
|
go test -json -cover -coverprofile="$DIR/../../coverage.out" ./internal/... | tparse
|
||||||
go tool cover -html="$DIR/../../coverage.out" -o "$DIR/../../coverage.html"
|
mkdir "$DIR/../../backend-coverage"
|
||||||
rm -f "$DIR/../../coverage.out"
|
go tool cover -html="/tmp/coverage.out" -o "$DIR/../../backend-coverage/index.html"
|
||||||
chown 1000:1000 "$DIR/../../coverage.html"
|
rm -f "/tmp/coverage.out"
|
||||||
|
chown -R 1000:1000 "$DIR/../../backend-coverage"
|
||||||
golangci-lint -v run ./...
|
golangci-lint -v run ./...
|
||||||
else
|
else
|
||||||
# run this script from within docker
|
# run this script from within docker
|
||||||
|
Loading…
Reference in New Issue
Block a user