Skip to content

Commit fa24def

Browse files
set go to 1.23 in azclient and 1.24 in cloud provider (#8376)
Signed-off-by: Fan Shang Xiang <[email protected]>
1 parent a2e9ea1 commit fa24def

File tree

20 files changed

+104
-27
lines changed

20 files changed

+104
-27
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,10 @@ jobs:
6666
- name: Set up Go 1.x
6767
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
6868
with:
69-
go-version: '>=1.20'
69+
go-version-file: 'go.mod'
7070
check-latest: true
71+
cache-dependency-path: |
72+
go.sum
7173
id: go
7274

7375
# Initializes the CodeQL tools for scanning.

.github/workflows/codeql-azclient.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,11 @@ on:
1717
branches: [ master ]
1818
paths:
1919
- 'pkg/azclient/**'
20-
- '!pkg/azclient/trace/**'
2120
pull_request:
2221
# The branches below must be a subset of the branches above
2322
branches: [ master ]
2423
paths:
2524
- 'pkg/azclient/**'
26-
- '!pkg/azclient/trace/**'
2725
permissions:
2826
contents: read
2927

@@ -58,8 +56,6 @@ jobs:
5856
check-latest: true
5957
cache-dependency-path: |
6058
pkg/azclient/go.sum
61-
pkg/azclient/client-gen/go.sum
62-
pkg/azclient/configloader/go.sum
6359
id: go
6460

6561
# Initializes the CodeQL tools for scanning.
@@ -77,7 +73,7 @@ jobs:
7773
- name: Autobuild
7874
run: |
7975
cd pkg/azclient
80-
make generate
76+
make generate test
8177
echo "fail if files changed"
8278
git add . && git diff --quiet && git diff --cached --quiet
8379
- name: Perform CodeQL Analysis
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Code Lint - azclient
2+
3+
on:
4+
push:
5+
branches: [ master, 'release-**' ]
6+
paths:
7+
- 'pkg/azclient/**'
8+
pull_request:
9+
# The branches below must be a subset of the branches above
10+
branches: [ master, 'release-**' ]
11+
paths:
12+
- 'pkg/azclient/**'
13+
workflow_dispatch:
14+
15+
permissions:
16+
contents: read
17+
18+
jobs:
19+
Lint:
20+
permissions:
21+
contents: read # for actions/checkout to fetch code
22+
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
23+
checks: write
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Harden Runner
27+
uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0
28+
with:
29+
egress-policy: audit
30+
- name: Checkout
31+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
32+
- name: Setup Golang
33+
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
34+
with:
35+
go-version-file: 'pkg/azclient/go.mod'
36+
check-latest: true
37+
cache-dependency-path: |
38+
pkg/azclient/go.sum
39+
- name: golangci-lint
40+
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
41+
with:
42+
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
43+
version: v1.64
44+
args: -v
45+
verify: true

.github/workflows/lint.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,25 @@ name: Code Lint
33
on:
44
push:
55
branches: [ master, 'release-**' ]
6+
paths:
7+
- 'pkg/**.go'
8+
- 'cmd/**.go'
9+
- 'tests/**.go'
10+
- 'go.*'
11+
- 'hack/verify-updates.sh'
12+
- '!vendor/**'
13+
- '!pkg/azclient/**'
614
pull_request:
715
# The branches below must be a subset of the branches above
816
branches: [ master, 'release-**' ]
17+
paths:
18+
- 'pkg/**.go'
19+
- 'cmd/**.go'
20+
- 'tests/**.go'
21+
- 'go.*'
22+
- 'hack/verify-updates.sh'
23+
- '!vendor/**'
24+
- '!pkg/azclient/**'
925
workflow_dispatch:
1026

1127
permissions:
@@ -28,8 +44,10 @@ jobs:
2844
- name: Setup Golang
2945
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
3046
with:
31-
go-version: '1.23'
47+
go-version-file: 'go.mod'
3248
check-latest: true
49+
cache-dependency-path: |
50+
go.sum
3351
- name: golangci-lint
3452
uses: golangci/golangci-lint-action@2226d7cb06a077cd73e56eedd38eecad18e5d837 # v6.5.0
3553
with:

.github/workflows/release.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ jobs:
6868
- name: Setup Golang
6969
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
7070
with:
71-
go-version-file: go.mod
72-
cache: true
71+
go-version-file: 'go.mod'
72+
check-latest: true
73+
cache-dependency-path: |
74+
go.sum
7375
- name: Build binary for linux
7476
if: matrix.os == 'linux'
7577
run: |
@@ -120,7 +122,10 @@ jobs:
120122
- name: Setup Golang
121123
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
122124
with:
123-
go-version-file: go.mod
125+
go-version-file: 'go.mod'
126+
check-latest: true
127+
cache-dependency-path: |
128+
go.sum
124129
- name: Build binary for linux
125130
if: matrix.os == 'linux'
126131
run: |

.github/workflows/trivy.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ jobs:
4444
- name: Set up Go 1.x
4545
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
4646
with:
47-
go-version: '>=1.20'
47+
go-version-file: 'go.mod'
4848
check-latest: true
49+
cache-dependency-path: |
50+
go.sum
4951
id: go
5052
- name: Build images
5153
run: |

.github/workflows/update-vendor-license.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,10 @@ jobs:
4646
- name: Set up Go 1.x
4747
uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
4848
with:
49-
go-version: '>=1.20'
49+
go-version-file: 'go.mod'
5050
check-latest: true
51+
cache-dependency-path: |
52+
go.sum
5153
id: go
5254

5355
- name: Autobuild

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
# syntax=docker/dockerfile:1
1616

17-
FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.23.6-bookworm@sha256:02a6172539bd60b8a1f555301a21a2e248b3d957c9a46bbe18509edf2db47d13 AS builder
17+
FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.24.0-bookworm@sha256:612a91edb4ff7d4c0e5a51daa3e9f15ac6c16c255a5f7a84d08348b7b30d6f69 AS builder
1818

1919
ARG ENABLE_GIT_COMMAND=true
2020
ARG ARCH=amd64

cloud-node-manager.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.23.6-bookworm@sha256:02a6172539bd60b8a1f555301a21a2e248b3d957c9a46bbe18509edf2db47d13 AS builder
17+
FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.24-bookworm@sha256:612a91edb4ff7d4c0e5a51daa3e9f15ac6c16c255a5f7a84d08348b7b30d6f69 AS builder
1818

1919
ARG ENABLE_GIT_COMMAND=true
2020
ARG ARCH=amd64

cloudbuild.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ options:
88
substitution_option: ALLOW_LOOSE
99
steps:
1010
# gcb-docker-gcloud is published at https://testgrid.k8s.io/sig-testing-image-pushes#gcb-docker-gcloud
11-
- name: "gcr.io/k8s-staging-test-infra/gcb-docker-gcloud@sha256:4e830b673791d5595719bc6c4ca62dce3746b4e20d749e45004254bc6ef0a140" # v20250116-2a05ea7e3d
11+
- name: "gcr.io/k8s-staging-test-infra/gcb-docker-gcloud"
1212
entrypoint: make
1313
env:
1414
- TAG=${_GIT_TAG}

0 commit comments

Comments
 (0)