From 1e0baa39110c891e91c4376a43f649d13ae66a3e Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Thu, 27 Jul 2023 13:50:13 +1000 Subject: [PATCH] Archive backend coverage in ci --- Jenkinsfile | 5 +---- scripts/ci/test-backend | 1 + 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3712cbf8..a842ec18 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -1,7 +1,6 @@ import groovy.transform.Field @Field -def shOutput = "" def buildxPushTags = "" def getVersion() { @@ -85,10 +84,8 @@ pipeline { } post { success { + archiveArtifacts allowEmptyArchive: false, artifacts: 'coverage.html' archiveArtifacts allowEmptyArchive: false, artifacts: 'bin/*' - script { - shOutput = "" - } } } } diff --git a/scripts/ci/test-backend b/scripts/ci/test-backend index 83aa7e5f..0d578e1b 100755 --- a/scripts/ci/test-backend +++ b/scripts/ci/test-backend @@ -46,6 +46,7 @@ if [ "${1:-}" = "--inside-docker" ]; then go test -json -cover -coverprofile="$DIR/../../coverage.out" ./internal/... | tparse go tool cover -html="$DIR/../../coverage.out" -o "$DIR/../../coverage.html" rm -f "$DIR/../../coverage.out" + chown 1000:1000 "$DIR/../../coverage.html" golangci-lint -v run ./... else # run this script from within docker