mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 02:05:41 +01:00
make distribution_src configurable (#20769)
Signed-off-by: yminer <yminer@vmware.com>
This commit is contained in:
parent
a4671ee008
commit
2dd029e702
4
Makefile
4
Makefile
@ -109,6 +109,8 @@ TRIVYADAPTERVERSION=v0.31.2
|
|||||||
|
|
||||||
# version of registry for pulling the source code
|
# version of registry for pulling the source code
|
||||||
REGISTRY_SRC_TAG=v2.8.3
|
REGISTRY_SRC_TAG=v2.8.3
|
||||||
|
# source of upstream distribution code
|
||||||
|
DISTRIBUTION_SRC=https://github.com/distribution/distribution.git
|
||||||
|
|
||||||
# dependency binaries
|
# dependency binaries
|
||||||
REGISTRYURL=https://storage.googleapis.com/harbor-builds/bin/registry/release-${REGISTRYVERSION}/registry
|
REGISTRYURL=https://storage.googleapis.com/harbor-builds/bin/registry/release-${REGISTRYVERSION}/registry
|
||||||
@ -388,7 +390,7 @@ build:
|
|||||||
exit 1; \
|
exit 1; \
|
||||||
fi
|
fi
|
||||||
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 REGISTRYVERSION=$(REGISTRYVERSION) -e REGISTRY_SRC_TAG=$(REGISTRY_SRC_TAG) -e DISTRIBUTION_SRC=$(DISTRIBUTION_SRC)\
|
||||||
-e TRIVYVERSION=$(TRIVYVERSION) -e TRIVYADAPTERVERSION=$(TRIVYADAPTERVERSION) \
|
-e TRIVYVERSION=$(TRIVYVERSION) -e TRIVYADAPTERVERSION=$(TRIVYADAPTERVERSION) \
|
||||||
-e VERSIONTAG=$(VERSIONTAG) \
|
-e VERSIONTAG=$(VERSIONTAG) \
|
||||||
-e BUILDBIN=$(BUILDBIN) \
|
-e BUILDBIN=$(BUILDBIN) \
|
||||||
|
@ -178,7 +178,7 @@ _build_registry:
|
|||||||
rm -rf $(DOCKERFILEPATH_REG)/binary && mkdir -p $(DOCKERFILEPATH_REG)/binary && \
|
rm -rf $(DOCKERFILEPATH_REG)/binary && mkdir -p $(DOCKERFILEPATH_REG)/binary && \
|
||||||
$(call _get_binary, $(REGISTRYURL), $(DOCKERFILEPATH_REG)/binary/registry); \
|
$(call _get_binary, $(REGISTRYURL), $(DOCKERFILEPATH_REG)/binary/registry); \
|
||||||
else \
|
else \
|
||||||
cd $(DOCKERFILEPATH_REG) && $(DOCKERFILEPATH_REG)/builder $(REGISTRY_SRC_TAG) && cd - ; \
|
cd $(DOCKERFILEPATH_REG) && $(DOCKERFILEPATH_REG)/builder $(REGISTRY_SRC_TAG) $(DISTRIBUTION_SRC) && cd - ; \
|
||||||
fi
|
fi
|
||||||
@echo "building registry container for photon..."
|
@echo "building registry container for photon..."
|
||||||
@chmod 655 $(DOCKERFILEPATH_REG)/binary/registry && $(DOCKERBUILD_WITH_PULL_PARA) --build-arg harbor_base_image_version=$(BASEIMAGETAG) --build-arg harbor_base_namespace=$(BASEIMAGENAMESPACE) -f $(DOCKERFILEPATH_REG)/$(DOCKERFILENAME_REG) -t $(DOCKERIMAGENAME_REG):$(VERSIONTAG) .
|
@chmod 655 $(DOCKERFILEPATH_REG)/binary/registry && $(DOCKERBUILD_WITH_PULL_PARA) --build-arg harbor_base_image_version=$(BASEIMAGETAG) --build-arg harbor_base_namespace=$(BASEIMAGENAMESPACE) -f $(DOCKERFILEPATH_REG)/$(DOCKERFILENAME_REG) -t $(DOCKERIMAGENAME_REG):$(VERSIONTAG) .
|
||||||
|
@ -7,7 +7,13 @@ if [ -z $1 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z $2 ]; then
|
||||||
|
error "Please set the 'distribution_src' variable"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
VERSION="$1"
|
VERSION="$1"
|
||||||
|
DISTRIBUTION_SRC="$2"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -20,7 +26,7 @@ cur=$PWD
|
|||||||
|
|
||||||
# the temp folder to store distribution source code...
|
# the temp folder to store distribution source code...
|
||||||
TEMP=`mktemp -d ${TMPDIR-/tmp}/distribution.XXXXXX`
|
TEMP=`mktemp -d ${TMPDIR-/tmp}/distribution.XXXXXX`
|
||||||
git clone -b $VERSION https://github.com/distribution/distribution.git $TEMP
|
git clone -b $VERSION $DISTRIBUTION_SRC $TEMP
|
||||||
|
|
||||||
# add patch redis
|
# add patch redis
|
||||||
cd $TEMP
|
cd $TEMP
|
||||||
|
Loading…
Reference in New Issue
Block a user