chore: Update all cache strings with go version (#13871)
This commit is contained in:
parent
7df1e53a4b
commit
7dcdc89b12
|
|
@ -37,7 +37,7 @@ commands:
|
||||||
default: "gotestsum"
|
default: "gotestsum"
|
||||||
cache_version:
|
cache_version:
|
||||||
type: string
|
type: string
|
||||||
default: "v1"
|
default: "v2"
|
||||||
goversion:
|
goversion:
|
||||||
type: string
|
type: string
|
||||||
default: 1.21.0
|
default: 1.21.0
|
||||||
|
|
@ -194,11 +194,15 @@ commands:
|
||||||
jobs:
|
jobs:
|
||||||
test-go-linux:
|
test-go-linux:
|
||||||
executor: telegraf-ci
|
executor: telegraf-ci
|
||||||
|
parameters:
|
||||||
|
goversion:
|
||||||
|
type: string
|
||||||
|
default: 1.21.0
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
name: "Restore Go caches"
|
name: "Restore Go caches"
|
||||||
key: linux-amd64-go-cache-v1-{{ checksum "go.sum" }}
|
key: linux-amd64-go<< parameters.goversion >>-cache-v2-{{ checksum "go.sum" }}
|
||||||
- check-changed-files-or-halt
|
- check-changed-files-or-halt
|
||||||
- run: ./scripts/make_docs.sh
|
- run: ./scripts/make_docs.sh
|
||||||
- run: 'make deps'
|
- run: 'make deps'
|
||||||
|
|
@ -208,7 +212,7 @@ jobs:
|
||||||
- test-go
|
- test-go
|
||||||
- save_cache:
|
- save_cache:
|
||||||
name: "Save Go caches"
|
name: "Save Go caches"
|
||||||
key: linux-amd64-go-cache-v1-{{ checksum "go.sum" }}
|
key: linux-amd64-go<< parameters.goversion >>-v2-{{ checksum "go.sum" }}
|
||||||
paths:
|
paths:
|
||||||
- '/go/pkg/mod'
|
- '/go/pkg/mod'
|
||||||
- '~/.cache/golangci-lint'
|
- '~/.cache/golangci-lint'
|
||||||
|
|
@ -219,11 +223,15 @@ jobs:
|
||||||
- '*'
|
- '*'
|
||||||
test-go-linux-386:
|
test-go-linux-386:
|
||||||
executor: telegraf-ci
|
executor: telegraf-ci
|
||||||
|
parameters:
|
||||||
|
goversion:
|
||||||
|
type: string
|
||||||
|
default: 1.21.0
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
name: "Restore Go caches"
|
name: "Restore Go caches"
|
||||||
key: linux-386-go-cache-v1-{{ checksum "go.sum" }}
|
key: linux-386-go<< parameters.goversion >>-cache-v2-{{ checksum "go.sum" }}
|
||||||
- check-changed-files-or-halt
|
- check-changed-files-or-halt
|
||||||
- run: 'GOARCH=386 make deps'
|
- run: 'GOARCH=386 make deps'
|
||||||
- run: 'GOARCH=386 make tidy'
|
- run: 'GOARCH=386 make tidy'
|
||||||
|
|
@ -232,7 +240,7 @@ jobs:
|
||||||
arch: "386"
|
arch: "386"
|
||||||
- save_cache:
|
- save_cache:
|
||||||
name: "Save Go caches"
|
name: "Save Go caches"
|
||||||
key: linux-386-go-cache-v1-{{ checksum "go.sum" }}
|
key: linux-386-go<< parameters.goversion >>-cache-v2-{{ checksum "go.sum" }}
|
||||||
paths:
|
paths:
|
||||||
- '/go/pkg/mod'
|
- '/go/pkg/mod'
|
||||||
- '~/.cache/golangci-lint'
|
- '~/.cache/golangci-lint'
|
||||||
|
|
@ -249,21 +257,29 @@ jobs:
|
||||||
- run: 'make test-integration'
|
- run: 'make test-integration'
|
||||||
test-go-mac:
|
test-go-mac:
|
||||||
executor: mac
|
executor: mac
|
||||||
|
parameters:
|
||||||
|
goversion:
|
||||||
|
type: string
|
||||||
|
default: 1.21.0
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
name: "Restore Go caches"
|
name: "Restore Go caches"
|
||||||
key: darwin-amd64-go-cache-v1-{{ checksum "go.sum" }}
|
key: darwin-amd64-go<< parameters.goversion >>-cache-v2-{{ checksum "go.sum" }}
|
||||||
- test-go:
|
- test-go:
|
||||||
os: darwin
|
os: darwin
|
||||||
- save_cache:
|
- save_cache:
|
||||||
name: "Save Go caches"
|
name: "Save Go caches"
|
||||||
key: darwin-amd64-go-cache-v1-{{ checksum "go.sum" }}
|
key: darwin-amd64-go<< parameters.goversion >>-cache-v2-{{ checksum "go.sum" }}
|
||||||
paths:
|
paths:
|
||||||
- '~/go/pkg/mod'
|
- '~/go/pkg/mod'
|
||||||
- '~/Library/Caches/golangci-lint'
|
- '~/Library/Caches/golangci-lint'
|
||||||
- '~/Library/Caches/go-build'
|
- '~/Library/Caches/go-build'
|
||||||
test-go-windows:
|
test-go-windows:
|
||||||
|
parameters:
|
||||||
|
goversion:
|
||||||
|
type: string
|
||||||
|
default: 1.21.0
|
||||||
executor:
|
executor:
|
||||||
name: win/default
|
name: win/default
|
||||||
shell: bash.exe
|
shell: bash.exe
|
||||||
|
|
@ -272,13 +288,13 @@ jobs:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
name: "Restore Go caches"
|
name: "Restore Go caches"
|
||||||
key: windows-amd64-go-cache-v1-{{ checksum "go.sum" }}
|
key: windows-amd64-go<< parameters.goversion >>-cache-v2-{{ checksum "go.sum" }}
|
||||||
- test-go:
|
- test-go:
|
||||||
os: windows
|
os: windows
|
||||||
gotestsum: "gotestsum.exe"
|
gotestsum: "gotestsum.exe"
|
||||||
- save_cache:
|
- save_cache:
|
||||||
name: "Save Go caches"
|
name: "Save Go caches"
|
||||||
key: windows-amd64-go-cache-v1-{{ checksum "go.sum" }}
|
key: windows-amd64-go<< parameters.goversion >>-cache-v2-{{ checksum "go.sum" }}
|
||||||
paths:
|
paths:
|
||||||
- '~\go\pkg\mod'
|
- '~\go\pkg\mod'
|
||||||
- '~\AppData\Local\golangci-lint'
|
- '~\AppData\Local\golangci-lint'
|
||||||
|
|
@ -286,17 +302,21 @@ jobs:
|
||||||
|
|
||||||
test-licenses:
|
test-licenses:
|
||||||
executor: telegraf-ci
|
executor: telegraf-ci
|
||||||
|
parameters:
|
||||||
|
goversion:
|
||||||
|
type: string
|
||||||
|
default: 1.21.0
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- restore_cache:
|
- restore_cache:
|
||||||
name: "Restore Go caches"
|
name: "Restore Go caches"
|
||||||
key: linux-amd64-go-cache-v1-{{ checksum "go.sum" }}
|
key: linux-amd64-go<< parameters.goversion >>-cache-v2-{{ checksum "go.sum" }}
|
||||||
- check-changed-files-or-halt
|
- check-changed-files-or-halt
|
||||||
- run: 'make build_tools'
|
- run: 'make build_tools'
|
||||||
- run: './tools/license_checker/license_checker -whitelist ./tools/license_checker/data/whitelist'
|
- run: './tools/license_checker/license_checker -whitelist ./tools/license_checker/data/whitelist'
|
||||||
- save_cache:
|
- save_cache:
|
||||||
name: "Save Go caches"
|
name: "Save Go caches"
|
||||||
key: linux-amd64-go-cache-v1-{{ checksum "go.sum" }}
|
key: linux-amd64-go<< parameters.goversion >>-cache-v2-{{ checksum "go.sum" }}
|
||||||
paths:
|
paths:
|
||||||
- '/go/pkg/mod'
|
- '/go/pkg/mod'
|
||||||
- '~/.cache/golangci-lint'
|
- '~/.cache/golangci-lint'
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ func main() {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
FileName: ".circleci/config.yml",
|
FileName: ".circleci/config.yml",
|
||||||
Regex: `(default): "(\d.\d*.\d)"`,
|
Regex: `(default): (\d.\d*.\d)`,
|
||||||
Replace: fmt.Sprintf("$1: %s", version),
|
Replace: fmt.Sprintf("$1: %s", version),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue