1
0
mirror of https://github.com/goharbor/harbor.git synced 2026-10-24 21:59:32 +03:00
Commit Graph

690 Commits

Author SHA1 Message Date
dependabot[bot]
4a09f715e1 chore(deps-dev): bump pygments from 2.19.2 to 2.20.0 in /make/photon/prepare (#23053)
chore(deps-dev): bump pygments in /make/photon/prepare

Bumps [pygments](https://github.com/pygments/pygments) from 2.19.2 to 2.20.0.
- [Release notes](https://github.com/pygments/pygments/releases)
- [Changelog](https://github.com/pygments/pygments/blob/master/CHANGES)
- [Commits](https://github.com/pygments/pygments/compare/2.19.2...2.20.0)

---
updated-dependencies:
- dependency-name: pygments
  dependency-version: 2.20.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-07-02 09:05:14 +00:00
Wang Yan
c8ed06b1df fix(build): pin Photon base to stable multi-arch digest (#23352)
The latest upstream photon:5.0 arm64 image currently has an empty rootfs,
which fails during the multi-arch base build with "/bin/sh: no such file
or directory". Pin the Photon base to a known-good stable digest to keep
the amd64 and arm64 builds reproducible.

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
2026-06-12 10:09:24 +08:00
Wang Yan
8ee16b8074 fix: solve db build conflict and robustify workflow repo list saving (#23350)
pin qemu binfmt and prevent publish races

- Pin docker/setup-qemu-action to tonistiigi/binfmt:qemu-v9.2.2 for stable arm64 emulation.
- Add per-branch concurrency in build-package workflow to avoid overlapping runs racing on mutable tags/manifests.
- Rename Go setup step label to match the actual configured version.

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
2026-06-11 12:09:26 +00:00
Wang Yan
a37374efe9 Harden crypto usage and drop unused SMTP package (#23307)
- Use stdlib crypto/pbkdf2 instead of golang.org/x/crypto/pbkdf2 for
  password/secret hashing (output unchanged; no migration needed).
- Restrict JWT signing to RSA/RSA-PSS and reject other methods in
  pkg/token (default RS256 unchanged).
- Remove unused common/utils/email package (no references in codebase).

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
2026-06-11 14:48:09 +08:00
Vadim Bauer
7d0cac2a6f fix: publish harbor-*-base images as multi-arch manifests (#23348)
The per-component base images (goharbor/harbor-core-base, harbor-db-base,
harbor-portal-base, ...) were pushed by both BUILD_PACKAGE matrix jobs to the
same unsuffixed tag (e.g. :dev), so whichever architecture finished last
overwrote the other and the published tag ended up single-arch — the same
last-writer-wins problem goharbor/photon:5.0 had before #23334 (#23324).

Apply the same pattern already used for the component images:

- make/photon/Makefile: _build_base keeps building the local unsuffixed tag
  (component Dockerfiles build FROM it unchanged) but pushes an arch-suffixed
  tag instead: harbor-<name>-base:<tag>-amd64 / -arm64.
- .github/workflows/build-package.yml: each matrix job also saves the list of
  goharbor/*-base repos it built; CREATE_MANIFEST combines the two suffixed
  tags into the unsuffixed multi-arch manifest with docker buildx imagetools
  create, using the base tag scheme (dev on main, the release version on
  release-* branches). The base manifest step only runs when BUILD_BASE_IMAGE
  decided to rebuild bases, since otherwise no suffixed tags were pushed in
  this run.

Consumers that pull harbor-*-base:<tag> (PULL_BASE_FROM_DOCKERHUB=true flows)
now resolve the correct architecture via the manifest list instead of getting
whatever architecture won the race.

Signed-off-by: Vadim Bauer <vb@container-registry.com>
2026-06-11 10:37:45 +08: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
Vadim Bauer
2b29348cbd fix: publish goharbor/photon:5.0 as a multi-arch manifest (#23324) (#23334)
goharbor/photon:5.0 was built and pushed independently by both the amd64 and
arm64 BUILD_PACKAGE matrix jobs to the same tag, so whichever job finished last
overwrote the other and the published tag ended up single-arch ("sometimes
amd64, sometimes arm64", #23324).

Build it once as an amd64+arm64 manifest list in a dedicated BUILD_BASE_IMAGE
job that BUILD_PACKAGE depends on, and exclude goharbor/photon from the
component manifest list in CREATE_MANIFEST (it is published here and stays at
tag 5.0).

The db base image keeps the photon-snapshot repo (the stable Photon source) and
installs both postgresql15-server (old binaries at /usr/pgsql/15/bin, required
by pg_upgrade) and postgresql18-server (runtime), temporarily un-pinning the
snapshot to pull whichever major Photon has deprecated out of the current
snapshot per architecture (pg15 on amd64, pg18 on arm64). common/Dockerfile
keeps photon-snapshot and merges its setup into a single RUN.

Signed-off-by: Vadim Bauer <vb@container-registry.com>
2026-06-09 22:04:47 +08: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
jUDASmILE
2f79ecceb5 remove install net-tools from db dockerfile as photon removed it (#23266)
remove install net-tools from db dockerfile as photon removed it from repo already

Signed-off-by: jUDASmILE <judasmile@gmail.com>
2026-05-21 03:23:50 +00:00
Wang Yan
bbe79cae65 bump pg to v18 (#23184)
currently harbor is using the pg 15, I will use this pull request to bump it to pg 18.

Signed-off-by: wang yan <yan-yw.wang@broadcom.com>
Co-authored-by: wang yan <yan-yw.wang@broadcom.com>
2026-05-21 10:32:06 +08:00
jUDASmILE
33b363c81b Rebuild goharbor/photon image before create new harbor base images (#23248)
* refresh goharbor photon:5.0 when create new base image

Signed-off-by: jUDASmILE <judasmile@gmail.com>

* correct date and format in buildbaselog

Signed-off-by: jUDASmILE <judasmile@gmail.com>

---------

Signed-off-by: jUDASmILE <judasmile@gmail.com>
2026-05-18 10:01:58 +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
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
Anurag Ojha
4cedb8c0e2 fix(exporter): add Docker HEALTHCHECK (#22778)
* Add Docker HEALTHCHECK for harbor-exporter

Signed-off-by: intojhanurag <aojharaj2004@gmail.com>

* configurable port use

Signed-off-by: intojhanurag <aojharaj2004@gmail.com>

* add comment

Signed-off-by: intojhanurag <aojharaj2004@gmail.com>

---------

Signed-off-by: intojhanurag <aojharaj2004@gmail.com>
Co-authored-by: Chlins Zhang <chlins.zhang@gmail.com>
2026-04-22 04:06:19 +00:00
miner
2cbdacff87 update version for prepare migrate script (#22805)
Signed-off-by: my036811 <miner.yang@broadcom.com>
2026-02-03 16:50:27 +08:00
miner
56e9958e83 add prepare migration script for 2.15.0 (#22788)
Signed-off-by: my036811 <miner.yang@broadcom.com>
2026-01-30 15:28:02 +08:00
Quentin B.
aafc47d7fa add support for configure trivy db repository via harbor.yml (#21193)
Add support for trivy db_repository and java_db_repository

Signed-off-by: Quentin Bouteiller <quentin.bouteiller@values-associates.com>
Co-authored-by: Daniel Jiang <daniel.jiang@broadcom.com>
Co-authored-by: miner <miner.yang@broadcom.com>
2026-01-29 08:56:41 +00:00
miner
a8343d3c7d support parse redis acl for registry config (#22770)
Signed-off-by: my036811 <miner.yang@broadcom.com>
2026-01-23 08:19:16 +00: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
Max Fröhlich
26b61390a0 Remove unused SYNC_QUOTA from env.jinja template (#22280)
Remove SYNC_QUOTA from env.jinja template

`SYNC_QUOTA` is not used throughout the whole code.

It looks like the feature using it was removed.

Signed-off-by: Max Fröhlich <maxbruchmann@gmail.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
2025-09-01 16:31:56 +08:00
miner
e80b940942 add prepare migration script for 2.14.0 (#22247)
Signed-off-by: my036811 <miner.yang@broadcom.com>
2025-08-13 08:38:27 +00:00
Wang Yan
9f809f17ba update the support list of proxy cache (#22237)
According to PR #22198, some inactive adapters have been removed from the default adapter list.
This pull request updates PERMITTED_REGISTRY_TYPES_FOR_PROXY_CACHE accordingly, since the list of proxy cache adapters should be a subset of the replication adapters.

Signed-off-by: wy65701436 <wangyan@vmware.com>
2025-08-11 08:20:31 +00:00
Wang Yan
de657686b3 add the replicaiton adapter whitelist (#22198)
fixes #21925

According to https://github.com/goharbor/harbor/wiki/Harbor-Replicaiton-Adapter-Owner, some replication adapters are no longer actively maintained by the Harbor community. To address this, a whitelist environment variable is introduced to define the list of actively supported adapters, which will be used by the Harbor portal and API to display and allow usage.

If you still wish to view and use the unsupported or inactive adapters, you must manually update the whitelist and include the desired adapter names. For the list of adapter names, refer to https://github.com/goharbor/harbor/blob/main/src/pkg/reg/model/registry.go#L22

Signed-off-by: wang yan <wangyan@vmware.com>
2025-07-23 10:25:21 +00:00
stonezdj(Daojun Zhang)
ebdfb547ba Set MAX_JOB_DURATION_SECONDS from jobservice config.yml (#22116)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2025-07-18 10:01:18 +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
miner
0c5d82e9d4 Update pipenv for prepare (#22124)
* update pipenv and lock

Signed-off-by: my036811 <miner.yang@broadcom.com>

* update pipenv

Signed-off-by: my036811 <miner.yang@broadcom.com>

---------

Signed-off-by: my036811 <miner.yang@broadcom.com>
2025-07-01 14:23:05 +08:00
Wang Yan
b3cfe225db unify the golang image version (#21935)
Make the golang version as a unified parameter to build all harbor components

Signed-off-by: wang yan <wangyan@vmware.com>
2025-04-27 14:07:19 +08:00
miner
f8f1994c9e fix jobservice container loglevel consistent with job_log (#21874)
Signed-off-by: yminer <miner.yang@broadcom.com>
2025-04-15 14:07:39 +08:00
Wang Yan
e216f6beb9 bump up golang version (#21813)
Signed-off-by: wang yan <wangyan@vmware.com>
2025-04-02 13:58:49 +08:00
Wang Yan
a16caa5ab7 update golang to v1.23.7 (#21749)
Signed-off-by: wang yan <wangyan@vmware.com>
2025-03-18 18:52:02 +08:00
miner
229a27ff41 add prepare migration script for 2.13.0 (#21680)
Signed-off-by: yminer <miner.yang@broadcom.com>
2025-03-11 07:48:22 +00:00
miner
3b8c18fd26 update tlsOptions for external redis (#21681)
Signed-off-by: yminer <miner.yang@broadcom.com>
Co-authored-by: yminer <miner.yang@broadcom.com>
2025-03-10 11:45:18 +00:00
miner
fef95244fc remove redis sentinel patch from builder (#21679)
Signed-off-by: yminer <miner.yang@broadcom.com>
Co-authored-by: yminer <miner.yang@broadcom.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
2025-03-04 15:19:05 +08:00
miner
5c39e76ac4 prepare redis tls config (#21667)
add prepare for redis tls config

Signed-off-by: yminer <miner.yang@broadcom.com>
2025-02-27 17:38:08 +08:00
miner
39b2898e18 update exporter docker build para (#21448)
Signed-off-by: yminer <miner.yang@broadcom.com>
Co-authored-by: yminer <miner.yang@broadcom.com>
Co-authored-by: Orlix <7236111+OrlinVasilev@users.noreply.github.com>
2025-01-22 11:23:30 +00:00
Wang Yan
9e8e647b71 separate buildin values (#21425)
Signed-off-by: wang yan <wangyan@vmware.com>
2025-01-16 14:26:24 +00:00
Wang Yan
2364957036 update spectral image (#21410)
Signed-off-by: wang yan <wangyan@vmware.com>
2025-01-15 03:41:15 +00:00
stonezdj(Daojun Zhang)
12382fa8ae Update prepare to avoid error when max_job_duration_hours not configured (#21395)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2025-01-10 10:56:43 +08:00
stonezdj(Daojun Zhang)
8ca455eb76 Add config max_job_duration_hours for jobservice (#21390)
Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2025-01-08 17:15:37 +08:00
Chlins Zhang
a548ab705f feat: extend the p2p preheat policy (#21115)
Add the field extra_attrs to the p2p preheat policy for the provider to
define their specified parameters when preheating.

Signed-off-by: chlins <chlins.zhang@gmail.com>
2024-12-18 10:30:36 +08:00
Hajnal Máté
4a12623459 Fix postgres script permissions (#21007)
The initdb.sh and the upgrade.sh scripts in the postgres image
were not owned by the postgres user, which made them failing
with permission denied errors.

Signed-off-by: Mate Hajnal <hajnalmt@gmail.com>
2024-11-25 14:53:19 +02:00
Jim Chen
67d0fecc7b feat: support Alibaba ACR proxy cache type (#19692)
* feat: support Alibaba ACR proxy cache type

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

* chore: replace  'Alibaba ACR' to 'Alibaba Cloud ACR'

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

---------

Signed-off-by: njucjc <njucjc@gmail.com>
Co-authored-by: chenjici.cjc <chenjinci.cjc@alibaba-inc.com>
2024-10-12 11:07:13 +08:00
miner
ab59a46a87 add prepare migration script for 2.12.0 (#21022)
Signed-off-by: yminer <miner.yang@broadcom.com>
2024-10-10 16:56:33 +08:00
Wang Yan
de281220b5 update golang version (#21014)
* update golang version

to golang v1.23.2

Signed-off-by: wang yan <wangyan@vmware.com>
2024-10-10 13:36:18 +08:00
Daniel Jiang
f6eec371d7 Bump up trivy adapter (#21015)
update the version and point to the URL of new repository under goharbor

Signed-off-by: Daniel Jiang <daniel.jiang@broadcom.com>
2024-10-10 11:10:06 +08:00
蝦米
cadd3825aa Fix #20658 docker-compose version is obsolete warning (#20659)
fix `version` is obsolete warning

Signed-off-by: 蝦米 <me@jhdxr.com>
Co-authored-by: Wang Yan <wangyan@vmware.com>
Co-authored-by: MinerYang <yminer@vmware.com>
2024-08-12 06:51:52 +00:00
stonezdj(Daojun Zhang)
eb5193e0ef Parallel attach ldap group (#20705)
Parallel attach LDAP group

  Add configure LDAP group attach parallel UI
  Change the /c/login timeout from 60 (nginx default) to 900 seconds in nginx.conf

Signed-off-by: stonezdj <stone.zhang@broadcom.com>
2024-08-09 15:24:25 +08:00