mirror of
https://github.com/goharbor/harbor.git
synced 2024-12-22 16:48:30 +01:00
Bump up golang version to v1.13.4
Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
parent
4121545e46
commit
7b664f64f1
10
.travis.yml
10
.travis.yml
@ -1,23 +1,23 @@
|
|||||||
sudo: true
|
sudo: true
|
||||||
language: go
|
language: go
|
||||||
go:
|
go:
|
||||||
- 1.12.12
|
- 1.13.4
|
||||||
go_import_path: github.com/goharbor/harbor
|
go_import_path: github.com/goharbor/harbor
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
dist: trusty
|
dist: trusty
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- go: 1.12.12
|
- go: 1.13.4
|
||||||
env:
|
env:
|
||||||
- UTTEST=true
|
- UTTEST=true
|
||||||
- go: 1.12.12
|
- go: 1.13.4
|
||||||
env:
|
env:
|
||||||
- APITEST_DB=true
|
- APITEST_DB=true
|
||||||
- go: 1.12.12
|
- go: 1.13.4
|
||||||
env:
|
env:
|
||||||
- APITEST_LDAP=true
|
- APITEST_LDAP=true
|
||||||
- go: 1.12.12
|
- go: 1.13.4
|
||||||
env:
|
env:
|
||||||
- OFFLINE=true
|
- OFFLINE=true
|
||||||
- language: node_js
|
- language: node_js
|
||||||
|
@ -128,6 +128,8 @@ Harbor backend is written in [Go](http://golang.org/). If you don't have a Harbo
|
|||||||
| 1.7 | 1.9.2 |
|
| 1.7 | 1.9.2 |
|
||||||
| 1.8 | 1.11.2 |
|
| 1.8 | 1.11.2 |
|
||||||
| 1.9 | 1.12.12 |
|
| 1.9 | 1.12.12 |
|
||||||
|
| 1.10 | 1.12.12 |
|
||||||
|
| 1.11 | 1.13.4 |
|
||||||
|
|
||||||
Ensure your GOPATH and PATH have been configured in accordance with the Go environment instructions.
|
Ensure your GOPATH and PATH have been configured in accordance with the Go environment instructions.
|
||||||
|
|
||||||
|
4
Makefile
4
Makefile
@ -9,7 +9,7 @@
|
|||||||
# compile_golangimage:
|
# compile_golangimage:
|
||||||
# compile from golang image
|
# compile from golang image
|
||||||
# for example: make compile_golangimage -e GOBUILDIMAGE= \
|
# for example: make compile_golangimage -e GOBUILDIMAGE= \
|
||||||
# golang:1.12.12
|
# golang:1.13.4
|
||||||
# compile_core, compile_jobservice: compile specific binary
|
# compile_core, compile_jobservice: compile specific binary
|
||||||
#
|
#
|
||||||
# build: build Harbor docker images from photon baseimage
|
# build: build Harbor docker images from photon baseimage
|
||||||
@ -138,7 +138,7 @@ GOINSTALL=$(GOCMD) install
|
|||||||
GOTEST=$(GOCMD) test
|
GOTEST=$(GOCMD) test
|
||||||
GODEP=$(GOTEST) -i
|
GODEP=$(GOTEST) -i
|
||||||
GOFMT=gofmt -w
|
GOFMT=gofmt -w
|
||||||
GOBUILDIMAGE=golang:1.12.12
|
GOBUILDIMAGE=golang:1.13.4
|
||||||
GOBUILDPATH=/harbor
|
GOBUILDPATH=/harbor
|
||||||
|
|
||||||
# go build
|
# go build
|
||||||
|
@ -43,25 +43,25 @@ You can compile the code by one of the three approaches:
|
|||||||
- Get official Golang image from docker hub:
|
- Get official Golang image from docker hub:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ docker pull golang:1.12.12
|
$ docker pull golang:1.13.4
|
||||||
```
|
```
|
||||||
|
|
||||||
- Build, install and bring up Harbor without Notary:
|
- Build, install and bring up Harbor without Notary:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ make install GOBUILDIMAGE=golang:1.12.12 COMPILETAG=compile_golangimage
|
$ make install GOBUILDIMAGE=golang:1.13.4 COMPILETAG=compile_golangimage
|
||||||
```
|
```
|
||||||
|
|
||||||
- Build, install and bring up Harbor with Notary:
|
- Build, install and bring up Harbor with Notary:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ make install GOBUILDIMAGE=golang:1.12.12 COMPILETAG=compile_golangimage NOTARYFLAG=true
|
$ make install GOBUILDIMAGE=golang:1.13.4 COMPILETAG=compile_golangimage NOTARYFLAG=true
|
||||||
```
|
```
|
||||||
|
|
||||||
- Build, install and bring up Harbor with Clair:
|
- Build, install and bring up Harbor with Clair:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ make install GOBUILDIMAGE=golang:1.12.12 COMPILETAG=compile_golangimage CLAIRFLAG=true
|
$ make install GOBUILDIMAGE=golang:1.13.4 COMPILETAG=compile_golangimage CLAIRFLAG=true
|
||||||
```
|
```
|
||||||
|
|
||||||
#### II. Compile code with your own Golang environment, then build Harbor
|
#### II. Compile code with your own Golang environment, then build Harbor
|
||||||
|
@ -36,10 +36,10 @@ version | set harbor version
|
|||||||
#### EXAMPLE:
|
#### EXAMPLE:
|
||||||
|
|
||||||
#### Build and run harbor from source code.
|
#### Build and run harbor from source code.
|
||||||
make install GOBUILDIMAGE=golang:1.12.12 COMPILETAG=compile_golangimage NOTARYFLAG=true
|
make install GOBUILDIMAGE=golang:1.13.4 COMPILETAG=compile_golangimage NOTARYFLAG=true
|
||||||
|
|
||||||
### Package offline installer
|
### Package offline installer
|
||||||
make package_offline GOBUILDIMAGE=golang:1.12.12 COMPILETAG=compile_golangimage NOTARYFLAG=true
|
make package_offline GOBUILDIMAGE=golang:1.13.4 COMPILETAG=compile_golangimage NOTARYFLAG=true
|
||||||
|
|
||||||
### Start harbor with notary
|
### Start harbor with notary
|
||||||
make -e NOTARYFLAG=true start
|
make -e NOTARYFLAG=true start
|
||||||
|
@ -4,7 +4,7 @@ set +e
|
|||||||
|
|
||||||
usage(){
|
usage(){
|
||||||
echo "Usage: builder <golang image:version> <code path> <code release tag> <main.go path> <binary name>"
|
echo "Usage: builder <golang image:version> <code path> <code release tag> <main.go path> <binary name>"
|
||||||
echo "e.g: builder golang:1.11.2 github.com/helm/chartmuseum v0.9.0 cmd/chartmuseum chartm"
|
echo "e.g: builder golang:1.13.4 https://github.com/helm/chartmuseum v0.9.0 cmd/chartmuseum chartm"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.12.12
|
FROM golang:1.13.4
|
||||||
|
|
||||||
ADD . /go/src/github.com/goharbor/harbor-scanner-clair/
|
ADD . /go/src/github.com/goharbor/harbor-scanner-clair/
|
||||||
WORKDIR /go/src/github.com/goharbor/harbor-scanner-clair/
|
WORKDIR /go/src/github.com/goharbor/harbor-scanner-clair/
|
||||||
|
@ -23,7 +23,7 @@ TEMP=`mktemp -d ${TMPDIR-/tmp}/clair-adapter.XXXXXX`
|
|||||||
git clone https://github.com/goharbor/harbor-scanner-clair.git $TEMP
|
git clone https://github.com/goharbor/harbor-scanner-clair.git $TEMP
|
||||||
cd $TEMP; git checkout $VERSION; cd -
|
cd $TEMP; git checkout $VERSION; cd -
|
||||||
|
|
||||||
echo 'build the clair adapter binary bases on the golang:1.12.12'
|
echo 'build the clair adapter binary bases on the golang:1.13.4'
|
||||||
cp Dockerfile.binary $TEMP
|
cp Dockerfile.binary $TEMP
|
||||||
docker build -f $TEMP/Dockerfile.binary -t clair-adapter-golang $TEMP
|
docker build -f $TEMP/Dockerfile.binary -t clair-adapter-golang $TEMP
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.12.12
|
FROM golang:1.13.4
|
||||||
|
|
||||||
ADD . /go/src/github.com/coreos/clair/
|
ADD . /go/src/github.com/coreos/clair/
|
||||||
WORKDIR /go/src/github.com/coreos/clair/
|
WORKDIR /go/src/github.com/coreos/clair/
|
||||||
|
@ -23,7 +23,7 @@ TEMP=`mktemp -d /$TMPDIR/clair.XXXXXX`
|
|||||||
git clone https://github.com/coreos/clair.git $TEMP
|
git clone https://github.com/coreos/clair.git $TEMP
|
||||||
cd $TEMP; git checkout $VERSION; cd -
|
cd $TEMP; git checkout $VERSION; cd -
|
||||||
|
|
||||||
echo 'build the clair binary bases on the golang:1.12.12'
|
echo 'build the clair binary bases on the golang:1.13.4'
|
||||||
cp Dockerfile.binary $TEMP
|
cp Dockerfile.binary $TEMP
|
||||||
docker build -f $TEMP/Dockerfile.binary -t clair-golang $TEMP
|
docker build -f $TEMP/Dockerfile.binary -t clair-golang $TEMP
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.12.12
|
FROM golang:1.13.4
|
||||||
|
|
||||||
ARG NOTARY_VERSION
|
ARG NOTARY_VERSION
|
||||||
ARG MIGRATE_VERSION
|
ARG MIGRATE_VERSION
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.12.12
|
FROM golang:1.13.4
|
||||||
|
|
||||||
ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
|
ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
|
||||||
ENV BUILDTAGS include_oss include_gcs
|
ENV BUILDTAGS include_oss include_gcs
|
||||||
|
@ -24,5 +24,5 @@ sudo curl -o /home/travis/gopath/src/github.com/goharbor/harbor/tests/apitests/p
|
|||||||
sudo apt-get update && sudo apt-get install -y --no-install-recommends python-dev openjdk-7-jdk libssl-dev && sudo apt-get autoremove -y && sudo rm -rf /var/lib/apt/lists/*
|
sudo apt-get update && sudo apt-get install -y --no-install-recommends python-dev openjdk-7-jdk 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 && sudo pip install robotframework==3.0.4 robotframework-httplibrary requests dbbot robotframework-pabot --upgrade
|
sudo wget https://bootstrap.pypa.io/get-pip.py && sudo python ./get-pip.py && sudo pip install --ignore-installed urllib3 chardet requests && sudo pip install robotframework==3.0.4 robotframework-httplibrary requests dbbot robotframework-pabot --upgrade
|
||||||
sudo make swagger_client
|
sudo make swagger_client
|
||||||
sudo make install GOBUILDIMAGE=golang:1.12.12 COMPILETAG=compile_golangimage CLARITYIMAGE=goharbor/harbor-clarity-ui-builder:1.6.0 NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true
|
sudo make install GOBUILDIMAGE=golang:1.13.4 COMPILETAG=compile_golangimage CLARITYIMAGE=goharbor/harbor-clarity-ui-builder:1.6.0 NOTARYFLAG=true CLAIRFLAG=true CHARTFLAG=true
|
||||||
sleep 10
|
sleep 10
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
sudo make package_online VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.12.12 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true MIGRATORFLAG=false CHARTFLAG=true HTTPPROXY=
|
sudo make package_online VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.13.4 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true MIGRATORFLAG=false CHARTFLAG=true HTTPPROXY=
|
||||||
sudo make package_offline VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.12.12 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true MIGRATORFLAG=false CHARTFLAG=true HTTPPROXY=
|
sudo make package_offline VERSIONTAG=dev-travis PKGVERSIONTAG=dev-travis UIVERSIONTAG=dev-travis GOBUILDIMAGE=golang:1.13.4 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true MIGRATORFLAG=false CHARTFLAG=true HTTPPROXY=
|
||||||
|
Loading…
Reference in New Issue
Block a user