feat(cicd) fix build_base_docker and prepare image

Signed-off-by: Ziming Zhang <zziming@vmware.com>
This commit is contained in:
Ziming Zhang 2020-03-19 22:11:57 +08:00 committed by Ziming
parent 1c29f39e93
commit bd2d3ecc81
3 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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
RUN pip3 install setuptools && pip3 install pipenv==2018.11.26

View File

@ -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