1
0
mirror of https://github.com/goharbor/harbor.git synced 2026-10-23 10:08:57 +03:00

408 Commits

Author SHA1 Message Date
Prasanth Baskar
4e07c69cbd chore(deps): bump up Go version to v1.27.3 (#24188)
Fixes GO-2026-6809: crypto/x509 now distrusts compromised intermediate
certificates. Affects go1.27.2, fixed in go1.27.3.

Signed-off-by: Prasanth Baskar <prasanth@8gears.com>
2026-10-21 14:28:50 +05:30
stonezdj(Daojun Zhang)
43dfe11b84 chore: bump Trivy, Trivy adapter, and Distribution versions (#24179)
Signed-off-by: stonezdj <stonezdj@gmail.com>
Co-authored-by: Prasanth Baskar <prasanth@8gears.com>
2026-10-20 10:23:18 +00:00
stonezdj(Daojun Zhang)
2c94d4e213 bump: bump up Go version to v1.27.2 (#24119)
Update Go version from 1.26.4 to 1.27.2 across makefiles, configuration, CI workflows, and documentation.

Signed-off-by: stonezdj <stonezdj@gmail.com>
2026-10-12 06:28:24 +00:00
stonezdj(Daojun Zhang)
2c66bbe032 Bump trivy adapter to v0.39.1 and distribution to v2.8.3-harbor.2 (#24118)
- Bump trivy adapter version to v0.39.1 (ref: #24080)
- Bump distribution version to v2.8.3-harbor.2 (ref: #23991)


(cherry picked from commit 0c7f91025d)

Signed-off-by: stonezdj <stonezdj@gmail.com>
2026-10-10 11:13:20 +08:00
stonezdj(Daojun Zhang)
4d425b805f bump: bump up Go version to v1.26.9 (#24120)
Update Go version from 1.26.4 to 1.26.9 across makefiles, configuration, CI workflows, and documentation.

Signed-off-by: stonezdj <stonezdj@gmail.com>
2026-10-09 16:42:09 +08:00
Prasanth Baskar
8b67a48c4e chore(deps): bump trivy to 0.75.0 and the trivy adapter to 0.39.1-rc2 (#24092)
Signed-off-by: Prasanth Baskar <prasanth@8gears.com>
2026-10-08 06:09:13 +00:00
Vadim Bauer
7612d772b1 ci: migrate all GitHub workflows to CNCF-hosted runners (#23545)
* ci: migrate all GitHub workflows to CNCF-hosted runners

Replace the Oracle self-hosted labels and the GitHub-hosted defaults with
the CNCF runner pool:

  oracle-vm-24cpu-96gb-x86-64 -> cncf-ubuntu-16-64-x86
  ubuntu-latest               -> cncf-ubuntu-16-64-x86
  ubuntu-24.04-arm            -> cncf-ubuntu-16-64-arm

The arm64 leg of the BUILD_PACKAGE matrix keeps building natively, now on
cncf-ubuntu-16-64-arm.

Signed-off-by: Vadim Bauer <vadim@8gears.com>
Signed-off-by: Vadim Bauer <vb@container-registry.com>

* ci: run pass-CI no-op stubs on the smallest CNCF runner

The pass-CI jobs only exist to satisfy required status checks on skipped
paths and execute nothing, so cncf-ubuntu-2-8-x86 is sufficient.

Signed-off-by: Vadim Bauer <vadim@8gears.com>
Signed-off-by: Vadim Bauer <vb@container-registry.com>

* ci: fix silently-disabled Go caching and cache CI Go tools

actions/setup-go ran before actions/checkout, so it looked for go.sum in an
empty workspace and logged:

  Restore cache failed: Dependencies file is not found in
  /home/ubuntu/_work/harbor/harbor. Supported file pattern: go.sum

With cache: true (the v5 default) this silently no-ops, so GOMODCACHE and
GOCACHE were cold on every job of every run. Checkout now runs first, and
cache-dependency-path points at src/go.sum under the checkout path.

Also cache $GOPATH/bin and only build the three CI tools and golangci-lint
when they are missing, instead of recompiling them from source every run.

Signed-off-by: Vadim Bauer <vadim@8gears.com>
Signed-off-by: Vadim Bauer <vb@container-registry.com>

* fix(make): resolve Go tool paths against the first GOPATH entry

CI sets GOPATH to a colon-separated list (go env GOPATH plus the workspace),
so $(shell go env GOPATH)/bin/golangci-lint expanded to the nonexistent path
'/home/ubuntu/go:/home/ubuntu/_work/harbor/harbor/bin/golangci-lint'.

This was masked because ut_install.sh installed golangci-lint using the same
broken expression, so both sides agreed on the same bogus location. Resolving
the tool against the first GOPATH entry (where go install actually writes
binaries) makes the path correct in both the single-entry and list cases.

Signed-off-by: Vadim Bauer <vadim@8gears.com>
Signed-off-by: Vadim Bauer <vb@container-registry.com>

* test(portal): wait for pagination control before clicking

The spec queried .pagination-next immediately after whenStable() and clicked
it, so it failed whenever the datagrid had not rendered yet. Retry the lookup
until the control appears.

Signed-off-by: Vadim Bauer <vadim@8gears.com>
Signed-off-by: Vadim Bauer <vb@container-registry.com>

* test: do not reuse cached go test results

With GOCACHE persisted across CI runs, go test replayed cached results instead
of executing the tests. Harbor's tests share a database across packages, so a
package that re-ran could observe state that the replayed packages never
created. -count=1 forces tests to run while still reusing the compilation cache.

Signed-off-by: Vadim Bauer <vadim@8gears.com>
Signed-off-by: Vadim Bauer <vb@container-registry.com>

* ci: fix Go caching in build-package and conformance, pin misspell

build-package.yml and conformance_test.yml also ran setup-go before checkout,
so their caches failed open exactly as CI.yml's did. Checkout now runs first
in both, with cache-dependency-path set.

cover and goveralls were installed but never used: goveralls is only named in a
commented-out line in ut_run.sh, and go test -cover uses the built-in tool, not
golang.org/x/tools/cmd/cover. Drop both and pin misspell, which make misspell
does invoke, so the cached tool version is reproducible.

Signed-off-by: Vadim Bauer <vadim@8gears.com>
Signed-off-by: Vadim Bauer <vb@container-registry.com>

---------

Signed-off-by: Vadim Bauer <vadim@8gears.com>
Signed-off-by: Vadim Bauer <vb@container-registry.com>
2026-07-15 13:39:43 +08:00
Chlins Zhang
aa7a5b7469 build(registry): use stable registry source release v2.8.3-harbor.1 (#23481)
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-07-02 08:39:32 +02:00
stonezdj(Daojun Zhang)
a11480b2c0 Bump up trivy to 0.72.0 (#23478)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2026-07-01 11:26:35 +08:00
stonezdj(Daojun Zhang)
ab962362ac chore: update Trivy adapter version to v0.38.0-rc1 (#23469)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2026-06-30 15:05:30 +00:00
stonezdj(Daojun Zhang)
f6f3a6eb50 bump: bump up golang to 1.26.4 and trivy adapter version to v0.37.2-rc2 (#23460)
* bump: bump up trivy adapter version to v0.37.2-rc2

Update TRIVYADAPTERVERSION to v0.37.2-rc2 in Makefile.

Signed-off-by: stonezdj <stone.zhang@broadcom.com>

* bump: bump up Go version to v1.26.4

Update Go version from 1.26.3 to 1.26.4 across makefiles, configuration, CI workflows, and documentation.

Signed-off-by: stonezdj <stone.zhang@broadcom.com>

---------

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
Signed-off-by: stonezdj(Daojun Zhang) <stonezdj@gmail.com>
2026-06-30 14:07:29 +00:00
Chlins Zhang
2b9bbbdfd4 build(registry): update distribution source tag to rc.5 (#23464)
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-06-30 08:14:17 +00:00
stonezdj(Daojun Zhang)
4a7fac0606 chore: update Trivy adapter version to v0.37.2-rc1 (#23456)
refresh base image

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2026-06-29 06:54:49 +00:00
stonezdj(Daojun Zhang)
1da586b86b chore: update Trivy adapter version to v0.37.1 (#23423)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2026-06-24 14:00:42 +08:00
stonezdj(Daojun Zhang)
770f5d1d35 Bump trivy to v0.71.1 and trivy adapter to v0.37.1-rc.1 (#23388)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2026-06-16 06:15:07 +00:00
Ashish Patel
a821bae24a feat(portal): upgrade Angular to v21, Clarity to v18, Node.js to v22 (#22937 (#23078)
Upgrade Harbor UI to Angular 21, Clarity v18, and Node.js v22

- Upgrade the Harbor UI (src/portal) from Angular 16 to Angular 19 and subsequently to Angular 21.
- Upgrade VMware Clarity from v17 to v18, and Node.js from v20 to v22 (updated .nvmrc, CI.yml, Makefile, Dockerfile).
- Migrate Angular templates to the new @if/@for control flow syntax.
- Fix UI issues #1 through #35, including robot accounts, layout, dropdown overlay, and input styling.
- Fix unit tests: resolve NG0100 ExpressionChangedAfterItHasBeenCheckedError in policy.component.spec.ts, replace autoDetectChanges(true) with explicit detectChanges cycles, and use TestBed.overrideComponent to stub AddP2pPolicyComponent template.
- Fix Clarity v18 breaking changes: update dark-theme SCSS import, add cds-theme attribute for theming, update ClrDatagridStateInterface import path, add ClrIconModule to app module.
- Stabilize npm installs and resolve CI/CD pipeline hangs.
- Fix swagger-ui crash caused by React 19 createRoot removal:
  - swagger-ui 5.28+ resolves a nested react-dom@19 which removed createRoot
    from the main react-dom entry point (moved to react-dom/client). The
    swagger-ui-es-bundle-core.js still imports createRoot from react-dom,
    making it undefined and causing "TypeError: i is not a function" at render.
  - app-swagger-ui/webpack.prod.js: alias bare 'swagger-ui' import to
    swagger-ui-bundle.js (the standalone UMD build that ships with React 18
    already bundled), bypassing the broken external react-dom@19 entirely.
  - app-swagger-ui/package.json: add npm overrides to pin react and
    react-dom to ^18.3.1 so future npm installs do not re-introduce React 19.
  - angular.json: expose swagger-ui.bundle.js and swagger-ui-index.html
    from app-swagger-ui/dist as Angular dev-server assets, enabling the
    proxy to serve the locally built, fixed bundle during development.
- Convert eslint-plugin-header config from JSON to JS to apply the ESLint 9 schema fix at config-load time, removing the need for patch-package.
- Pin all dependency versions to exact installed versions from the lock file, and remove unused prettier-eslint package.
- Fix flake in P2pProviderService unit test by initializing date with 0 milliseconds to prevent cross-second duration calculation mismatches.

Signed-off-by: Ashish Patel <zoom2ashish@gmail.com>
Co-authored-by: stonezdj <stone.zhang@broadcom.com>
2026-06-09 15:16:20 +00:00
Prasanth Baskar
a4b9d434b1 fix: use Photon updates repo for base images (#23316)
fix: support pg18 install on arm64

Signed-off-by: Prasanth Baskar <bupdprasanth@gmail.com>
2026-06-09 03:30:56 +00:00
Mandepudi Rani Chowdary
eb944bb199 fix: build valkey from source to support arm64 (#23282)
fix: support arm64 valkey build while preserving amd64 package path

- Keep amd64 behavior unchanged with tdnf install of valkey
- Isolate source-build fallback to arm64 only
- Verify source tarball with SHA256
- Move valkey version/checksum definition to root Makefile and pass as build args

Signed-off-by: ranimandepudi <ranichowdary.mandepudi@arm.com>
2026-06-02 08:17:10 +00:00
Chlins Zhang
10cc96b9b3 build(registry): update source tag to rc.4 (#23300)
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-06-02 15:22:56 +08:00
stonezdj(Daojun Zhang)
a7c6e4df30 Update Makefile PIP_INDEX_URL to use default value if not defined (#23273)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2026-05-22 08:40:32 +00:00
Chlins Zhang
2ef6b9f557 build(registry): bump source tag to rc.2 (#23269)
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-05-22 10:42:03 +08:00
stonezdj(Daojun Zhang)
24b7300618 bump Go version from 1.25.7 to 1.26.3 (#23235)
fix UT failures for Go 1.26.3 compatibility
  Add //nolint:revive to packages whose names shadow Go stdlib
  Fix mock file import ordering (goimports compliance)
  Bump golangci-lint from v2.8.0 to v2.9.0 for Go 1.26 support
  Update CI step label to reflect Go 1.26

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2026-05-18 16:22:30 +08:00
stonezdj(Daojun Zhang)
11b9c51e9d support configurable PIP_INDEX_URL for swagger client build (#23241)
* support configurable PIP_INDEX_URL for swagger client build

Pass PIP_INDEX_URL through Makefile (conditional env injection),
APITest-Util.robot (robot variable with public PyPI default), and
Group3-Upgrade/run.sh (-v forwarding to robot).

Signed-off-by: stonezdj <stone.zhang@broadcom.com>

* wait more time for proxy cache ready
refine proxy cache test in migration prepare

Signed-off-by: stonezdj <stonezdj@gmail.com>

---------

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
Signed-off-by: stonezdj <stonezdj@gmail.com>
2026-05-18 10:32:25 +08:00
Vadim Bauer
10196108d5 fix(build): default PIP_INDEX_URL to https://pypi.org/simple (#23227)
PR #23205 added PIP_INDEX_URL plumbing but did not set a default, so when
the variable is unset the top-level Makefile forwarded an empty value to
the photon sub-make. The sub-make in turn passed `--build-arg pip_index_url=`
to `docker build`, which overrides the Dockerfile.base ARG default with an
empty string and breaks `pip3 install pipenv ... --index-url ` (the option
requires an argument). This caused the BUILD_PACKAGE jobs on main to fail.

Mirror the existing NPM_REGISTRY pattern by providing a default value for
PIP_INDEX_URL in the top-level Makefile.

Signed-off-by: Vadim Bauer <vb@container-registry.com>
Co-authored-by: Orlix <7236111+OrlinVasilev@users.noreply.github.com>
2026-05-13 13:26:39 +00:00
Mandepudi Rani Chowdary
18f7abd8ed Full Multi-Architecture Enablement for Harbor (amd64 + arm64) (#22311)
Co-authored-by: Orlix <7236111+OrlinVasilev@users.noreply.github.com>
Co-authored-by: Vadim Bauer <vb@container-registry.com>
Co-authored-by: Vadim Bauer <Bauer.vadim@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: bupd <bupdprasanth@gmail.com>
2026-05-12 09:03:22 +02:00
stonezdj(Daojun Zhang)
729e277d69 Support custom PyPI index URL for prepare image builds (#23205)
build: support custom PyPI index URL for prepare image builds

Pass PIP_INDEX_URL through the make build chain as a Docker --build-arg,
mirroring the existing NPM_REGISTRY pattern for the portal build.

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2026-05-08 02:23:40 +00:00
stonezdj(Daojun Zhang)
62c278dfb1 Make openapi-generator-cli download URL configurable (#23186) 2026-05-01 16:11:17 +08:00
Chlins Zhang
88ab66244e feat: replace redis with valkey as cache backend (#23157)
Signed-off-by: chlins <chlins.zhang@gmail.com>
2026-04-28 14:59:43 +08:00
Yaten Dhingra
38ee25e6db add docker check before running 'make gen_apis' (#22907)
* add docker check before running make gen_apis command

Signed-off-by: Yaten <yaten598@gmail.com>

* update makefile to add check if docker is running or not

Signed-off-by: Yaten <yaten598@gmail.com>

* fix indentation

Signed-off-by: Yaten <yaten598@gmail.com>

---------

Signed-off-by: Yaten <yaten598@gmail.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
2026-03-13 10:36:39 +08:00
miner
0af248485f Bump trivy-adapter v0.35.1 GA on main (#22966)
Bump trivy-adapter v0.35.1 GA

Signed-off-by: my036811 <miner.yang@broadcom.com>
2026-03-08 05:18:57 +00:00
miner
7ee035b1db Bump trivy to 0.69.3 & adapter to v0.35.1-rc.1 on main (#22932)
Signed-off-by: my036811 <miner.yang@broadcom.com>
2026-03-05 06:00:13 +00:00
Ikram ALOUI
96de2bcb54 fix: bump Trivy to v0.69.2 following supply chain incident (#22896)
All GitHub Releases from v0.27.0 to v0.69.1 were permanently deleted
on 2026-03-01 as part of a supply chain attack on aquasecurity/trivy.
Update to v0.69.2, the emergency patch release published by Aqua Security.

Verified: curl -sI https://github.com/aquasecurity/trivy/releases/download/v0.69.2/trivy_0.69.2_Linux-64bit.tar.gz returns HTTP/2 302

Fixes #22895
Ref: https://github.com/aquasecurity/trivy/discussions/10265

Signed-off-by: Aloui-Ikram <ikram@container-registry.com>
Co-authored-by: Aloui-Ikram <ikram@container-registry.com>
2026-03-03 12:58:40 +08:00
Wang Yan
1006a2010f bump go and base images (#22831)
1, up go to v1.25.7.
2, up the base photon to latest.

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
2026-02-11 17:39:35 +08:00
Daniel Jiang
8791e775ea Bump up trivy and trivy adapter (#22828)
This commit bumps up trivy to v0.69.1 and trivy adapter to v0.35.0-rc.2
It also updates the setting of revive to skip a package naming error

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-02-11 12:54:08 +08:00
Wang Yan
457ca90e63 bump go to v1.25 (#22794)
1, bump go version from v1.24.6 to v1.25.6
2, temp workaround the lint issue.
3, fix the relevant compitable issues that introduced by go v1.25.

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
2026-02-03 03:44:28 +08:00
Soumya Raikwar
fe7f2c3a08 build: remove unused REGISTRYURL and GCS download path for registry build (#22372)
* build: remove unused REGISTRYURL and GCS download path for registry build

Closes #22333

- Drop REGISTRYURL variable and its propagation
- Simplify make/photon/Makefile to always build registry from source via builder
- Remove Google Storage URL reference used for downloading prebuilt registry binary

Signed-off-by: Your Name <your.email@example.com>

* build: keep REGISTRYURL var and fallback download path; restore _get_binary (address review)

- Keep REGISTRYURL variable (empty by default) and pass-through to sub-make
- Restore conditional registry download path and _get_binary helper in photon Makefile
- Aligns with reviewer guidance on #22372

Signed-off-by: Your Name <your.email@example.com>

* Update Makefile

Signed-off-by: Soumya Raikwar <164396577+SoumyaRaikwar@users.noreply.github.com>

* Update Makefile

Signed-off-by: Soumya Raikwar <164396577+SoumyaRaikwar@users.noreply.github.com>

* Update Makefile

Signed-off-by: Soumya Raikwar <164396577+SoumyaRaikwar@users.noreply.github.com>

---------

Signed-off-by: Your Name <your.email@example.com>
Signed-off-by: Soumya Raikwar <164396577+SoumyaRaikwar@users.noreply.github.com>
Signed-off-by: stonezdj(Daojun Zhang) <stonezdj@gmail.com>
Co-authored-by: Your Name <your.email@example.com>
Co-authored-by: stonezdj(Daojun Zhang) <stonezdj@gmail.com>
2026-01-29 10:12:42 +00:00
Daniel Jiang
32a5f427bb bump up to trivy adapter v0.35.0-rc.1 (#22787)
Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-01-29 09:38:31 +00:00
miner
362a357c74 Pin distribution src tag to v2.8.3-harbor.1-rc.1 (#22772)
Update distribution src tag to v2.8.3-harbor.1-rc.1

Signed-off-by: my036811 <miner.yang@broadcom.com>
2026-01-26 14:38:43 +08:00
Vadim Bauer
6606d184f5 fix(exporter): Export Harbor version via Prometheus exporter binary. (#22733)
fix(exporter): bake Harbor version into exporter binary at build time

Signed-off-by: Vadim Bauer <vb@container-registry.com>
2026-01-22 16:01:19 +08:00
Daniel Jiang
4a1a49df29 Bump up trivy and trivy-adapter (#22745)
Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2026-01-20 16:41:05 +08:00
Coldchen99
8c3f0c6d4d fix: support both docker-compose v1 and docker compose v2 (#22581)
fix: resolve 'docker-compose: command not found' error

Add fallback to support Docker Compose V2 plugin format when
standalone docker-compose binary is not available.

Signed-off-by: coldenchen <coldenchen@tencent.com>
Co-authored-by: coldenchen <coldenchen@tencent.com>
2025-11-26 06:00:57 +00:00
Daniel Jiang
46ce0a239e Bump up trivy (#22293)
Bump up trivy and trivy-adapter for Harbor v2.14.0

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2025-08-28 17:34:47 +08:00
Wang Yan
91d2fa6377 bump go version (#22238) 2025-08-11 09:15:51 +00:00
miner
cc97ec0b62 remove extra build_base=false && pull_base_from_dockerhub=false check logic (#22233)
remove extra build_base=false && pull_base_from_dockerhub=false logic
we do not block the case using local chached image(docker build --pull=false) while build_base=false
However we need gurantee always pull latest image while build package
And when there's some rate limit issue in the CICD situation we could set pull_base_from_dockerhub=false

Signed-off-by: my036811 <miner.yang@broadcom.com>
2025-08-07 08:41:11 +00:00
Wang Yan
257afebd5f bump golang version (#22205)
to the latest golang version v1.24.5 from v1.24.3

Signed-off-by: wy65701436 <wangyan@vmware.com>
2025-07-29 07:21:57 +00:00
miner
2565491758 add BUILD_INSTALLER parameter for optionally build prepare and log container (#22148)
add BUILD_INSTALLER parameter to optionally build prepare and log container only when we need to build offline_installer

Signed-off-by: my036811 <miner.yang@broadcom.com>
2025-07-03 18:23:17 +08:00
miner
0a3c06d89c add dockernetwork parameter for build process (#22138)
add dockernetwork parameter for makefile

Signed-off-by: my036811 <miner.yang@broadcom.com>
2025-07-03 15:33:25 +08:00
Wang Yan
b4ba918118 bump up golang version to v1.24.3 (#21993)
* bump up golang version to v1.24.3

Signed-off-by: wang yan <wangyan@vmware.com>

* bump mockery version to support golang v2.14

Signed-off-by: wang yan <wangyan@vmware.com>

---------

Signed-off-by: wang yan <wangyan@vmware.com>
2025-05-13 17:09:35 +08:00
Wang Yan
073dab8a07 add build flag for harbor exporter (#21988)
As the harbor exporter is not a core component for installation, so like the trivy, add a flag to controller whether package it into the offline installer.

Signed-off-by: wang yan <wangyan@vmware.com>
2025-05-13 13:11:55 +08:00
stonezdj(Daojun Zhang)
f684c1c36e change python ./setup.py install to pip install . because deprecated (#21952)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2025-04-30 13:40:45 +08:00