update go version to 1.14.13 (#13938)

1, update go version to v1.14.13
2, build binary per PR instead of fetching from storage

Signed-off-by: Wang Yan <wangyan@vmware.com>
This commit is contained in:
Wang Yan 2021-01-08 19:27:18 +08:00 committed by GitHub
parent de5445a894
commit b0b19f52d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 27 additions and 27 deletions

View File

@ -32,7 +32,7 @@ jobs:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14.7
go-version: 1.14.13
id: go
- name: setup Docker
uses: docker-practice/actions-setup-docker@0.0.1
@ -98,7 +98,7 @@ jobs:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14.7
go-version: 1.14.13
id: go
- name: setup Docker
uses: docker-practice/actions-setup-docker@0.0.1
@ -158,7 +158,7 @@ jobs:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14.7
go-version: 1.14.13
id: go
- name: setup Docker
uses: docker-practice/actions-setup-docker@0.0.1
@ -218,7 +218,7 @@ jobs:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14.7
go-version: 1.14.13
id: go
- name: setup Docker
uses: docker-practice/actions-setup-docker@0.0.1
@ -276,7 +276,7 @@ jobs:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14.7
go-version: 1.14.13
id: go
- name: setup Docker
uses: docker-practice/actions-setup-docker@0.0.1

View File

@ -29,7 +29,7 @@ jobs:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14.7
go-version: 1.14.13
id: go
- name: setup Docker
uses: docker-practice/actions-setup-docker@0.0.1
@ -75,8 +75,8 @@ jobs:
fi
cd src/github.com/goharbor/harbor
sudo make package_offline GOBUILDTAGS="include_oss include_gcs" BASEIMAGETAG=${Harbor_Build_Base_Tag} VERSIONTAG=${Harbor_Assets_Version} PKGVERSIONTAG=${Harbor_Package_Version} NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY=
sudo make package_online GOBUILDTAGS="include_oss include_gcs" BASEIMAGETAG=${Harbor_Build_Base_Tag} VERSIONTAG=${Harbor_Assets_Version} PKGVERSIONTAG=${Harbor_Package_Version} NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY=
sudo make package_offline GOBUILDTAGS="include_oss include_gcs" BASEIMAGETAG=${Harbor_Build_Base_Tag} VERSIONTAG=${Harbor_Assets_Version} PKGVERSIONTAG=${Harbor_Package_Version} BUILDBIN=true NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY=
sudo make package_online GOBUILDTAGS="include_oss include_gcs" BASEIMAGETAG=${Harbor_Build_Base_Tag} VERSIONTAG=${Harbor_Assets_Version} PKGVERSIONTAG=${Harbor_Package_Version} BUILDBIN=true NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY=
harbor_offline_build_bundle=$(basename harbor-offline-installer-*.tgz)
harbor_online_build_bundle=$(basename harbor-online-installer-*.tgz)
echo "Package name is: $harbor_offline_build_bundle"

View File

@ -29,7 +29,7 @@ jobs:
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14.7
go-version: 1.14.13
id: go
- name: setup Docker
uses: docker-practice/actions-setup-docker@0.0.1

View File

@ -158,7 +158,7 @@ Harbor backend is written in [Go](http://golang.org/). If you don't have a Harbo
| 1.9 | 1.12.12 |
| 1.10 | 1.12.12 |
| 2.0 | 1.13.15 |
| 2.1 | 1.14.7 |
| 2.1 | 1.14.13 |
Ensure your GOPATH and PATH have been configured in accordance with the Go environment instructions.

View File

@ -9,7 +9,7 @@
# compile_golangimage:
# compile from golang image
# for example: make compile_golangimage -e GOBUILDIMAGE= \
# golang:1.14.7
# golang:1.14.13
# compile_core, compile_jobservice: compile specific binary
#
# build: build Harbor docker images from photon baseimage
@ -154,7 +154,7 @@ GOINSTALL=$(GOCMD) install
GOTEST=$(GOCMD) test
GODEP=$(GOTEST) -i
GOFMT=gofmt -w
GOBUILDIMAGE=golang:1.14.7
GOBUILDIMAGE=golang:1.14.13
GOBUILDPATHINCONTAINER=/harbor
# go build

View File

@ -263,7 +263,7 @@ define _get_binary
$(CURL) --connect-timeout 30 -f -k -L $1 -o $2 || exit 1
endef
build: _build_prepare _build_db _build_portal _build_core _build_jobservice _build_log _build_nginx _build_registry _build_registryctl _build_notary _build_clair _build_clair_adapter _build_trivy_adapter _build_redis _build_chart_server
build: _build_chart_server _build_notary _build_clair _build_prepare _build_db _build_portal _build_core _build_jobservice _build_log _build_nginx _build_registry _build_registryctl _build_clair_adapter _build_trivy_adapter _build_redis
cleanimage:
@echo "cleaning image for photon..."

View File

@ -4,7 +4,7 @@ set +e
usage(){
echo "Usage: builder <golang image:version> <code path> <code release tag> <main.go path> <binary name>"
echo "e.g: builder golang:1.14.7 github.com/helm/chartmuseum v0.12.0 cmd/chartmuseum chartm"
echo "e.g: builder golang:1.14.13 github.com/helm/chartmuseum v0.12.0 cmd/chartmuseum chartm"
exit 1
}
@ -28,7 +28,7 @@ rm -rf binary/$BIN_NAME || true
cp compile.sh binary/
cp *.patch binary/
docker run -it --rm -v $cur/binary:/go/bin --name golang_code_builder $GOLANG_IMAGE /bin/bash /go/bin/compile.sh $GIT_PATH $CODE_VERSION $MAIN_GO_PATH $BIN_NAME
docker run -i --rm -v $cur/binary:/go/bin --name golang_code_builder $GOLANG_IMAGE /bin/bash /go/bin/compile.sh $GIT_PATH $CODE_VERSION $MAIN_GO_PATH $BIN_NAME
#Clear
#docker rm -f golang_code_builder

View File

@ -1,4 +1,4 @@
FROM golang:1.14.7
FROM golang:1.14.13
ARG VERSION
ARG COMMIT

View File

@ -23,7 +23,7 @@ TEMP=$(mktemp -d ${TMPDIR-/tmp}/clair-adapter.XXXXXX)
git clone https://github.com/goharbor/harbor-scanner-clair.git $TEMP
cd $TEMP; git checkout $VERSION; export COMMIT=$(git rev-list -1 HEAD); cd -
echo "Building Clair adapter binary based on golang:1.14.7..."
echo "Building Clair adapter binary based on golang:1.14.13..."
cp Dockerfile.binary $TEMP
docker build --build-arg VERSION=${VERSION} --build-arg COMMIT=${COMMIT} -f $TEMP/Dockerfile.binary -t clair-adapter-golang $TEMP

View File

@ -1,4 +1,4 @@
FROM golang:1.14.7
FROM golang:1.14.13
ADD . /go/src/github.com/quay/clair/
WORKDIR /go/src/github.com/quay/clair/

View File

@ -22,7 +22,7 @@ cur=$PWD
TEMP=`mktemp -d /$TMPDIR/clair.XXXXXX`
git clone -b $VERSION --single-branch https://github.com/quay/clair.git $TEMP
echo 'build the clair binary bases on the golang:1.14.7'
echo 'build the clair binary bases on the golang:1.14.13'
cp Dockerfile.binary $TEMP
docker build -f $TEMP/Dockerfile.binary -t clair-golang $TEMP

View File

@ -1,4 +1,4 @@
FROM golang:1.14.7
FROM golang:1.14.13
ARG NOTARY_VERSION
ARG MIGRATE_VERSION

View File

@ -1,4 +1,4 @@
FROM golang:1.14.7
FROM golang:1.14.13
ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
ENV BUILDTAGS include_oss include_gcs

View File

@ -1,4 +1,4 @@
FROM golang:1.14.7
FROM golang:1.14.13
ADD . /go/src/github.com/aquasecurity/harbor-scanner-trivy/
WORKDIR /go/src/github.com/aquasecurity/harbor-scanner-trivy/

View File

@ -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.14.7..."
echo "Building Trivy adapter binary based on golang:1.14.13..."
cp Dockerfile.binary $TEMP
docker build -f $TEMP/Dockerfile.binary -t trivy-adapter-golang $TEMP

View File

@ -22,7 +22,7 @@ then
sed "s/# github_token: xxx/github_token: $GITHUB_TOKEN/" -i make/harbor.yml
fi
sudo make build_base_docker compile build prepare COMPILETAG=compile_golangimage GOBUILDTAGS="include_oss include_gcs" NOTARYFLAG=true CLAIRFLAG=true TRIVYFLAG=true CHARTFLAG=true GEN_TLS=true
sudo make build_base_docker compile build prepare COMPILETAG=compile_golangimage GOBUILDTAGS="include_oss include_gcs" BUILDBIN=true NOTARYFLAG=true CLAIRFLAG=true TRIVYFLAG=true CHARTFLAG=true GEN_TLS=true
# set the debugging env
echo "GC_TIME_WINDOW_HOURS=0" | sudo tee -a ./make/common/config/core/env

View File

@ -3,5 +3,5 @@ set -x
set -e
sudo make package_online GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.14.7 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY=
sudo make package_offline GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.14.7 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY=
sudo make package_online GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.14.13 COMPILETAG=compile_golangimage BUILDBIN=true NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY=
sudo make package_offline GOBUILDTAGS="include_oss include_gcs" VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.14.13 COMPILETAG=compile_golangimage BUILDBIN=true NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true TRIVYFLAG=true HTTPPROXY=

View File

@ -1,4 +1,4 @@
FROM golang:1.14.7
FROM golang:1.14.13
ARG SWAGGER_VERSION
RUN curl -fsSL -o /usr/bin/swagger https://github.com/go-swagger/go-swagger/releases/download/$SWAGGER_VERSION/swagger_linux_amd64 && chmod +x /usr/bin/swagger