mirror of
https://github.com/goharbor/harbor.git
synced 2025-02-16 20:01:35 +01:00
Merge pull request #6901 from wy65701436/upgrade-registry-270
Upgrade registry binary to v2.7.1
This commit is contained in:
commit
cd57f70f2f
@ -34,7 +34,7 @@ env:
|
||||
- CORE_SECRET: tempString
|
||||
- KEY_PATH: "/data/secretkey"
|
||||
- REDIS_HOST: localhost
|
||||
- REG_VERSION: v2.6.2
|
||||
- REG_VERSION: v2.7.1
|
||||
- UI_BUILDER_VERSION: 1.6.0
|
||||
- TOKEN_PRIVATE_KEY_PATH: "/home/travis/gopath/src/github.com/goharbor/harbor/tests/private_key.pem"
|
||||
addons:
|
||||
|
2
Makefile
2
Makefile
@ -95,7 +95,7 @@ VERSIONFILEPATH=$(CURDIR)
|
||||
VERSIONFILENAME=UIVERSION
|
||||
|
||||
#versions
|
||||
REGISTRYVERSION=v2.6.2
|
||||
REGISTRYVERSION=v2.7.1
|
||||
NGINXVERSION=$(VERSIONTAG)
|
||||
NOTARYVERSION=v0.6.1
|
||||
CLAIRVERSION=v2.0.7
|
||||
|
@ -184,7 +184,7 @@ _build_notary:
|
||||
_build_registry:
|
||||
@if [ "$(BUILDBIN)" != "true" ] ; then \
|
||||
rm -rf $(DOCKERFILEPATH_REG)/binary && mkdir -p $(DOCKERFILEPATH_REG)/binary && \
|
||||
$(call _get_binary, https://storage.googleapis.com/harbor-builds/bin/registry, $(DOCKERFILEPATH_REG)/binary/registry); \
|
||||
$(call _get_binary, https://storage.googleapis.com/harbor-builds/bin/registry/release-$(REGISTRYVERSION)/registry, $(DOCKERFILEPATH_REG)/binary/registry); \
|
||||
else \
|
||||
cd $(DOCKERFILEPATH_REG) && $(DOCKERFILEPATH_REG)/builder $(REGISTRYVERSION) && cd - ; \
|
||||
fi
|
||||
|
@ -1,10 +1,9 @@
|
||||
FROM golang:1.7.3
|
||||
FROM golang:1.11
|
||||
|
||||
ENV DISTRIBUTION_DIR /go/src/github.com/docker/distribution
|
||||
ENV DOCKER_BUILDTAGS include_oss include_gcs
|
||||
|
||||
WORKDIR $DISTRIBUTION_DIR
|
||||
COPY . $DISTRIBUTION_DIR
|
||||
COPY cmd/registry/config-dev.yml /etc/docker/registry/config.yml
|
||||
|
||||
RUN make PREFIX=/go clean binaries
|
||||
RUN CGO_ENABLED=0 make PREFIX=/go clean binaries
|
||||
|
@ -22,13 +22,13 @@ cur=$PWD
|
||||
TEMP=`mktemp -d /$TMPDIR/distribution.XXXXXX`
|
||||
git clone -b $VERSION https://github.com/docker/distribution.git $TEMP
|
||||
|
||||
echo 'build the registry binary bases on the golang:1.11.2...'
|
||||
echo 'build the registry binary bases on the golang:1.11...'
|
||||
cp Dockerfile.binary $TEMP
|
||||
docker build -f $TEMP/Dockerfile.binary -t registry-golang $TEMP
|
||||
|
||||
echo 'copy the registry binary to local...'
|
||||
ID=$(docker create registry-golang)
|
||||
docker cp $ID:/go/bin/registry binary
|
||||
docker cp $ID:/go/src/github.com/docker/distribution/bin binary
|
||||
|
||||
docker rm -f $ID
|
||||
docker rmi -f registry-golang
|
||||
|
@ -136,10 +136,10 @@ class System(base.Base):
|
||||
|
||||
def validate_deletion_success(self, gc_id, **kwargs):
|
||||
log_content = self.get_gc_log_by_id(gc_id, **kwargs)
|
||||
key_message = "blobs eligible for deletion"
|
||||
key_message = "manifests eligible for deletion"
|
||||
key_message_pos = log_content.find(key_message)
|
||||
full_message = log_content[key_message_pos-30 : key_message_pos + len(key_message)]
|
||||
deleted_files_count_list = re.findall(r'\s+(\d+)\s+blobs eligible for deletion', full_message)
|
||||
deleted_files_count_list = re.findall(r'\s+(\d+)\s+blobs\s+and\s+\d+\s+manifests\s+eligible\s+for\s+deletion', full_message)
|
||||
|
||||
if len(deleted_files_count_list) != 1:
|
||||
raise Exception(r"Fail to get blobs eligible for deletion in log file, failure is {}.".format(len(deleted_files_count_list)))
|
||||
|
Loading…
Reference in New Issue
Block a user