diff --git a/bamboo-specs/release.yaml b/bamboo-specs/release.yaml index f21bc2c2c..d404ef23c 100644 --- a/bamboo-specs/release.yaml +++ b/bamboo-specs/release.yaml @@ -69,7 +69,7 @@ VERBOSE=1\ js-deps js-build 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'Make release': 'artifact-subscriptions': @@ -122,7 +122,7 @@ VERBOSE=2\ build-release 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'Make and publish docker': 'key': 'MPD' @@ -173,7 +173,7 @@ 'final-tasks': - 'clean' 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'Publish to static storage': 'key': 'PUB' @@ -202,7 +202,7 @@ 'final-tasks': - 'clean' 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'Publish to GitHub Releases': 'key': 'PTGR' @@ -240,7 +240,7 @@ 'final-tasks': - 'clean' 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'triggers': # Don't use minute values that end with a zero or a five as these are often diff --git a/bamboo-specs/snapcraft.yaml b/bamboo-specs/snapcraft.yaml index 016e88eaa..02f70fd8c 100644 --- a/bamboo-specs/snapcraft.yaml +++ b/bamboo-specs/snapcraft.yaml @@ -73,7 +73,7 @@ VERBOSE='1' \ sh ./scripts/snap/download.sh 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'Build packages': 'artifact-subscriptions': @@ -118,7 +118,7 @@ VERBOSE='1' \ sh ./scripts/snap/build.sh 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'Publish to Snapstore': 'artifact-subscriptions': @@ -150,7 +150,7 @@ 'final-tasks': - 'clean' 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'triggers': # Don't use minute values that end with a zero or a five as these are often diff --git a/bamboo-specs/test.yaml b/bamboo-specs/test.yaml index a14e4fb2e..06138b0c8 100644 --- a/bamboo-specs/test.yaml +++ b/bamboo-specs/test.yaml @@ -58,7 +58,7 @@ 'final-tasks': - 'clean' 'requirements': - - 'adg-docker': 'true' + - 'golang': true # TODO(e.burkov): Add the linting stage for markdown docs and shell scripts. 'Test backend': @@ -117,7 +117,7 @@ exit "$exit_code" 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'Build frontend': 'artifacts': @@ -147,7 +147,7 @@ VERBOSE=1\ js-deps js-build 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'Artifact': 'artifact-subscriptions': @@ -194,7 +194,7 @@ VERBOSE=2\ build-release 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'Test e2e': 'artifact-subscriptions': @@ -226,7 +226,7 @@ make VERBOSE=1 js-deps js-test-e2e 'requirements': - - 'adg-docker': 'true' + - 'golang': true 'branches': 'create': 'for-pull-request' diff --git a/scripts/make/build-docker.sh b/scripts/make/build-docker.sh index b15a2d831..73bc89dee 100644 --- a/scripts/make/build-docker.sh +++ b/scripts/make/build-docker.sh @@ -4,12 +4,9 @@ verbose="${VERBOSE:-0}" if [ "$verbose" -gt '0' ]; then set -x - debug_flags='--debug=1' else set +x - debug_flags='--debug=0' fi -readonly debug_flags set -e -f -u @@ -111,13 +108,13 @@ docker_build_opt_tag() { set -- \ "$@" \ docker \ - "$debug_flags" \ build \ --build-arg BUILD_DATE="$build_date" \ --build-arg DIST_DIR="$dist_dir" \ --build-arg VCS_REF="$commit" \ --build-arg VERSION="$version" \ --platform "$docker_platforms" \ + --progress 'plain' \ ; # Append the channel tag, if any. @@ -132,7 +129,7 @@ docker_build_opt_tag() { # Push to DockerHub, if requested. if [ "$docker_push" -eq 1 ]; then - set -- "$@" "--push" + set -- "$@" '--push' fi # Append the rest. diff --git a/scripts/make/go-bench.sh b/scripts/make/go-bench.sh index 103a613cf..87cc64f54 100644 --- a/scripts/make/go-bench.sh +++ b/scripts/make/go-bench.sh @@ -31,22 +31,25 @@ else fi readonly race_flags -go="${GO:-go}" - +benchtime_flags="${BENCHTIME_FLAGS:---benchtime=1x}" count_flags='--count=2' +go="${GO:-go}" shuffle_flags='--shuffle=on' timeout_flags="${TIMEOUT_FLAGS:---timeout=30s}" -readonly go count_flags shuffle_flags timeout_flags +readonly benchtime_flags count_flags go shuffle_flags timeout_flags -"$go" test \ +env \ + GOMAXPROCS="${GOMAXPROCS:-2}" \ + "$go" test \ + "$benchtime_flags" \ "$count_flags" \ - "$shuffle_flags" \ "$race_flags" \ + "$shuffle_flags" \ "$timeout_flags" \ - "$x_flags" \ "$v_flags" \ + "$x_flags" \ --bench='.' \ --benchmem \ - --benchtime='1s' \ --run='^$' \ - ./... + work \ + ; diff --git a/scripts/make/go-lint.sh b/scripts/make/go-lint.sh index 2811f251e..e4904d888 100644 --- a/scripts/make/go-lint.sh +++ b/scripts/make/go-lint.sh @@ -163,7 +163,20 @@ run_linter -e gofumpt --extra -e -l . run_linter "${GO:-go}" vet ./... -run_linter govulncheck ./... +# govulncheck is not stricly reproducible, because it queries the VulnDB, which +# is updated constantly. If a stricly reproducible lint is desired, for example +# for Docker lint stages, set IGNORE_NON_REPRODUCIBLE to 1 to ignore the exit +# code from govulncheck. +# +# TODO(a.garipov): Return the default to 0 and update the Go version once +# https://github.com/quic-go/quic-go/issues/5543 is fixed. +if [ "${IGNORE_NON_REPRODUCIBLE:-1}" -gt '0' ]; then + # run_linter calls set +e, so don't mind the cancelling effect of ||. + # shellcheck disable=SC2310 + run_linter govulncheck work || : +else + run_linter govulncheck work +fi run_linter gocyclo --over 10 .