Skip to content

Commit

Permalink
[TT-13428] Upgrading Go to v1.22.7 (TykTechnologies#858)
Browse files Browse the repository at this point in the history
* Upgrading Go to v1.22.7

* Updating golang_cross
  • Loading branch information
mativm02 authored Oct 29, 2024
1 parent c2e59fe commit 31b1f40
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/linter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21 as builder
FROM golang:1.22.7 as builder

WORKDIR /app

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 31b1f40

Please sign in to comment.