mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-29 21:54:13 +01:00
bump go1.20.7 on release-1.10.0 base on ph4 (#19206)
Signed-off-by: yminer <yminer@vmware.com> add GOFLAGS=-buildvcs=false upadate GO111MODULE=auto Signed-off-by: yminer <yminer@vmware.com> update ut_install set +e fix gofmt Signed-off-by: yminer <yminer@vmware.com> update ut_run.sh
This commit is contained in:
parent
31547ec593
commit
1788f8b75b
16
.github/workflows/CI.yml
vendored
16
.github/workflows/CI.yml
vendored
@ -29,10 +29,10 @@ jobs:
|
|||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.17
|
- name: Set up Go 1.20
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.9
|
go-version: 1.20.7
|
||||||
id: go
|
id: go
|
||||||
- name: setup Docker
|
- name: setup Docker
|
||||||
uses: docker-practice/actions-setup-docker@master
|
uses: docker-practice/actions-setup-docker@master
|
||||||
@ -95,10 +95,10 @@ jobs:
|
|||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.17
|
- name: Set up Go 1.20
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.9
|
go-version: 1.20.7
|
||||||
id: go
|
id: go
|
||||||
- name: setup Docker
|
- name: setup Docker
|
||||||
uses: docker-practice/actions-setup-docker@master
|
uses: docker-practice/actions-setup-docker@master
|
||||||
@ -155,10 +155,10 @@ jobs:
|
|||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.17
|
- name: Set up Go 1.20
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.9
|
go-version: 1.20.7
|
||||||
id: go
|
id: go
|
||||||
- name: setup Docker
|
- name: setup Docker
|
||||||
uses: docker-practice/actions-setup-docker@master
|
uses: docker-practice/actions-setup-docker@master
|
||||||
@ -213,10 +213,10 @@ jobs:
|
|||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
timeout-minutes: 60
|
timeout-minutes: 60
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.17
|
- name: Set up Go 1.20
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.9
|
go-version: 1.20.7
|
||||||
id: go
|
id: go
|
||||||
- name: setup Docker
|
- name: setup Docker
|
||||||
uses: docker-practice/actions-setup-docker@master
|
uses: docker-practice/actions-setup-docker@master
|
||||||
|
2
.github/workflows/build-package.yml
vendored
2
.github/workflows/build-package.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
|||||||
- name: Set up Go 1.17
|
- name: Set up Go 1.17
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: 1.17.9
|
go-version: 1.20.7
|
||||||
id: go
|
id: go
|
||||||
- name: Setup Docker
|
- name: Setup Docker
|
||||||
uses: docker-practice/actions-setup-docker@master
|
uses: docker-practice/actions-setup-docker@master
|
||||||
|
@ -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.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.17.9 |
|
| 1.10 | 1.20.7 |
|
||||||
|
|
||||||
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.
|
||||||
|
|
||||||
|
17
Makefile
17
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.17.9
|
# golang:1.20.7
|
||||||
# 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
|
||||||
@ -137,14 +137,16 @@ GOINSTALL=$(GOCMD) install
|
|||||||
GOTEST=$(GOCMD) test
|
GOTEST=$(GOCMD) test
|
||||||
GODEP=$(GOTEST) -i
|
GODEP=$(GOTEST) -i
|
||||||
GOFMT=gofmt -w
|
GOFMT=gofmt -w
|
||||||
GOBUILDIMAGE=golang:1.17.9
|
GOVERSION=1.20.7
|
||||||
|
GOBUILDIMAGE=goharbor/golang:$(GOVERSION)
|
||||||
|
PUSHGOIMAGE=false
|
||||||
GOBUILDPATH=/harbor
|
GOBUILDPATH=/harbor
|
||||||
|
|
||||||
# go build
|
# go build
|
||||||
PKG_PATH=github.com/goharbor/harbor/src/pkg
|
PKG_PATH=github.com/goharbor/harbor/src/pkg
|
||||||
GITCOMMIT := $(shell git rev-parse --short=8 HEAD)
|
GITCOMMIT := $(shell git rev-parse --short=8 HEAD)
|
||||||
RELEASEVERSION := $(shell cat VERSION)
|
RELEASEVERSION := $(shell cat VERSION)
|
||||||
GOFLAGS=
|
GOFLAGS="-buildvcs=false"
|
||||||
GOTAGS=$(if $(GOBUILDTAGS),-tags "$(GOBUILDTAGS)",)
|
GOTAGS=$(if $(GOBUILDTAGS),-tags "$(GOBUILDTAGS)",)
|
||||||
GOLDFLAGS=$(if $(GOBUILDLDFLAGS),--ldflags "-w -s $(GOBUILDLDFLAGS)",)
|
GOLDFLAGS=$(if $(GOBUILDLDFLAGS),--ldflags "-w -s $(GOBUILDLDFLAGS)",)
|
||||||
CORE_LDFLAGS=-X $(PKG_PATH)/version.GitCommit=$(GITCOMMIT) -X $(PKG_PATH)/version.ReleaseVersion=$(RELEASEVERSION)
|
CORE_LDFLAGS=-X $(PKG_PATH)/version.GitCommit=$(GITCOMMIT) -X $(PKG_PATH)/version.ReleaseVersion=$(RELEASEVERSION)
|
||||||
@ -384,6 +386,15 @@ package_offline: update_prepare_version compile build
|
|||||||
@rm -rf $(HARBORPKG)
|
@rm -rf $(HARBORPKG)
|
||||||
@echo "Done."
|
@echo "Done."
|
||||||
|
|
||||||
|
build_golang:
|
||||||
|
@echo "build goharbor/golang image"
|
||||||
|
$(DOCKERBUILD) --build-arg GOVERSION=$(GOVERSION) -f $(MAKEPATH)/photon/golang/Dockerfile -t $(GOBUILDIMAGE) .
|
||||||
|
@if [ "$(PUSHGOIMAGE)" = "true" ] ; then \
|
||||||
|
echo "push goharbor/golang image"; \
|
||||||
|
docker login -u $(REGISTRYUSER) -p $(REGISTRYPASSWORD) ; \
|
||||||
|
docker push $(GOBUILDIMAGE); \
|
||||||
|
fi; \
|
||||||
|
|
||||||
gosec:
|
gosec:
|
||||||
#go get github.com/securego/gosec/cmd/gosec
|
#go get github.com/securego/gosec/cmd/gosec
|
||||||
#go get github.com/dghubble/sling
|
#go get github.com/dghubble/sling
|
||||||
|
@ -43,13 +43,13 @@ 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.17.9
|
$ docker pull goharbor/golang:1.20.7
|
||||||
```
|
```
|
||||||
|
|
||||||
- Build, install and bring up Harbor without Notary:
|
- Build, install and bring up Harbor without Notary:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ make install GOBUILDIMAGE=golang:1.17.9 COMPILETAG=compile_golangimage
|
$ make install GOBUILDIMAGE=goharbor/golang:1.20.7 COMPILETAG=compile_golangimage
|
||||||
```
|
```
|
||||||
|
|
||||||
- Build, install and bring up Harbor with Notary:
|
- Build, install and bring up Harbor with Notary:
|
||||||
|
@ -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.17.9 COMPILETAG=compile_golangimage NOTARYFLAG=true
|
make install GOBUILDIMAGE=goharbor/golang:1.20.7 COMPILETAG=compile_golangimage NOTARYFLAG=true
|
||||||
|
|
||||||
### Package offline installer
|
### Package offline installer
|
||||||
make package_offline GOBUILDIMAGE=golang:1.17.9 COMPILETAG=compile_golangimage NOTARYFLAG=true
|
make package_offline GOBUILDIMAGE=golang:1.20.7 COMPILETAG=compile_golangimage NOTARYFLAG=true
|
||||||
|
|
||||||
### Start harbor with notary
|
### Start harbor with notary
|
||||||
make -e NOTARYFLAG=true start
|
make -e NOTARYFLAG=true start
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.17.9
|
FROM goharbor/golang:1.20.7
|
||||||
|
|
||||||
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
|
||||||
|
@ -84,6 +84,7 @@ func NewChartCache(config *ChartCacheConfig) *ChartCache {
|
|||||||
|
|
||||||
// IsEnabled to indicate if the chart cache is successfully enabled
|
// IsEnabled to indicate if the chart cache is successfully enabled
|
||||||
// The cache may be disabled if
|
// The cache may be disabled if
|
||||||
|
//
|
||||||
// user does not set
|
// user does not set
|
||||||
// wrong configurations
|
// wrong configurations
|
||||||
func (chc *ChartCache) IsEnabled() bool {
|
func (chc *ChartCache) IsEnabled() bool {
|
||||||
|
@ -539,7 +539,7 @@ func TestCountPull(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
func TestProjectExists(t *testing.T) {
|
func TestProjectExists(t *testing.T) {
|
||||||
var exists bool
|
var exists bool
|
||||||
var err error
|
var err error
|
||||||
exists, err = ProjectExists(currentProject.ProjectID)
|
exists, err = ProjectExists(currentProject.ProjectID)
|
||||||
@ -556,7 +556,7 @@ func TestProjectExists(t *testing.T) {
|
|||||||
if !exists {
|
if !exists {
|
||||||
t.Errorf("The project with name: %s, does not exist", currentProject.Name)
|
t.Errorf("The project with name: %s, does not exist", currentProject.Name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
func TestGetProjectById(t *testing.T) {
|
func TestGetProjectById(t *testing.T) {
|
||||||
id := currentProject.ProjectID
|
id := currentProject.ProjectID
|
||||||
|
@ -44,13 +44,16 @@ func (gc *GCAPI) Prepare() {
|
|||||||
|
|
||||||
// Post according to the request, it creates a cron schedule or a manual trigger for GC.
|
// Post according to the request, it creates a cron schedule or a manual trigger for GC.
|
||||||
// create a daily schedule for GC
|
// create a daily schedule for GC
|
||||||
|
//
|
||||||
// {
|
// {
|
||||||
// "schedule": {
|
// "schedule": {
|
||||||
// "type": "Daily",
|
// "type": "Daily",
|
||||||
// "cron": "0 0 0 * * *"
|
// "cron": "0 0 0 * * *"
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
//
|
||||||
// create a manual trigger for GC
|
// create a manual trigger for GC
|
||||||
|
//
|
||||||
// {
|
// {
|
||||||
// "schedule": {
|
// "schedule": {
|
||||||
// "type": "Manual"
|
// "type": "Manual"
|
||||||
@ -73,6 +76,7 @@ func (gc *GCAPI) Post() {
|
|||||||
|
|
||||||
// Put handles GC cron schedule update/delete.
|
// Put handles GC cron schedule update/delete.
|
||||||
// Request: delete the schedule of GC
|
// Request: delete the schedule of GC
|
||||||
|
//
|
||||||
// {
|
// {
|
||||||
// "schedule": {
|
// "schedule": {
|
||||||
// "type": "None",
|
// "type": "None",
|
||||||
|
@ -49,13 +49,16 @@ func (sc *ScanAllAPI) Prepare() {
|
|||||||
|
|
||||||
// Post according to the request, it creates a cron schedule or a manual trigger for scan all.
|
// Post according to the request, it creates a cron schedule or a manual trigger for scan all.
|
||||||
// create a daily schedule for scan all
|
// create a daily schedule for scan all
|
||||||
|
//
|
||||||
// {
|
// {
|
||||||
// "schedule": {
|
// "schedule": {
|
||||||
// "type": "Daily",
|
// "type": "Daily",
|
||||||
// "cron": "0 0 0 * * *"
|
// "cron": "0 0 0 * * *"
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
//
|
||||||
// create a manual trigger for scan all
|
// create a manual trigger for scan all
|
||||||
|
//
|
||||||
// {
|
// {
|
||||||
// "schedule": {
|
// "schedule": {
|
||||||
// "type": "Manual"
|
// "type": "Manual"
|
||||||
@ -75,6 +78,7 @@ func (sc *ScanAllAPI) Post() {
|
|||||||
|
|
||||||
// Put handles scan all cron schedule update/delete.
|
// Put handles scan all cron schedule update/delete.
|
||||||
// Request: delete the schedule of scan all
|
// Request: delete the schedule of scan all
|
||||||
|
//
|
||||||
// {
|
// {
|
||||||
// "schedule": {
|
// "schedule": {
|
||||||
// "type": "None",
|
// "type": "None",
|
||||||
|
@ -217,7 +217,6 @@ func (suite *ScannerAPITestSuite) TestScannerAPIUpdate() {
|
|||||||
assert.Equal(suite.T(), updated.UUID, rr.UUID)
|
assert.Equal(suite.T(), updated.UUID, rr.UUID)
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
func (suite *ScannerAPITestSuite) TestScannerAPIDelete() {
|
func (suite *ScannerAPITestSuite) TestScannerAPIDelete() {
|
||||||
r := &scanner.Registration{
|
r := &scanner.Registration{
|
||||||
ID: 1003,
|
ID: 1003,
|
||||||
|
@ -333,6 +333,7 @@ func CopyResp(rec *httptest.ResponseRecorder, rw http.ResponseWriter) {
|
|||||||
|
|
||||||
// PolicyChecker checks the policy of a project by project name, to determine if it's needed to check the image's status under this project.
|
// PolicyChecker checks the policy of a project by project name, to determine if it's needed to check the image's status under this project.
|
||||||
// TODO: The policy check related things should be moved to pkg package later
|
// TODO: The policy check related things should be moved to pkg package later
|
||||||
|
//
|
||||||
// and refactored to include the `check` capabilities, not just property getters.
|
// and refactored to include the `check` capabilities, not just property getters.
|
||||||
type PolicyChecker interface {
|
type PolicyChecker interface {
|
||||||
// contentTrustEnabled returns whether a project has enabled content trust.
|
// contentTrustEnabled returns whether a project has enabled content trust.
|
||||||
|
@ -128,8 +128,10 @@ func GetSweeper(context context.Context, sweeperOptions ...Option) (sweeper.Inte
|
|||||||
// loggerOptions ...Option : logger options
|
// loggerOptions ...Option : logger options
|
||||||
//
|
//
|
||||||
// If failed,
|
// If failed,
|
||||||
|
//
|
||||||
// configured but initialize failed: a nil log data getter and a non-nil error will be returned.
|
// configured but initialize failed: a nil log data getter and a non-nil error will be returned.
|
||||||
// no getter configured: a nil log data getter with a nil error are returned
|
// no getter configured: a nil log data getter with a nil error are returned
|
||||||
|
//
|
||||||
// Otherwise, a non nil log data getter is returned with nil error.
|
// Otherwise, a non nil log data getter is returned with nil error.
|
||||||
func GetLogDataGetter(loggerOptions ...Option) (getter.Interface, error) {
|
func GetLogDataGetter(loggerOptions ...Option) (getter.Interface, error) {
|
||||||
if len(loggerOptions) == 0 {
|
if len(loggerOptions) == 0 {
|
||||||
|
@ -24,6 +24,7 @@ import (
|
|||||||
|
|
||||||
// Controller provides the related operations for triggering scan.
|
// Controller provides the related operations for triggering scan.
|
||||||
// TODO: Here the artifact object is reused the v1 one which is sent to the adapter,
|
// TODO: Here the artifact object is reused the v1 one which is sent to the adapter,
|
||||||
|
//
|
||||||
// it should be pointed to the general artifact object in future once it's ready.
|
// it should be pointed to the general artifact object in future once it's ready.
|
||||||
type Controller interface {
|
type Controller interface {
|
||||||
// Scan the given artifact
|
// Scan the given artifact
|
||||||
|
@ -319,9 +319,11 @@ func UpdateTask(task *models.Task, props ...string) (int64, error) {
|
|||||||
// UpdateTaskStatus updates the status of task.
|
// UpdateTaskStatus updates the status of task.
|
||||||
// The implementation uses raw sql rather than QuerySetter.Filter... as QuerySetter
|
// The implementation uses raw sql rather than QuerySetter.Filter... as QuerySetter
|
||||||
// will generate sql like:
|
// will generate sql like:
|
||||||
|
//
|
||||||
// `UPDATE "replication_task" SET "end_time" = $1, "status" = $2
|
// `UPDATE "replication_task" SET "end_time" = $1, "status" = $2
|
||||||
// WHERE "id" IN ( SELECT T0."id" FROM "replication_task" T0 WHERE T0."id" = $3
|
// WHERE "id" IN ( SELECT T0."id" FROM "replication_task" T0 WHERE T0."id" = $3
|
||||||
// AND T0."status" IN ($4, $5, $6))]`
|
// AND T0."status" IN ($4, $5, $6))]`
|
||||||
|
//
|
||||||
// which is not a "single" sql statement, this will cause issues when running in concurrency
|
// which is not a "single" sql statement, this will cause issues when running in concurrency
|
||||||
func UpdateTaskStatus(id int64, status string, statusRevision int64, statusCondition ...string) (int64, error) {
|
func UpdateTaskStatus(id int64, status string, statusRevision int64, statusCondition ...string) (int64, error) {
|
||||||
params := []interface{}{}
|
params := []interface{}{}
|
||||||
|
@ -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 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 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 build_base_images -e BASEIMAGETAG=dev
|
||||||
sudo make install GOBUILDIMAGE=golang:1.17.9 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.20.7 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
|
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.17.9 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.20.7 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=golang:1.17.9 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.20.7 COMPILETAG=compile_golangimage NOTARYFLAG=true CLAIRFLAG=true MIGRATORFLAG=false CHARTFLAG=true BUILDBIN=true HTTPPROXY=
|
||||||
|
@ -3,15 +3,18 @@
|
|||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
sudo apt-get update && sudo apt-get install -y libldap2-dev
|
sudo apt-get update && sudo apt-get install -y libldap2-dev
|
||||||
|
sudo go env -w GO111MODULE=auto
|
||||||
go get -d github.com/docker/distribution
|
go get -d github.com/docker/distribution
|
||||||
go get -d github.com/docker/libtrust
|
go get -d github.com/docker/libtrust
|
||||||
go get -d github.com/lib/pq
|
go get -d github.com/lib/pq
|
||||||
go get golang.org/x/lint/golint
|
go get golang.org/x/lint/golint
|
||||||
go get github.com/GeertJohan/fgt
|
go get github.com/GeertJohan/fgt
|
||||||
go get github.com/dghubble/sling
|
go get github.com/dghubble/sling
|
||||||
|
set +e
|
||||||
go get golang.org/x/tools/cmd/cover
|
go get golang.org/x/tools/cmd/cover
|
||||||
go get github.com/mattn/goveralls
|
go get github.com/mattn/goveralls
|
||||||
go get -u github.com/client9/misspell/cmd/misspell
|
go get -u github.com/client9/misspell/cmd/misspell
|
||||||
|
set -e
|
||||||
sudo service postgresql stop || echo no postgresql need to be stopped
|
sudo service postgresql stop || echo no postgresql need to be stopped
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
|
@ -14,6 +14,5 @@ sleep 10
|
|||||||
docker ps
|
docker ps
|
||||||
|
|
||||||
DIR="$(cd "$(dirname "$0")" && pwd)"
|
DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||||
go test -race -i ./src/core ./src/jobservice
|
|
||||||
sudo -E env "PATH=$PATH" "POSTGRES_MIGRATION_SCRIPTS_PATH=$DIR/../../make/migrations/postgresql/" ./tests/coverage4gotest.sh
|
sudo -E env "PATH=$PATH" "POSTGRES_MIGRATION_SCRIPTS_PATH=$DIR/../../make/migrations/postgresql/" ./tests/coverage4gotest.sh
|
||||||
#goveralls -coverprofile=profile.cov -service=travis-ci || true
|
#goveralls -coverprofile=profile.cov -service=travis-ci || true
|
Loading…
Reference in New Issue
Block a user