change registry address

This commit is contained in:
Jeff
2019-01-21 17:37:33 +08:00
parent 7e72365d86
commit da8ffc9474
2 changed files with 11 additions and 9 deletions

View File

@@ -1,31 +1,28 @@
sudo: required
services:
- docker
language: go
git:
depth: false
go:
- 1.10
- tip
go_import_path: kubesphere.io/kubesphere
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y install docker-ce
- dep ensure -v
before_script:
- docker --version
- dep ensure -v
script:
- make fmt-check && make build
deploy:
skip_cleanup: true
provider: script
script: bash install/scripts/docker_push
on:

View File

@@ -2,6 +2,9 @@
# Use of this source code is governed by a Apache license
# that can be found in the LICENSE file.
# The binary to build
BIN ?= kubesphere
TRAG.Org:=kubesphere
TRAG.Name:=ks-apiserver
TRAG.Gopkg:=kubesphere.io/kubesphere
@@ -12,6 +15,8 @@ RUN_IN_DOCKER:=docker run -it --rm -v `pwd`:/go/src/$(TRAG.Gopkg) -v `pwd`/tmp/c
GO_FMT:=goimports -l -w -e -local=kubesphere -srcdir=/go/src/$(TRAG.Gopkg)
GO_FILES:=./cmd ./pkg
REGISTRY ?= kubespheredev/ks-apiserver
define get_diff_files
$(eval DIFF_FILES=$(shell git diff --name-only --diff-filter=ad | grep -E "^(test|cmd|pkg)/.+\.go"))
endef
@@ -92,7 +97,7 @@ build: fmt
$(call get_build_flags)
$(RUN_IN_DOCKER) time go install -ldflags '$(BUILD_FLAG)' $(TRAG.Gopkg)/cmd/...
mv ./tmp/bin/cmd ./tmp/bin/$(TRAG.Name)
@docker build -t $(TRAG.Org)/$(TRAG.Name) -f ./Dockerfile.dev ./tmp
@docker build -t ${REGISTRY}/$(TRAG.Name) -f - ./tmp < ./Dockerfile.dev
@docker image prune -f 1>/dev/null 2>&1
@echo "build done"