mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 10:15:35 +01:00
feat(cicd) use unified version as tag name, clean more
Signed-off-by: Ziming Zhang <zziming@vmware.com>
This commit is contained in:
parent
200c352c35
commit
695a2559be
13
Makefile
13
Makefile
@ -98,11 +98,8 @@ PREPARE_VERSION_NAME=versions
|
|||||||
|
|
||||||
#versions
|
#versions
|
||||||
REGISTRYVERSION=v2.7.1-patch-2819-2553
|
REGISTRYVERSION=v2.7.1-patch-2819-2553
|
||||||
NGINXVERSION=$(VERSIONTAG)
|
|
||||||
NOTARYVERSION=v0.6.1
|
NOTARYVERSION=v0.6.1
|
||||||
CLAIRVERSION=v2.1.1
|
CLAIRVERSION=v2.1.1
|
||||||
MIGRATORVERSION=$(VERSIONTAG)
|
|
||||||
REDISVERSION=$(VERSIONTAG)
|
|
||||||
NOTARYMIGRATEVERSION=v3.5.4
|
NOTARYMIGRATEVERSION=v3.5.4
|
||||||
CLAIRADAPTERVERSION=v1.0.1
|
CLAIRADAPTERVERSION=v1.0.1
|
||||||
TRIVYVERSION=v0.4.3
|
TRIVYVERSION=v0.4.3
|
||||||
@ -259,8 +256,8 @@ DOCKERSAVE_PARA=$(DOCKER_IMAGE_NAME_PREPARE):$(VERSIONTAG) \
|
|||||||
$(DOCKERIMAGENAME_DB):$(VERSIONTAG) \
|
$(DOCKERIMAGENAME_DB):$(VERSIONTAG) \
|
||||||
$(DOCKERIMAGENAME_JOBSERVICE):$(VERSIONTAG) \
|
$(DOCKERIMAGENAME_JOBSERVICE):$(VERSIONTAG) \
|
||||||
$(DOCKERIMAGENAME_REGCTL):$(VERSIONTAG) \
|
$(DOCKERIMAGENAME_REGCTL):$(VERSIONTAG) \
|
||||||
goharbor/redis-photon:$(REDISVERSION) \
|
goharbor/redis-photon:$(VERSIONTAG) \
|
||||||
goharbor/nginx-photon:$(NGINXVERSION) \
|
goharbor/nginx-photon:$(VERSIONTAG) \
|
||||||
goharbor/registry-photon:$(VERSIONTAG)
|
goharbor/registry-photon:$(VERSIONTAG)
|
||||||
|
|
||||||
PACKAGE_OFFLINE_PARA=-zcvf harbor-offline-installer-$(PKGVERSIONTAG).tgz \
|
PACKAGE_OFFLINE_PARA=-zcvf harbor-offline-installer-$(PKGVERSIONTAG).tgz \
|
||||||
@ -289,7 +286,7 @@ ifeq ($(TRIVYFLAG), true)
|
|||||||
DOCKERSAVE_PARA+= goharbor/trivy-adapter-photon:$(VERSIONTAG)
|
DOCKERSAVE_PARA+= goharbor/trivy-adapter-photon:$(VERSIONTAG)
|
||||||
endif
|
endif
|
||||||
ifeq ($(MIGRATORFLAG), true)
|
ifeq ($(MIGRATORFLAG), true)
|
||||||
DOCKERSAVE_PARA+= goharbor/harbor-migrator:$(MIGRATORVERSION)
|
DOCKERSAVE_PARA+= goharbor/harbor-migrator:$(VERSIONTAG)
|
||||||
endif
|
endif
|
||||||
# append chartmuseum parameters if set
|
# append chartmuseum parameters if set
|
||||||
ifeq ($(CHARTFLAG), true)
|
ifeq ($(CHARTFLAG), true)
|
||||||
@ -360,11 +357,11 @@ prepare: update_prepare_version
|
|||||||
|
|
||||||
build:
|
build:
|
||||||
make -f $(MAKEFILEPATH_PHOTON)/Makefile $(BUILDTARGET) -e DEVFLAG=$(DEVFLAG) -e GOBUILDIMAGE=$(GOBUILDIMAGE) \
|
make -f $(MAKEFILEPATH_PHOTON)/Makefile $(BUILDTARGET) -e DEVFLAG=$(DEVFLAG) -e GOBUILDIMAGE=$(GOBUILDIMAGE) \
|
||||||
-e REGISTRYVERSION=$(REGISTRYVERSION) -e REGISTRY_SRC_TAG=$(REGISTRY_SRC_TAG) -e NGINXVERSION=$(NGINXVERSION) \
|
-e REGISTRYVERSION=$(REGISTRYVERSION) -e REGISTRY_SRC_TAG=$(REGISTRY_SRC_TAG) \
|
||||||
-e NOTARYVERSION=$(NOTARYVERSION) -e NOTARYMIGRATEVERSION=$(NOTARYMIGRATEVERSION) \
|
-e NOTARYVERSION=$(NOTARYVERSION) -e NOTARYMIGRATEVERSION=$(NOTARYMIGRATEVERSION) \
|
||||||
-e TRIVYVERSION=$(TRIVYVERSION) -e TRIVYADAPTERVERSION=$(TRIVYADAPTERVERSION) \
|
-e TRIVYVERSION=$(TRIVYVERSION) -e TRIVYADAPTERVERSION=$(TRIVYADAPTERVERSION) \
|
||||||
-e CLAIRVERSION=$(CLAIRVERSION) -e CLAIRADAPTERVERSION=$(CLAIRADAPTERVERSION) -e VERSIONTAG=$(VERSIONTAG) \
|
-e CLAIRVERSION=$(CLAIRVERSION) -e CLAIRADAPTERVERSION=$(CLAIRADAPTERVERSION) -e VERSIONTAG=$(VERSIONTAG) \
|
||||||
-e BUILDBIN=$(BUILDBIN) -e REDISVERSION=$(REDISVERSION) -e MIGRATORVERSION=$(MIGRATORVERSION) \
|
-e BUILDBIN=$(BUILDBIN) \
|
||||||
-e CHARTMUSEUMVERSION=$(CHARTMUSEUMVERSION) -e DOCKERIMAGENAME_CHART_SERVER=$(DOCKERIMAGENAME_CHART_SERVER) \
|
-e CHARTMUSEUMVERSION=$(CHARTMUSEUMVERSION) -e DOCKERIMAGENAME_CHART_SERVER=$(DOCKERIMAGENAME_CHART_SERVER) \
|
||||||
-e NPM_REGISTRY=$(NPM_REGISTRY) -e BASEIMAGETAG=$(BASEIMAGETAG)
|
-e NPM_REGISTRY=$(NPM_REGISTRY) -e BASEIMAGETAG=$(BASEIMAGETAG)
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ _build_chart_server:
|
|||||||
|
|
||||||
_build_nginx:
|
_build_nginx:
|
||||||
@echo "building nginx container for photon..."
|
@echo "building nginx container for photon..."
|
||||||
@$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_NGINX)/$(DOCKERFILENAME_NGINX) -t $(DOCKERIMAGENAME_NGINX):$(NGINXVERSION) .
|
@$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_NGINX)/$(DOCKERFILENAME_NGINX) -t $(DOCKERIMAGENAME_NGINX):$(VERSIONTAG) .
|
||||||
@echo "Done."
|
@echo "Done."
|
||||||
|
|
||||||
_build_notary:
|
_build_notary:
|
||||||
@ -243,13 +243,13 @@ _build_registryctl:
|
|||||||
|
|
||||||
_build_redis:
|
_build_redis:
|
||||||
@echo "building redis container for photon..."
|
@echo "building redis container for photon..."
|
||||||
@$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_REDIS)/$(DOCKERFILENAME_REDIS) -t $(DOCKERIMAGENAME_REDIS):$(REDISVERSION) .
|
@$(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_REDIS)/$(DOCKERFILENAME_REDIS) -t $(DOCKERIMAGENAME_REDIS):$(VERSIONTAG) .
|
||||||
@echo "Done."
|
@echo "Done."
|
||||||
|
|
||||||
_build_migrator:
|
_build_migrator:
|
||||||
@if [ "$(MIGRATORFLAG)" = "true" ] ; then \
|
@if [ "$(MIGRATORFLAG)" = "true" ] ; then \
|
||||||
echo "building db migrator container for photon..."; \
|
echo "building db migrator container for photon..."; \
|
||||||
cd $(DOCKERFILEPATH_MIGRATOR) && $(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_MIGRATOR)/$(DOCKERFILENAME_MIGRATOR) -t $(DOCKERIMAGENAME_MIGRATOR):$(MIGRATORVERSION) . ; \
|
cd $(DOCKERFILEPATH_MIGRATOR) && $(DOCKERBUILD) --build-arg harbor_base_image_version=$(BASEIMAGETAG) -f $(DOCKERFILEPATH_MIGRATOR)/$(DOCKERFILENAME_MIGRATOR) -t $(DOCKERIMAGENAME_MIGRATOR):$(VERSIONTAG) . ; \
|
||||||
echo "Done."; \
|
echo "Done."; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -11,12 +11,6 @@ docker_compose_yml_path = '/compose_location/docker-compose.yml'
|
|||||||
def prepare_docker_compose(configs, with_clair, with_trivy, with_notary, with_chartmuseum):
|
def prepare_docker_compose(configs, with_clair, with_trivy, with_notary, with_chartmuseum):
|
||||||
versions = parse_versions()
|
versions = parse_versions()
|
||||||
VERSION_TAG = versions.get('VERSION_TAG') or 'dev'
|
VERSION_TAG = versions.get('VERSION_TAG') or 'dev'
|
||||||
REGISTRY_VERSION = versions.get('REGISTRY_VERSION') or 'v2.7.1-patch-2819-2553'
|
|
||||||
NOTARY_VERSION = versions.get('NOTARY_VERSION') or 'v0.6.1'
|
|
||||||
CLAIR_VERSION = versions.get('CLAIR_VERSION') or 'v2.0.9'
|
|
||||||
CLAIR_ADAPTER_VERSION = versions.get('CLAIR_ADAPTER_VERSION') or 'v1.0.0'
|
|
||||||
TRIVY_ADAPTER_VERSION = versions.get('TRIVY_ADAPTER_VERSION') or 'v0.2.3'
|
|
||||||
CHARTMUSEUM_VERSION = versions.get('CHARTMUSEUM_VERSION') or 'v0.9.0'
|
|
||||||
|
|
||||||
rendering_variables = {
|
rendering_variables = {
|
||||||
'version': VERSION_TAG,
|
'version': VERSION_TAG,
|
||||||
|
Loading…
Reference in New Issue
Block a user