From bd2d3ecc81b44ee828019e26ea17c8ebc22b0e3c Mon Sep 17 00:00:00 2001 From: Ziming Zhang Date: Thu, 19 Mar 2020 22:11:57 +0800 Subject: [PATCH] feat(cicd) fix build_base_docker and prepare image Signed-off-by: Ziming Zhang --- Makefile | 5 +++-- make/photon/prepare/Dockerfile.base | 2 +- tests/integration.sh | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index ab41d0dc6..e851c088b 100644 --- a/Makefile +++ b/Makefile @@ -326,9 +326,10 @@ build: build_base_docker: @for name in chartserver clair clair-adapter core db jobservice log nginx notary-server notary-signer portal prepare redis registry registryctl; do \ echo $$name ; \ - $(DOCKERBUILD) --pull -f $(MAKEFILEPATH_PHOTON)/$$name/Dockerfile.base -t goharbor/harbor-$$name-base:$(BASEIMAGETAG) . ; \ - $(PUSHSCRIPTPATH)/$(PUSHSCRIPTNAME) goharbor/harbor-$$name-base:$(BASEIMAGETAG) $(REGISTRYUSER) $(REGISTRYPASSWORD) ; \ + $(DOCKERBUILD) --pull -f $(MAKEFILEPATH_PHOTON)/$$name/Dockerfile.base -t goharbor/harbor-$$name-base:$(BASEIMAGETAG) . && \ + $(PUSHSCRIPTPATH)/$(PUSHSCRIPTNAME) goharbor/harbor-$$name-base:$(BASEIMAGETAG) $(REGISTRYUSER) $(REGISTRYPASSWORD) || exit 1 \ done + @echo build_base_docker done install: compile build prepare start diff --git a/make/photon/prepare/Dockerfile.base b/make/photon/prepare/Dockerfile.base index 7ebe37c73..e01048a6f 100644 --- a/make/photon/prepare/Dockerfile.base +++ b/make/photon/prepare/Dockerfile.base @@ -2,4 +2,4 @@ FROM photon:2.0 RUN tdnf install -y python3 \ && tdnf install -y python3-pip -RUN pip3 install pipenv==2018.11.26 \ No newline at end of file +RUN pip3 install setuptools && pip3 install pipenv==2018.11.26 \ No newline at end of file diff --git a/tests/integration.sh b/tests/integration.sh index 4b63128e5..46c8742ee 100755 --- a/tests/integration.sh +++ b/tests/integration.sh @@ -95,7 +95,7 @@ export NPM_REGISTRY=$NPM_REGISTRY # release branch must have their own base image with branch name, master and others will use the dev as base. if [[ $DRONE_BRANCH == "release-"* ]]; then - Harbor_Build_Base_Tag=$DRONE_BRANCH + Harbor_Build_Base_Tag=$target_release_version else Harbor_Build_Base_Tag=dev fi