@digitalist-open-cloud/backstage-plugin-harbor-backend

中文文档
0.9.0发布于 2025/09/04Apache-2.0TypeScriptCommonJS近 30 天下载 2549

This plugin will show information about your docker images within Harbor.

原始使用文档
文档目录6 节
  1. Getting started
  2. Enabling backend
  3. Backend
  4. Configuration
  5. Contributing
  6. History

Backstage Harbor Backend plugin

This plugin will show information about your docker images within Harbor.

This is a fork, and no promises for backwards compatibility. But have been tested on Backstage 1.29.x (version 0.4.2 of this plugin) and 1.37.x (0.6.0).

For the original code, please see the GitHub repo

Getting started

First install frontend

Enabling backend

Backend

yarn --cwd packages/backend add @digitalist-open-cloud/backstage-plugin-harbor-backend

Add to packages/backend/src/index.ts:

backend.add(import('@digitalist-open-cloud/backstage-plugin-harbor-backend'))

Now, jump to configuration step.

Configuration

The plugin requires configuration in the Backstage app-config.yaml to connect to Harbor API.

harbor:
  # This is the traditional way of configuring the Harbor plugin.
  baseUrl: https://harbor.yourdomain.com
  username: ${HARBOR_USERNAME}
  password: ${HARBOR_PASSWORD}

  # This is the way to go if you need to connect to multiple Harbor instances. You can also combine those approaches.
  instances:
    - host: harbor2.yourdomain.com
      baseUrl: https://harbor2.yourdomain.com
      username: ${HARBOR_USERNAME}
      password: ${HARBOR_PASSWORD}

Adding annotations and values to your component file.

apiVersion: backstage.io/v1alpha1
kind: System
metadata:
  name: sample-system
  description: "A sample system"
  annotations:
    # This will use harbor.baseUrl
    goharbor.io/repository-slug: project/repository
    # OR
    # This will use harbor.instances[].baseUrl based on the matching host
    goharbor.io/repository-slug: harbor.yourdomain.com/project/repository
    # OR
    # This will fetch the first image from harbor.baseUrl and the second image from harbor.instances[].baseUrl
    goharbor.io/repository-slug: project/repository, harbor.yourdomain.com/project/repository

Contributing

Please contribute back to the original repo, and you are free to use any code from this repo to contribute back to the original repo without giving us credit.

History

This Backstage plugin was initially created by BESTSELLER and transferred to Container Registry. This fork was started because of an acute need, and to keep code up to date with Backstage.

版本与发布记录

@digitalist-open-cloud/backstage-plugin-harbor-backend 共发布 25 个版本,首次发布于 2024/07/19;过去 12 个月发布了 0 个版本。

版本发布日期距今
0.9.0latest2025/09/041.2 年前
0.8.02025/07/181.3 年前
0.7.12025/06/201.4 年前
0.7.02025/06/041.4 年前
0.6.32025/05/051.5 年前
0.6.22025/04/151.6 年前

关于 @digitalist-open-cloud/backstage-plugin-harbor-backend 的常见问题

@digitalist-open-cloud/backstage-plugin-harbor-backend 是什么?

This plugin will show information about your docker images within Harbor.

如何安装 @digitalist-open-cloud/backstage-plugin-harbor-backend?

在项目目录运行 npm install @digitalist-open-cloud/backstage-plugin-harbor-backend,或使用 pnpm add / yarn add / bun add。

@digitalist-open-cloud/backstage-plugin-harbor-backend 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@digitalist-open-cloud/backstage-plugin-harbor-backend 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@digitalist-open-cloud/backstage-plugin-harbor-backend 可以商用吗?

@digitalist-open-cloud/backstage-plugin-harbor-backend 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@digitalist-open-cloud/backstage-plugin-harbor-backend 的下载量有多少?

根据 npm 官方下载统计,@digitalist-open-cloud/backstage-plugin-harbor-backend 在 2026/10/12 – 2026/11/10 这 30 天内被下载 2,549 次,日均约 85 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@digitalist-open-cloud/backstage-plugin-harbor-backend 还在维护吗?

最新版本 0.9.0 发布于 2025/09/04(1.2 年前);至今共发布 25 个版本,其中过去 12 个月发布了 0 个;首次发布于 2024/07/19。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。