diff --git a/.github/workflows/ci-test.yml b/.github/workflows/ci-test.yml index 78de2738b..9dd675626 100644 --- a/.github/workflows/ci-test.yml +++ b/.github/workflows/ci-test.yml @@ -43,7 +43,7 @@ jobs: matrix: redis-version: [5] mongodb-version: [4.2] - go: [1.21] + go: [1.22.7] steps: - name: Checkout Tyk Pump diff --git a/.github/workflows/linter.yaml b/.github/workflows/linter.yaml index c40ef616e..9ef81a7a6 100644 --- a/.github/workflows/linter.yaml +++ b/.github/workflows/linter.yaml @@ -22,19 +22,19 @@ jobs: strategy: fail-fast: false matrix: - go: [1.21] + go: [1.22.7] with: go: ${{ matrix.go }} redis: 5 mongo: 4.2 - test-options: ""-count=1 -failfast -v"" + test-options: "-count=1 -failfast -v" golangci: needs: gotest if: ${{ always() }} uses: TykTechnologies/github-actions/.github/workflows/golangci.yaml@main with: main_branch: "master" - go_version: 1.21 + go_version: 1.22.7 sonarcloud: if: ${{ always() }} needs: [gotest, golangci] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 77984f396..e261139e3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,9 +41,9 @@ jobs: fail-fast: false matrix: golang_cross: - - 1.21-bookworm + - 1.22-bookworm include: - - golang_cross: 1.21-bookworm + - golang_cross: 1.22-bookworm goreleaser: 'ci/goreleaser/goreleaser.yml' cgo: 0 rpmvers: 'el/7 el/8 el/9 amazon/2 amazon/2023' @@ -127,12 +127,12 @@ jobs: mask-aws-account-id: false - uses: aws-actions/amazon-ecr-login@v2 id: ecr - if: ${{ matrix.golang_cross == '1.21-bookworm' }} + if: ${{ matrix.golang_cross == '1.22-bookworm' }} with: mask-password: 'true' - name: Docker metadata for CI id: ci_metadata - if: ${{ matrix.golang_cross == '1.21-bookworm' }} + if: ${{ matrix.golang_cross == '1.22-bookworm' }} uses: docker/metadata-action@v5 with: images: ${{ steps.ecr.outputs.registry }}/tyk-pump @@ -146,7 +146,7 @@ jobs: type=semver,pattern={{major}}.{{minor}},prefix=v type=semver,pattern={{version}},prefix=v - name: push image to CI - if: ${{ matrix.golang_cross == '1.21-bookworm' }} + if: ${{ matrix.golang_cross == '1.22-bookworm' }} uses: docker/build-push-action@v6 with: context: "dist" @@ -174,7 +174,7 @@ jobs: type=semver,pattern={{version}} labels: "org.opencontainers.image.title=tyk-pump (distroless) \norg.opencontainers.image.description=Tyk Analytics Pump to move analytics data from Redis to any supported back end (multiple back ends can be written to at once).\norg.opencontainers.image.vendor=tyk.io\norg.opencontainers.image.version=${{ github.ref_name }}\n" - name: push image to prod - if: ${{ matrix.golang_cross == '1.21-bookworm' }} + if: ${{ matrix.golang_cross == '1.22-bookworm' }} uses: docker/build-push-action@v6 with: context: "dist" @@ -189,7 +189,7 @@ jobs: labels: ${{ steps.tag_metadata.outputs.labels }} - name: save deb uses: actions/upload-artifact@v4 - if: ${{ matrix.golang_cross == '1.21-bookworm' }} + if: ${{ matrix.golang_cross == '1.22-bookworm' }} with: name: deb retention-days: 1 @@ -199,7 +199,7 @@ jobs: !dist/*fips*.deb - name: save rpm uses: actions/upload-artifact@v4 - if: ${{ matrix.golang_cross == '1.21-bookworm' }} + if: ${{ matrix.golang_cross == '1.22-bookworm' }} with: name: rpm retention-days: 1 diff --git a/.golangci.yaml b/.golangci.yaml index 5a3a71186..92178d280 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -63,7 +63,7 @@ linters-settings: extra-rules: true # Select the Go version to target. - lang-version: "1.21" + lang-version: "1.22.7" goimports: auto-fix: false @@ -100,7 +100,7 @@ linters-settings: # https://staticcheck.io/docs/options#checks checks: ["all"] # Select the Go version to target. - go: "1.21" + go: "1.22.7" whitespace: auto-fix: true diff --git a/Dockerfile b/Dockerfile index 0aff73ff5..bb1b78d13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21 as builder +FROM golang:1.22.7 as builder WORKDIR /app diff --git a/go.mod b/go.mod index cabbcb686..dae9d7e74 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/TykTechnologies/tyk-pump -go 1.21 +go 1.22.7 require ( github.com/DataDog/datadog-go v4.7.0+incompatible