Commit e0da9314 authored by Yann D'Isanto's avatar Yann D'Isanto
Browse files

fix: sonar test report

parent 66d2b995
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -123,20 +123,13 @@ stages:
    cd -
  }

  function install_go_mod_outdated() {
    cd "$(mktemp -d)"
    go mod init go-mod-outdated
    go get github.com/psampaz/go-mod-outdated
    cd -
  }

  function sonar_tests_report() {
    if [[ -n "$SONAR_URL" ]]
    then
      log_info "SonarQube template detected (\$SONAR_URL): generate tests report for SonarQube (\\e[33;1mreports/sonar-tests-report.json\\e[0m)"
      mkdir -p reports
      # shellcheck disable=SC2086
      go $GO_TEST_ARGS -json > reports/sonar-tests-report.json
      go test $GO_TEST_FLAGS -json > reports/sonar-tests-report.json
    fi
  }

@@ -150,6 +143,13 @@ stages:
    fi
  }

  function install_go_mod_outdated() {
    cd "$(mktemp -d)"
    go mod init go-mod-outdated
    go get github.com/psampaz/go-mod-outdated
    cd -
  }

  function install_ca_certs() {
    certs=$1
    if [[ -z "$certs" ]]