Skip to content

Commit

Permalink
Update dockerfiles to use go v1.22 (#2931)
Browse files Browse the repository at this point in the history
* update dockerfiles to use go v1.22

* more changes

* mod file update

* revert bpf-prog

* fix for e2e

* remove/update comment
  • Loading branch information
aggarwal0009 authored Aug 27, 2024
1 parent 0a47e17 commit 8359dbb
Show file tree
Hide file tree
Showing 21 changed files with 42 additions and 43 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VARIANT="1.21"
ARG VARIANT="1.22"
FROM mcr.microsoft.com/vscode/devcontainers/go:${VARIANT}
RUN apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
"VARIANT": "1.21-bullseye",
"VARIANT": "1.22-bullseye",
"NODE_VERSION": "none"
}
},
Expand Down
44 changes: 22 additions & 22 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ name: "CodeQL"
on:
push:
branches:
- master
- release/*
- master
- release/*
pull_request:
branches:
- master
- release/*
- master
- release/*
types:
- opened
- reopened
Expand All @@ -32,21 +32,21 @@ jobs:
contents: read
security-events: write
steps:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.21.0'
check-latest: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: ./codeql/
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: "1.22"
check-latest: true
- name: Checkout repository
uses: actions/checkout@v4
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
queries: ./codeql/
- name: Autobuild
uses: github/codeql-action/autobuild@v3
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
2 changes: 1 addition & 1 deletion .github/workflows/crdgen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
crdgen:
strategy:
matrix:
go-version: ['1.21']
go-version: ['1.21', '1.22']
os: [ubuntu-latest]
name: CRDs are Generated
runs-on: ${{ matrix.os }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: "^1.21"
go-version: "^1.22"

- name: Setup Kind
uses: engineerd/setup-kind@v0.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cyclonus-netpol-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:

- uses: actions/setup-go@v5
with:
go-version: '^1.21'
go-version: '^1.22'

- name: Setup Kind
uses: helm/kind-action@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: ['1.21.x']
go-version: ['1.21.x', '1.22.x']
os: [ubuntu-latest, windows-latest]
name: Lint
runs-on: ${{ matrix.os }}
Expand Down
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -824,9 +824,8 @@ RESTART_CASE ?= false
# CNI type is a key to direct the types of state validation done on a cluster.
CNI_TYPE ?= cilium

# COVER_FILTER omits folders with all files tagged with one of 'unit', '!ignore_uncovered', or '!ignore_autogenerated'
test-all: ## run all unit tests.
@$(eval COVER_FILTER=`go list --tags ignore_uncovered,ignore_autogenerated $(COVER_PKG)/... | tr '\n' ','`)
@$(eval COVER_FILTER=`go list $(COVER_PKG)/... | tr '\n' ','`)
@echo Test coverpkg: $(COVER_FILTER)
go test -mod=readonly -buildvcs=false -tags "unit" --skip 'TestE2E*' -coverpkg=$(COVER_FILTER) -race -covermode atomic -coverprofile=coverage.out $(COVER_PKG)/...

Expand Down
2 changes: 1 addition & 1 deletion azure-ipam/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Azure/azure-container-networking/azure-ipam

go 1.21
go 1.22

require (
github.com/Azure/azure-container-networking v1.5.21
Expand Down
2 changes: 1 addition & 1 deletion build/tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Azure/azure-container-networking/build/tools

go 1.21
go 1.22

require (
github.com/AlekSi/gocov-xml v1.1.0
Expand Down
2 changes: 1 addition & 1 deletion dropgz/build/linux.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ COPY --from=azure-vnet /azure-container-networking/azure-vnet-ipam pkg/embed/fs
RUN cd pkg/embed/fs/ && sha256sum * > sum.txt
RUN gzip --verbose --best --recursive pkg/embed/fs && for f in pkg/embed/fs/*.gz; do mv -- "$f" "${f%%.gz}"; done

FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS dropgz
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS dropgz
ARG VERSION
WORKDIR /dropgz
COPY --from=compressor /dropgz .
Expand Down
2 changes: 1 addition & 1 deletion dropgz/build/windows.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ COPY --from=azure-vnet /azure-container-networking/azure-vnet-telemetry.config p
RUN cd pkg/embed/fs/ && sha256sum * > sum.txt
RUN gzip --verbose --best --recursive pkg/embed/fs && for f in pkg/embed/fs/*.gz; do mv -- "$f" "${f%%.gz}"; done

FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS dropgz
FROM --platform=linux/${ARCH} mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS dropgz
ARG VERSION
WORKDIR /dropgz
COPY --from=compressor /dropgz .
Expand Down
2 changes: 1 addition & 1 deletion dropgz/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Azure/azure-container-networking/dropgz

go 1.21
go 1.22

require (
github.com/jsternberg/zap-logfmt v1.3.0
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/Azure/azure-container-networking

go 1.21
go 1.22

require (
github.com/Azure/azure-sdk-for-go/sdk/azcore v1.14.0
Expand Down
2 changes: 1 addition & 1 deletion hack/toolbox/Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build cns
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS builder
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS builder
# Build args
ARG VERSION
ARG CNS_AI_PATH
Expand Down
2 changes: 1 addition & 1 deletion hack/toolbox/server/Dockerfile.heavy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 as build
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 as build
ADD ./ /
WORKDIR /
RUN CGO_ENABLED=0 GOOS=linux go build -o server .
Expand Down
2 changes: 1 addition & 1 deletion hack/toolbox/server/Dockerfile.lite
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 as build
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 as build
ADD ./server/server.go /
ADD ./server/go.mod /
WORKDIR /
Expand Down
2 changes: 1 addition & 1 deletion npm/linux.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS builder
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS builder
ARG VERSION
ARG NPM_AI_PATH
ARG NPM_AI_ID
Expand Down
2 changes: 1 addition & 1 deletion npm/windows.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG OS_VERSION
FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.21 AS builder
FROM --platform=linux/amd64 mcr.microsoft.com/oss/go/microsoft/golang:1.22 AS builder
ARG VERSION
ARG NPM_AI_PATH
ARG NPM_AI_ID
Expand Down
2 changes: 1 addition & 1 deletion tools/acncli/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.21 as build
FROM mcr.microsoft.com/oss/go/microsoft/golang:1.22 as build
WORKDIR /go/src/github.com/Azure/azure-container-networking/
ARG VERSION
ADD . .
Expand Down
2 changes: 1 addition & 1 deletion zapai/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/Azure/azure-container-networking/zapai

go 1.21
go 1.22

require (
github.com/jsternberg/zap-logfmt v1.3.0
Expand Down

0 comments on commit 8359dbb

Please sign in to comment.