Skip to content

Commit

Permalink
fix: use goharbor/golang 1.21.12
Browse files Browse the repository at this point in the history
Signed-off-by: Shengwen Yu <yshengwen@vmware.com>
  • Loading branch information
Shengwen Yu committed Jul 9, 2024
1 parent ac2ca43 commit 13cfaa9
Show file tree
Hide file tree
Showing 25 changed files with 39 additions and 39 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
- ubuntu-latest
timeout-minutes: 60
steps:
- name: Set up Go 1.22
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.22.5
go-version: 1.21.12
id: go
- name: setup Docker
uses: docker-practice/actions-setup-docker@master
Expand Down Expand Up @@ -95,10 +95,10 @@ jobs:
- ubuntu-latest
timeout-minutes: 60
steps:
- name: Set up Go 1.22
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.22.5
go-version: 1.21.12
id: go
- name: setup Docker
uses: docker-practice/actions-setup-docker@master
Expand Down Expand Up @@ -155,10 +155,10 @@ jobs:
- ubuntu-latest
timeout-minutes: 60
steps:
- name: Set up Go 1.22
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.22.5
go-version: 1.21.12
id: go
- name: setup Docker
uses: docker-practice/actions-setup-docker@master
Expand Down Expand Up @@ -213,10 +213,10 @@ jobs:
- ubuntu-latest
timeout-minutes: 60
steps:
- name: Set up Go 1.22
- name: Set up Go 1.21
uses: actions/setup-go@v1
with:
go-version: 1.22.5
go-version: 1.21.12
id: go
- name: setup Docker
uses: docker-practice/actions-setup-docker@master
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
with:
version: '285.0.0'
- run: gcloud info
- name: Set up Go 1.22
- name: Set up Go 1.21
uses: actions/setup-go@v4
with:
go-version: 1.22.5
go-version: 1.21.12
id: go
- name: Setup Docker
uses: docker-practice/actions-setup-docker@master
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Harbor backend is written in [Go](http://golang.org/). If you don't have a Harbo
| 1.7 | 1.9.2 |
| 1.8 | 1.11.2 |
| 1.9 | 1.12.12 |
| 1.10 | 1.22.5 |
| 1.10 | 1.21.12 |

Ensure your GOPATH and PATH have been configured in accordance with the Go environment instructions.

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# compile_golangimage:
# compile from golang image
# for example: make compile_golangimage -e GOBUILDIMAGE= \
# golang:1.22.5
# goharbor/golang:1.21.12
# compile_core, compile_jobservice: compile specific binary
#
# build: build Harbor docker images from photon baseimage
Expand Down Expand Up @@ -137,7 +137,7 @@ GOINSTALL=$(GOCMD) install
GOTEST=$(GOCMD) test
GODEP=$(GOTEST) -i
GOFMT=gofmt -w
GOVERSION=1.22.5
GOVERSION=1.21.12
GOBUILDIMAGE=goharbor/golang:$(GOVERSION)
PUSHGOIMAGE=false
GOBUILDPATH=/harbor
Expand Down
8 changes: 4 additions & 4 deletions docs/compile_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,25 @@ You can compile the code by one of the three approaches:
- Get official Golang image from docker hub:

```sh
$ docker pull goharbor/golang:1.22.5
$ docker pull goharbor/golang:1.21.12
```

- Build, install and bring up Harbor without Notary:

```sh
$ make install GOBUILDIMAGE=goharbor/golang:1.22.5 COMPILETAG=compile_golangimage
$ make install GOBUILDIMAGE=goharbor/golang:1.21.12 COMPILETAG=compile_golangimage
```

- Build, install and bring up Harbor with Notary:

```sh
$ make install GOBUILDIMAGE=golang:1.22.5 COMPILETAG=compile_golangimage NOTARYFLAG=true
$ make install GOBUILDIMAGE=goharbor/golang:1.21.12 COMPILETAG=compile_golangimage NOTARYFLAG=true
```

- Build, install and bring up Harbor with Clair:

```sh
$ make install GOBUILDIMAGE=golang:1.22.5 COMPILETAG=compile_golangimage CLAIRFLAG=true
$ make install GOBUILDIMAGE=goharbor/golang:1.21.12 COMPILETAG=compile_golangimage CLAIRFLAG=true
```

#### II. Compile code with your own Golang environment, then build Harbor
Expand Down
4 changes: 2 additions & 2 deletions docs/use_make.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ version | set harbor version
#### EXAMPLE:

#### Build and run harbor from source code.
make install GOBUILDIMAGE=goharbor/golang:1.22.5 COMPILETAG=compile_golangimage NOTARYFLAG=true
make install GOBUILDIMAGE=goharbor/golang:1.21.12 COMPILETAG=compile_golangimage NOTARYFLAG=true

### Package offline installer
make package_offline GOBUILDIMAGE=golang:1.22.5 COMPILETAG=compile_golangimage NOTARYFLAG=true
make package_offline GOBUILDIMAGE=goharbor/golang:1.21.12 COMPILETAG=compile_golangimage NOTARYFLAG=true

### Start harbor with notary
make -e NOTARYFLAG=true start
Expand Down
2 changes: 1 addition & 1 deletion make/photon/chartserver/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install -y shadow sudo >>/dev/null\
&& tdnf clean all \
Expand Down
2 changes: 1 addition & 1 deletion make/photon/clair-adapter/Dockerfile.binary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.5
FROM goharbor/golang:1.21.12

ADD . /go/src/github.com/goharbor/harbor-scanner-clair/
WORKDIR /go/src/github.com/goharbor/harbor-scanner-clair/
Expand Down
2 changes: 1 addition & 1 deletion make/photon/clair/Dockerfile.binary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.5
FROM goharbor/golang:1.21.12

ADD . /go/src/github.com/quay/clair/
WORKDIR /go/src/github.com/quay/clair/
Expand Down
2 changes: 1 addition & 1 deletion make/photon/core/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install sudo tzdata -y >> /dev/null \
&& tdnf clean all \
Expand Down
2 changes: 1 addition & 1 deletion make/photon/db/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

ENV PGDATA /var/lib/postgresql/data

Expand Down
2 changes: 1 addition & 1 deletion make/photon/jobservice/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install sudo tzdata -y >> /dev/null \
&& tdnf clean all \
Expand Down
2 changes: 1 addition & 1 deletion make/photon/log/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install -y cronie rsyslog logrotate shadow tar gzip sudo >> /dev/null\
&& mkdir /var/spool/rsyslog \
Expand Down
2 changes: 1 addition & 1 deletion make/photon/nginx/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install -y nginx shadow >> /dev/null \
&& tdnf clean all \
Expand Down
2 changes: 1 addition & 1 deletion make/photon/notary-server/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install -y shadow sudo \
&& tdnf clean all \
Expand Down
2 changes: 1 addition & 1 deletion make/photon/notary-signer/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install -y shadow sudo \
&& tdnf clean all \
Expand Down
2 changes: 1 addition & 1 deletion make/photon/portal/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install -y nginx shadow >> /dev/null \
&& tdnf clean all \
Expand Down
2 changes: 1 addition & 1 deletion make/photon/prepare/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install -y python3 \
&& tdnf install -y python3-pip python3-PyYAML python3-jinja2
Expand Down
2 changes: 1 addition & 1 deletion make/photon/redis/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install -y redis sudo
2 changes: 1 addition & 1 deletion make/photon/registry/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install sudo -y >> /dev/null\
&& tdnf clean all \
Expand Down
2 changes: 1 addition & 1 deletion make/photon/registry/Dockerfile.binary
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM goharbor/golang:1.22.5
FROM goharbor/golang:1.21.12

ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
ENV BUILDTAGS include_oss include_gcs
Expand Down
2 changes: 1 addition & 1 deletion make/photon/registryctl/Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM photon:5.0
FROM photon:4.0

RUN tdnf install sudo -y >> /dev/null \
&& tdnf clean all \
Expand Down
2 changes: 1 addition & 1 deletion src/go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/goharbor/harbor/src

go 1.22
go 1.21

replace github.com/goharbor/harbor => ../

Expand Down
2 changes: 1 addition & 1 deletion tests/ci/api_common_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ pip -V
#sudo apt-get update && sudo apt-get install -y --no-install-recommends libssl-dev && sudo apt-get autoremove -y && sudo rm -rf /var/lib/apt/lists/*
sudo wget https://bootstrap.pypa.io/get-pip.py && sudo python ./get-pip.py && sudo pip install --ignore-installed urllib3 chardet requests --upgrade
sudo make build_base_images -e BASEIMAGETAG=dev
sudo make install GOBUILDIMAGE=goharbor/golang:1.22.5 COMPILETAG=compile_golangimage CLARITYIMAGE=goharbor/harbor-clarity-ui-builder:1.6.0 NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true BUILDBIN=true PULL_BASE_FROM_DOCKERHUB=false
sudo make install GOBUILDIMAGE=goharbor/golang:1.21.12 COMPILETAG=compile_golangimage CLARITYIMAGE=goharbor/harbor-clarity-ui-builder:1.6.0 NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true BUILDBIN=true PULL_BASE_FROM_DOCKERHUB=false
sleep 10
4 changes: 2 additions & 2 deletions tests/ci/distro_installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

set -e

sudo make package_online VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=goharbor/golang:1.22.5 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true MIGRATORFLAG=false CHARTFLAG=true BUILDBIN=true HTTPPROXY=
sudo make package_offline VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=goharbor/golang:1.22.5 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true MIGRATORFLAG=false CHARTFLAG=true BUILDBIN=true HTTPPROXY=
sudo make package_online VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=goharbor/golang:1.21.12 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true MIGRATORFLAG=false CHARTFLAG=true BUILDBIN=true HTTPPROXY=
sudo make package_offline VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=goharbor/golang:1.21.12 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true MIGRATORFLAG=false CHARTFLAG=true BUILDBIN=true HTTPPROXY=

0 comments on commit 13cfaa9

Please sign in to comment.