From b8f17ab4c3438497dd6e87c993d84ebc07846754 Mon Sep 17 00:00:00 2001 From: Trevor Whitney Date: Thu, 10 Oct 2024 11:29:08 -0600 Subject: [PATCH] ci: speciy golangci-lint build tags at runtime (#14456) --- .github/jsonnetfile.json | 2 +- .github/jsonnetfile.lock.json | 4 ++-- .../grafana/loki-release/workflows/validate.libsonnet | 1 + .github/workflows/check.yml | 2 +- .github/workflows/images.yml | 2 +- .github/workflows/minor-release-pr.yml | 2 +- .github/workflows/patch-release-pr.yml | 2 +- .github/workflows/release.yml | 2 +- .golangci.yml | 2 -- Makefile | 2 +- 10 files changed, 10 insertions(+), 11 deletions(-) diff --git a/.github/jsonnetfile.json b/.github/jsonnetfile.json index bb6fd2eb41c9d..58c6d34c67c48 100644 --- a/.github/jsonnetfile.json +++ b/.github/jsonnetfile.json @@ -8,7 +8,7 @@ "subdir": "workflows" } }, - "version": "d900569c04b53e02de6ef208fa77cba41ec5f709" + "version": "20aac53fcb06d378b1c1101c7e4dc989466eb4ff" } ], "legacyImports": true diff --git a/.github/jsonnetfile.lock.json b/.github/jsonnetfile.lock.json index 7c45536e4f49c..5d356b0b4fb0b 100644 --- a/.github/jsonnetfile.lock.json +++ b/.github/jsonnetfile.lock.json @@ -8,8 +8,8 @@ "subdir": "workflows" } }, - "version": "d900569c04b53e02de6ef208fa77cba41ec5f709", - "sum": "+uAzU+b+aJtp3k+JX5mDxuh8LNY23+cHvUOwzCQ8CS8=" + "version": "20aac53fcb06d378b1c1101c7e4dc989466eb4ff", + "sum": "bo355Fm9Gm1TU13MjlXGXgrCXo4CPr7aEeTvgNFYAl8=" } ], "legacyImports": false diff --git a/.github/vendor/github.com/grafana/loki-release/workflows/validate.libsonnet b/.github/vendor/github.com/grafana/loki-release/workflows/validate.libsonnet index 44f4984e4b785..c45468fc02662 100644 --- a/.github/vendor/github.com/grafana/loki-release/workflows/validate.libsonnet +++ b/.github/vendor/github.com/grafana/loki-release/workflows/validate.libsonnet @@ -160,6 +160,7 @@ local validationJob = _validationJob(false); + step.with({ version: '${{ inputs.golang_ci_lint_version }}', 'only-new-issues': true, + args: '-v --timeout 15m --build-tags linux,promtail_journal_enabled', }), ], ) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index adf0c4277b10b..5e90ce2c01920 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -12,4 +12,4 @@ "pull_request": {} "push": "branches": - - "main" + - "main" \ No newline at end of file diff --git a/.github/workflows/images.yml b/.github/workflows/images.yml index bb2f50017d818..40801f19317d3 100644 --- a/.github/workflows/images.yml +++ b/.github/workflows/images.yml @@ -430,4 +430,4 @@ "permissions": "contents": "write" "id-token": "write" - "pull-requests": "write" + "pull-requests": "write" \ No newline at end of file diff --git a/.github/workflows/minor-release-pr.yml b/.github/workflows/minor-release-pr.yml index de7880161a2bd..807e52afab253 100644 --- a/.github/workflows/minor-release-pr.yml +++ b/.github/workflows/minor-release-pr.yml @@ -828,4 +828,4 @@ name: "Prepare Minor Release PR from Weekly" permissions: contents: "write" id-token: "write" - pull-requests: "write" + pull-requests: "write" \ No newline at end of file diff --git a/.github/workflows/patch-release-pr.yml b/.github/workflows/patch-release-pr.yml index cf982bc70e239..840f1d1d3f49e 100644 --- a/.github/workflows/patch-release-pr.yml +++ b/.github/workflows/patch-release-pr.yml @@ -828,4 +828,4 @@ name: "Prepare Patch Release PR" permissions: contents: "write" id-token: "write" - pull-requests: "write" + pull-requests: "write" \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3d074be5ec592..1628a0b57dfb5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -219,4 +219,4 @@ name: "create release" permissions: contents: "write" id-token: "write" - pull-requests: "write" + pull-requests: "write" \ No newline at end of file diff --git a/.golangci.yml b/.golangci.yml index 9a3e34b7754bf..0618237e0d024 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -20,9 +20,7 @@ run: # list of build tags, all linters use it. Default is empty list. build-tags: - - linux - cgo - - promtail_journal_enabled - integration # output configuration options diff --git a/Makefile b/Makefile index 609a8190f00a4..c5afc7b669d64 100644 --- a/Makefile +++ b/Makefile @@ -339,7 +339,7 @@ ifeq ($(BUILD_IN_CONTAINER),true) else go version golangci-lint version - GO111MODULE=on golangci-lint run -v --timeout 15m + GO111MODULE=on golangci-lint run -v --timeout 15m --build-tags linux,promtail_journal_enabled faillint -paths "sync/atomic=go.uber.org/atomic" ./... endif