diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index da8aa2932e6..707aed03173 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -41,10 +41,10 @@ jobs: - ubuntu-latest timeout-minutes: 100 steps: - - name: Set up Go 1.22 + - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22.3 + go-version: 1.23.2 id: go - uses: actions/checkout@v3 with: @@ -102,10 +102,10 @@ jobs: - ubuntu-latest timeout-minutes: 100 steps: - - name: Set up Go 1.22 + - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22.3 + go-version: 1.23.2 id: go - uses: actions/checkout@v3 with: @@ -157,10 +157,10 @@ jobs: - ubuntu-latest timeout-minutes: 100 steps: - - name: Set up Go 1.22 + - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22.3 + go-version: 1.23.2 id: go - uses: actions/checkout@v3 with: @@ -212,10 +212,10 @@ jobs: - ubuntu-latest timeout-minutes: 100 steps: - - name: Set up Go 1.22 + - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22.3 + go-version: 1.23.2 id: go - uses: actions/checkout@v3 with: @@ -265,10 +265,10 @@ jobs: - ubuntu-latest timeout-minutes: 100 steps: - - name: Set up Go 1.22 + - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.22.3 + go-version: 1.23.2 id: go - uses: actions/checkout@v3 with: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index dabf434bbbf..fd5dea99345 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -142,30 +142,31 @@ The folder graph below shows the structure of the source code folder `harbor/src #### Go Harbor backend is written in [Go](http://golang.org/). If you don't have a Harbor backend service development environment, please [set one up](https://golang.org/doc/install). -| Harbor | Requires Go | -|----------|---------------| -| 1.1 | 1.7.3 | -| 1.2 | 1.7.3 | -| 1.3 | 1.9.2 | -| 1.4 | 1.9.2 | -| 1.5 | 1.9.2 | -| 1.6 | 1.9.2 | -| 1.7 | 1.9.2 | -| 1.8 | 1.11.2 | -| 1.9 | 1.12.12 | -| 1.10 | 1.12.12 | -| 2.0 | 1.13.15 | -| 2.1 | 1.14.13 | -| 2.2 | 1.15.6 | -| 2.3 | 1.15.12 | -| 2.4 | 1.17.7 | -| 2.5 | 1.17.7 | -| 2.6 | 1.18.6 | -| 2.7 | 1.19.4 | -| 2.8 | 1.20.6 | -| 2.9 | 1.21.3 | -| 2.10 | 1.21.8 | -| 2.11 | 1.22.3 | +| Harbor | Requires Go | +|--------|-------------| +| 1.1 | 1.7.3 | +| 1.2 | 1.7.3 | +| 1.3 | 1.9.2 | +| 1.4 | 1.9.2 | +| 1.5 | 1.9.2 | +| 1.6 | 1.9.2 | +| 1.7 | 1.9.2 | +| 1.8 | 1.11.2 | +| 1.9 | 1.12.12 | +| 1.10 | 1.12.12 | +| 2.0 | 1.13.15 | +| 2.1 | 1.14.13 | +| 2.2 | 1.15.6 | +| 2.3 | 1.15.12 | +| 2.4 | 1.17.7 | +| 2.5 | 1.17.7 | +| 2.6 | 1.18.6 | +| 2.7 | 1.19.4 | +| 2.8 | 1.20.6 | +| 2.9 | 1.21.3 | +| 2.10 | 1.21.8 | +| 2.11 | 1.22.3 | +| 2.12 | 1.23.2 | Ensure your GOPATH and PATH have been configured in accordance with the Go environment instructions. diff --git a/Makefile b/Makefile index a098f8d58f3..cf22a464b4b 100644 --- a/Makefile +++ b/Makefile @@ -142,7 +142,7 @@ GOINSTALL=$(GOCMD) install GOTEST=$(GOCMD) test GODEP=$(GOTEST) -i GOFMT=gofmt -w -GOBUILDIMAGE=golang:1.22.3 +GOBUILDIMAGE=golang:1.23.2 GOBUILDPATHINCONTAINER=/harbor # go build diff --git a/make/photon/registry/Dockerfile.binary b/make/photon/registry/Dockerfile.binary index 0098691bef3..cdc312e038d 100644 --- a/make/photon/registry/Dockerfile.binary +++ b/make/photon/registry/Dockerfile.binary @@ -1,4 +1,4 @@ -FROM golang:1.22.3 +FROM golang:1.23.2 ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution ENV BUILDTAGS include_oss include_gcs diff --git a/make/photon/trivy-adapter/Dockerfile.binary b/make/photon/trivy-adapter/Dockerfile.binary index bbfda2e93c3..7f036fb8541 100644 --- a/make/photon/trivy-adapter/Dockerfile.binary +++ b/make/photon/trivy-adapter/Dockerfile.binary @@ -1,4 +1,4 @@ -FROM golang:1.22.3 +FROM golang:1.23.2 ADD . /go/src/github.com/aquasecurity/harbor-scanner-trivy/ WORKDIR /go/src/github.com/aquasecurity/harbor-scanner-trivy/ diff --git a/make/photon/trivy-adapter/builder.sh b/make/photon/trivy-adapter/builder.sh index 31ae7e24534..54863657932 100755 --- a/make/photon/trivy-adapter/builder.sh +++ b/make/photon/trivy-adapter/builder.sh @@ -19,7 +19,7 @@ TEMP=$(mktemp -d ${TMPDIR-/tmp}/trivy-adapter.XXXXXX) git clone https://github.com/aquasecurity/harbor-scanner-trivy.git $TEMP cd $TEMP; git checkout $VERSION; cd - -echo "Building Trivy adapter binary based on golang:1.22.3..." +echo "Building Trivy adapter binary based on golang:1.23.2..." cp Dockerfile.binary $TEMP docker build -f $TEMP/Dockerfile.binary -t trivy-adapter-golang $TEMP diff --git a/src/go.mod b/src/go.mod index 5aa9ae6fd01..3a4bd4a6767 100644 --- a/src/go.mod +++ b/src/go.mod @@ -1,6 +1,6 @@ module github.com/goharbor/harbor/src -go 1.22.3 +go 1.23.2 require ( github.com/FZambia/sentinel v1.1.0 diff --git a/tests/ci/distro_installer.sh b/tests/ci/distro_installer.sh index cab510c9d4c..015e23f06e3 100755 --- a/tests/ci/distro_installer.sh +++ b/tests/ci/distro_installer.sh @@ -3,5 +3,5 @@ set -x set -e -sudo make package_online GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-gitaction PKGVERSIONTAG=dev-gitaction UIVERSIONTAG=dev-gitaction GOBUILDIMAGE=golang:1.22.3 COMPILETAG=compile_golangimage TRIVYFLAG=true HTTPPROXY= PULL_BASE_FROM_DOCKERHUB=false -sudo make package_offline GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-gitaction PKGVERSIONTAG=dev-gitaction UIVERSIONTAG=dev-gitaction GOBUILDIMAGE=golang:1.22.3 COMPILETAG=compile_golangimage TRIVYFLAG=true HTTPPROXY= PULL_BASE_FROM_DOCKERHUB=false +sudo make package_online GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-gitaction PKGVERSIONTAG=dev-gitaction UIVERSIONTAG=dev-gitaction GOBUILDIMAGE=golang:1.23.2 COMPILETAG=compile_golangimage TRIVYFLAG=true HTTPPROXY= PULL_BASE_FROM_DOCKERHUB=false +sudo make package_offline GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-gitaction PKGVERSIONTAG=dev-gitaction UIVERSIONTAG=dev-gitaction GOBUILDIMAGE=golang:1.23.2 COMPILETAG=compile_golangimage TRIVYFLAG=true HTTPPROXY= PULL_BASE_FROM_DOCKERHUB=false