-
Notifications
You must be signed in to change notification settings - Fork 3
chore: upgrade harbor to v2.14.1 #121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
dc86774
4e34e7e
4679195
ece2ed5
4594b58
4178530
de828cc
03f0904
ee95e6c
1d0e6c5
996e6b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -151,7 +151,7 @@ GOINSTALL=$(GOCMD) install | |
| GOTEST=$(GOCMD) test | ||
| GODEP=$(GOTEST) -i | ||
| GOFMT=gofmt -w | ||
| GOBUILDIMAGE=docker-mirrors.alauda.cn/library/golang:1.24.10 | ||
| GOBUILDIMAGE=golang:1.24.10 | ||
| GOBUILDPATHINCONTAINER=/harbor | ||
|
|
||
| # go build | ||
|
|
@@ -304,7 +304,7 @@ lint_apis: | |
| $(SPECTRAL) lint ./api/v2.0/swagger.yaml | ||
|
|
||
| SWAGGER_IMAGENAME=$(IMAGENAMESPACE)/swagger | ||
| SWAGGER_VERSION=v0.31.0 | ||
| SWAGGER_VERSION=v0.33.1 | ||
| SWAGGER=$(RUNCONTAINER) ${SWAGGER_IMAGENAME}:${SWAGGER_VERSION} | ||
| SWAGGER_GENERATE_SERVER=${SWAGGER} generate server --template-dir=$(TOOLSPATH)/swagger/templates --exclude-main --additional-initialism=CVE --additional-initialism=GC --additional-initialism=OIDC | ||
| SWAGGER_IMAGE_BUILD_CMD=${DOCKERBUILD} -f ${TOOLSPATH}/swagger/Dockerfile --build-arg GOLANG=${GOBUILDIMAGE} --build-arg SWAGGER_VERSION=${SWAGGER_VERSION} -t ${SWAGGER_IMAGENAME}:$(SWAGGER_VERSION) . | ||
|
|
@@ -349,7 +349,7 @@ versions_prepare: | |
| check_environment: | ||
| @$(MAKEPATH)/$(CHECKENVCMD) | ||
|
|
||
| compile_core: lint_apis gen_apis | ||
| compile_core: | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. harbor 里的部分代码是通过 gen_apis 自动生成的,导致 renovate 在修复漏洞时执行 所以,编译 core 时可以移除生成代码的步骤,提升镜像构建效率 |
||
| @echo "compiling binary for core (golang image)..." | ||
| @echo $(GOBUILDPATHINCONTAINER) | ||
| @$(DOCKERCMD) run --rm -v $(BUILDPATH):$(GOBUILDPATHINCONTAINER) -w $(GOBUILDPATH_CORE) $(GOBUILDIMAGE) $(GOIMAGEBUILD_CORE) -o $(GOBUILDPATHINCONTAINER)/$(GOBUILDMAKEPATH_CORE)/$(CORE_BINARYNAME) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,7 +10,6 @@ change_base_image () { | |
| elif [[ $file == *Dockerfile* ]] | ||
| then | ||
| sed -i 's/photon:5.0/build-harbor.alauda.cn\/ops\/photon:5-alauda-202511251100/' $1"/"$file | ||
| sed -i 's/node:16.18.0/docker-mirrors.alauda.cn\/library\/node:16.18.0/' $1"/"$file | ||
|
|
||
| echo $1"/"$file | ||
| elif [[ $file == "docker-healthcheck.sh" ]] | ||
|
|
@@ -27,16 +26,18 @@ change_base_image "make/photon" | |
| # renovate: datasource=golang-version depName=go | ||
| export GOLANG_IMAGE_VERSION=1.25.5 | ||
|
|
||
| sed -i 's/node:16.18.0/docker-mirrors.alauda.cn\/library\/node:16.18.0/' "Makefile" | ||
| sed -i 's/registry.npmjs.org/internal-mirrors.alauda.cn\/repository\/npm\//g' "Makefile" | ||
| sed -i 's/BUILDBIN=true/BUILDBIN=false/g' "Makefile" | ||
| sed -i 's/BUILDREG=true/BUILDREG=false/g' "Makefile" | ||
| sed -i 's/BUILDTRIVYADP=true/BUILDTRIVYADP=false/g' "Makefile" | ||
|
Comment on lines
-31
to
+32
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. harbor v2.14 将 registry 和 trivy-adapter 是否构建拆分为两个变量来控制 |
||
| sed -i 's/PUSHBASEIMAGE=false/PUSHBASEIMAGE=true/g' "Makefile" | ||
| sed -i 's/BASEIMAGENAMESPACE=goharbor/BASEIMAGENAMESPACE \?= goharbor/g' "Makefile" | ||
| sed -i 's/IMAGENAMESPACE=goharbor/IMAGENAMESPACE \?= goharbor/g' "Makefile" | ||
| sed -i 's/TRIVYFLAG=false/TRIVYFLAG=true/g' "Makefile" | ||
| sed -i 's/=goharbor\//=build-harbor.alauda.cn\/devops\/goharbor-/g' "Makefile" | ||
| sed -i 's/--pull / /g' "Makefile" | ||
| sed -i 's/$(IMAGENAMESPACE)\//$(IMAGENAMESPACE)\/goharbor-/g' "Makefile" | ||
| sed -i "s/golang:1.24.4/docker-mirrors.alauda.cn\/library\/golang:${GOLANG_IMAGE_VERSION} /g" "Makefile" | ||
| sed -i "s/golang:1.24.10/docker-mirrors.alauda.cn\/library\/golang:${GOLANG_IMAGE_VERSION} /g" "Makefile" | ||
| sed -i 's/-v \$(BUILDPATH):\$(GOBUILDPATHINCONTAINER)/-v \$(BUILDPATH):\$(GOBUILDPATHINCONTAINER) -e GOPROXY=\$(GOPROXY)/' "Makefile" | ||
| sed -i '1 a GOPROXY=https://build-nexus.alauda.cn/repository/golang/,https://goproxy.cn,direct' "Makefile" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,7 +20,7 @@ import ( | |
| "strings" | ||
| "sync" | ||
|
|
||
| "github.com/gorilla/csrf" | ||
| csrf "filippo.io/csrf/gorilla" | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
此前将这一问题反馈给社区了,并给社区提了 PR,社区反馈会再等等看
之前我们自行在 v2.12.4 中替换了这个依赖,这次 v2.14.1 也继续替换该依赖,后续再关注下社区进展 |
||
|
|
||
| "github.com/goharbor/harbor/src/common/utils" | ||
| "github.com/goharbor/harbor/src/lib" | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
依照 harbor v2.14 依赖矩阵,本次升级为咱们的 fork 仓库添加对应的新版本: