From 3379f3a665db8f186ada7fc4ff997d5656482c18 Mon Sep 17 00:00:00 2001 From: Jamie Curnow Date: Thu, 27 Jul 2023 15:44:30 +1000 Subject: [PATCH] Tweaks to html report --- Jenkinsfile | 8 ++++---- scripts/ci/test-backend | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 7e2b9df..49b1cbe 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -87,11 +87,11 @@ pipeline { archiveArtifacts allowEmptyArchive: false, artifacts: 'bin/*' publishHTML([ allowMissing: false, - alwaysLinkToLastBuild: true, + alwaysLinkToLastBuild: false, keepAll: false, - reportDir: 'backend-coverage', - reportFiles: 'index.html', - reportName: 'Backend Coverage', + reportDir: 'html-reports', + reportFiles: 'backend-coverage.html', + reportName: 'HTML Reports', useWrapperFileDirectly: true ]) } diff --git a/scripts/ci/test-backend b/scripts/ci/test-backend index ff95418..07e85cf 100755 --- a/scripts/ci/test-backend +++ b/scripts/ci/test-backend @@ -44,10 +44,10 @@ if [ "${1:-}" = "--inside-docker" ]; then cd /app/backend [ -z "$(go tool fix -diff ./internal)" ] go test -json -cover -coverprofile="/tmp/coverage.out" ./internal/... | tparse - mkdir "$DIR/../../backend-coverage" - go tool cover -html="/tmp/coverage.out" -o "$DIR/../../backend-coverage/index.html" + mkdir "$DIR/../../html-reports" + go tool cover -html="/tmp/coverage.out" -o "$DIR/../../html-reports/backend-coverage.html" rm -f "/tmp/coverage.out" - chown -R 1000:1000 "$DIR/../../backend-coverage" + chown -R 1000:1000 "$DIR/../../html-reports" golangci-lint -v run ./... else # run this script from within docker