add migrator into offline installer

This commit is contained in:
wangyan 2017-07-31 18:06:30 +08:00
parent 220e709530
commit 14d23b8a63

View File

@ -213,6 +213,10 @@ PUSHSCRIPTNAME=pushimage.sh
REGISTRYUSER=user REGISTRYUSER=user
REGISTRYPASSWORD=default REGISTRYPASSWORD=default
# migrator
MIGRATORVERSION=1.2
MIGRATORFLAG=false
# cmds # cmds
DOCKERSAVE_PARA=$(DOCKERIMAGENAME_ADMINSERVER):$(VERSIONTAG) \ DOCKERSAVE_PARA=$(DOCKERIMAGENAME_ADMINSERVER):$(VERSIONTAG) \
$(DOCKERIMAGENAME_UI):$(VERSIONTAG) \ $(DOCKERIMAGENAME_UI):$(VERSIONTAG) \
@ -248,6 +252,9 @@ ifeq ($(CLAIRFLAG), true)
PACKAGE_ONLINE_PARA+= $(HARBORPKG)/$(DOCKERCOMPOSECLAIRFILENAME) PACKAGE_ONLINE_PARA+= $(HARBORPKG)/$(DOCKERCOMPOSECLAIRFILENAME)
DOCKERCOMPOSE_LIST+= -f $(DOCKERCOMPOSEFILEPATH)/$(DOCKERCOMPOSECLAIRFILENAME) DOCKERCOMPOSE_LIST+= -f $(DOCKERCOMPOSEFILEPATH)/$(DOCKERCOMPOSECLAIRFILENAME)
endif endif
ifeq ($(MIGRATORFLAG), true)
DOCKERSAVE_PARA+= vmware/harbor-db-migrator:$(MIGRATORVERSION)
endif
version: version:
@printf $(GITTAGVERSION) > $(VERSIONFILEPATH)/$(VERSIONFILENAME); @printf $(GITTAGVERSION) > $(VERSIONFILEPATH)/$(VERSIONFILENAME);
@ -371,6 +378,10 @@ package_offline: compile build modify_sourcefiles modify_composefile
$(DOCKERPULL) vmware/clair:$(CLAIRVERSION); \ $(DOCKERPULL) vmware/clair:$(CLAIRVERSION); \
$(DOCKERPULL) vmware/postgresql:$(CLAIRDBVERSION); \ $(DOCKERPULL) vmware/postgresql:$(CLAIRDBVERSION); \
fi fi
@if [ "$(MIGRATORFLAG)" = "true" ] ; then \
echo "pulling DB migrator..."; \
$(DOCKERPULL) vmware/harbor-db-migrator:$(MIGRATORVERSION); \
fi
@echo "saving harbor docker image" @echo "saving harbor docker image"
@$(DOCKERSAVE) $(DOCKERSAVE_PARA) | gzip > $(HARBORPKG)/$(DOCKERIMGFILE).$(VERSIONTAG).tar.gz @$(DOCKERSAVE) $(DOCKERSAVE_PARA) | gzip > $(HARBORPKG)/$(DOCKERIMGFILE).$(VERSIONTAG).tar.gz