mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 02:05:41 +01:00
build base image in CI (#12750)
In git action, use the local build base images instead of pulling from docker hub. Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
parent
da52e677e5
commit
60427e7187
5
Makefile
5
Makefile
@ -90,6 +90,7 @@ GEN_TLS=
|
||||
# for docker image tag
|
||||
VERSIONTAG=dev
|
||||
# for base docker image tag
|
||||
PUSHBASEIMAGE=
|
||||
BASEIMAGETAG=dev
|
||||
BASEIMAGENAMESPACE=goharbor
|
||||
# for harbor package name
|
||||
@ -422,7 +423,9 @@ build_base_docker:
|
||||
@for name in chartserver clair clair-adapter trivy-adapter core db jobservice log nginx notary-server notary-signer portal prepare redis registry registryctl; do \
|
||||
echo $$name ; \
|
||||
$(DOCKERBUILD) --pull --no-cache -f $(MAKEFILEPATH_PHOTON)/$$name/Dockerfile.base -t $(BASEIMAGENAMESPACE)/harbor-$$name-base:$(BASEIMAGETAG) --label base-build-date=$(date +"%Y%m%d") . && \
|
||||
$(PUSHSCRIPTPATH)/$(PUSHSCRIPTNAME) $(BASEIMAGENAMESPACE)/harbor-$$name-base:$(BASEIMAGETAG) $(REGISTRYUSER) $(REGISTRYPASSWORD) || exit 1; \
|
||||
if [ -n "$(PUSHBASEIMAGE)" ] ; then \
|
||||
$(PUSHSCRIPTPATH)/$(PUSHSCRIPTNAME) $(BASEIMAGENAMESPACE)/harbor-$$name-base:$(BASEIMAGETAG) $(REGISTRYUSER) $(REGISTRYPASSWORD) || exit 1; \
|
||||
fi ; \
|
||||
done
|
||||
|
||||
pull_base_docker:
|
||||
|
@ -30,7 +30,7 @@ if [ $GITHUB_TOKEN ];
|
||||
then
|
||||
sed "s/# github_token: xxx/github_token: $GITHUB_TOKEN/" -i make/harbor.yml
|
||||
fi
|
||||
sudo make compile build prepare COMPILETAG=compile_golangimage GOBUILDTAGS="include_oss include_gcs" NOTARYFLAG=true CLAIRFLAG=true TRIVYFLAG=true CHARTFLAG=true GEN_TLS=true
|
||||
sudo make build_base_docker compile build prepare COMPILETAG=compile_golangimage GOBUILDTAGS="include_oss include_gcs" NOTARYFLAG=true CLAIRFLAG=true TRIVYFLAG=true CHARTFLAG=true GEN_TLS=true
|
||||
|
||||
# set the debugging env
|
||||
echo "GC_TIME_WINDOW_HOURS=0" | sudo tee -a ./make/common/config/core/env
|
||||
|
Loading…
Reference in New Issue
Block a user