Skip to content

Commit

Permalink
merge humanitec plugins from The Frontside
Browse files Browse the repository at this point in the history
  • Loading branch information
johanneswuerbach committed May 3, 2024
2 parents 762645c + 63880ab commit 8549978
Show file tree
Hide file tree
Showing 59 changed files with 3,078 additions and 58 deletions.
4 changes: 4 additions & 0 deletions app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,7 @@ catalog:
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml
# rules:
# - allow: [User, Group]

humanitec:
orgId: humanitec-backstage-plugins
token: ${HUMANITEC_TOKEN} # without Bearer
7 changes: 5 additions & 2 deletions examples/entities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,12 @@ spec:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: example-website
name: example-service
annotations:
"humanitec.com/orgId": "humanitec-backstage-plugins"
"humanitec.com/appId": "example-service"
spec:
type: website
type: service
lifecycle: experimental
owner: guests
system: examples
Expand Down
3 changes: 2 additions & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"@backstage/plugin-techdocs-react": "^1.2.3",
"@backstage/plugin-user-settings": "^0.8.5",
"@backstage/theme": "^0.5.3",
"@frontside/backstage-plugin-humanitec": "^0.3.15",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"history": "^5.0.0",
Expand All @@ -51,10 +52,10 @@
"devDependencies": {
"@backstage/test-utils": "^1.5.4",
"@playwright/test": "^1.32.3",
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.0.0",
"@testing-library/dom": "^9.0.0",
"@types/react-dom": "*",
"cross-env": "^7.0.0"
},
Expand Down
4 changes: 4 additions & 0 deletions packages/app/src/components/catalog/EntityPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ import {

import { TechDocsAddons } from '@backstage/plugin-techdocs-react';
import { ReportIssue } from '@backstage/plugin-techdocs-module-addons-contrib';
import { HumanitecCardComponent } from '@frontside/backstage-plugin-humanitec';

const techdocsContent = (
<EntityTechdocsContent>
Expand Down Expand Up @@ -137,6 +138,9 @@ const overviewContent = (
<Grid item md={8} xs={12}>
<EntityHasSubcomponentsCard variant="gridItem" />
</Grid>
<Grid item md={6}>
<HumanitecCardComponent />
</Grid>
</Grid>
);

Expand Down
1 change: 1 addition & 0 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@backstage/plugin-search-backend-module-techdocs": "^0.1.22",
"@backstage/plugin-search-backend-node": "^1.2.21",
"@backstage/plugin-techdocs-backend": "^1.10.4",
"@frontside/backstage-plugin-humanitec-backend": "^0.3.17",
"app": "link:../app",
"better-sqlite3": "^9.0.0",
"dockerode": "^3.3.1",
Expand Down
4 changes: 4 additions & 0 deletions packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*/

import { createBackend } from '@backstage/backend-defaults';
import { legacyPlugin } from '@backstage/backend-common';

const backend = createBackend();

Expand Down Expand Up @@ -38,4 +39,7 @@ backend.add(import('@backstage/plugin-search-backend/alpha'));
backend.add(import('@backstage/plugin-search-backend-module-catalog/alpha'));
backend.add(import('@backstage/plugin-search-backend-module-techdocs/alpha'));

// humanitec
backend.add(legacyPlugin('humanitec', import('./plugins/humanitec')));

backend.start();
12 changes: 12 additions & 0 deletions packages/backend/src/plugins/humanitec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { createRouter } from '@frontside/backstage-plugin-humanitec-backend';
import { Router } from 'express';
import { PluginEnvironment } from '../types';

export default async function createPlugin(
env: PluginEnvironment,
): Promise<Router> {
return await createRouter({
logger: env.logger,
config: env.config,
});
}
1 change: 1 addition & 0 deletions plugins/humanitec-backend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
180 changes: 180 additions & 0 deletions plugins/humanitec-backend/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
# @frontside/backstage-plugin-humanitec-backend

## 0.3.17

### Patch Changes

- f9b16e1: Update backstage dependencies
- Updated dependencies [f9b16e1]
- @frontside/backstage-plugin-humanitec-common@0.3.13

## 0.3.16

### Patch Changes

- fc748dd: Handle disconnects while fetching app info

## 0.3.15

### Patch Changes

- b9e57e3: Continue polling when an error is returned.

## 0.3.14

### Patch Changes

- bfed947: Deduplicate updates for the same orgId/appId
- Updated dependencies [bfed947]
- @frontside/backstage-plugin-humanitec-common@0.3.12

## 0.3.13

### Patch Changes

- c161cc4: Fixed connection when using authenticated API requests
- Updated dependencies [c161cc4]
- @frontside/backstage-plugin-humanitec-common@0.3.11

## 0.3.12

### Patch Changes

- b6f76c1: Bump Backstage to `1.20.x` along with related dependencies. This includes a bump of Knex to v3. Additionally, this version of Backstage begins to shift scaffolder alpha features into the mainline which affects the types in related packages.
- Updated dependencies [b6f76c1]
- @frontside/backstage-plugin-humanitec-common@0.3.10

## 0.3.11

### Patch Changes

- c503329: Bump Backstage to 1.18.4 and related dependencies.
- Updated dependencies [c503329]
- @frontside/backstage-plugin-humanitec-common@0.3.9

## 0.3.10

### Patch Changes

- edf4591: Backport graphql plugins from Backstage PRFC [#15519](https://github.com/backstage/backstage/pull/15519)

## 0.3.9

### Patch Changes

- 181c413: Upgraded to Backstage 1.17
- Updated dependencies [181c413]
- @frontside/backstage-plugin-humanitec-common@0.3.8

## 0.3.8

### Patch Changes

- d8cbd21: bump backstage
- Updated dependencies [d8cbd21]
- @frontside/backstage-plugin-humanitec-common@0.3.7

## 0.3.7

### Patch Changes

- 1c1b178: Upgraded to Backstage 1.12.1
- Updated dependencies [1c1b178]
- @frontside/backstage-plugin-humanitec-common@0.3.6

## 0.3.6

### Patch Changes

- 05f3423: Upgraded to Backstage 1.11.1
- Updated dependencies [05f3423]
- @frontside/backstage-plugin-humanitec-common@0.3.4

## 0.3.5

### Patch Changes

- d803873: upgrade backstage dependencies
- Updated dependencies [d803873]
- @frontside/backstage-plugin-humanitec-common@0.3.3

## 0.3.4

### Patch Changes

- d62b0ad: Upgraded to Backstage 1.9
- Updated dependencies [d62b0ad]
- @frontside/backstage-plugin-humanitec-common@0.3.2

## 0.3.3

### Patch Changes

- da0b58f: Fix Humanitec package distribution
- Updated dependencies [da0b58f]
- @frontside/backstage-plugin-humanitec-common@0.3.1

## 0.3.2

### Patch Changes

- ad0fde9: Upgrade backstage to 1.7 and bump effection dependencies

## 0.3.1

### Patch Changes

- 2a52c92: Upgraded dependencies to bring inline with Backstage 1.6
- Updated dependencies [2a52c92]
- Updated dependencies [e914d87]
- @frontside/backstage-plugin-humanitec-common@0.3.0

## 0.3.0

### Minor Changes

- 2837d26: Doing a minor release to show that publishing is working

### Patch Changes

- Updated dependencies [2837d26]
- @frontside/backstage-plugin-humanitec-common@0.2.0

## 0.2.4

### Patch Changes

- Manually publish packages
- Updated dependencies
- @frontside/backstage-plugin-humanitec-common@0.1.4

## 0.2.3

### Patch Changes

- bf70ff9: Fixed publishing pipeline and releasing
- Updated dependencies [bf70ff9]
- @frontside/backstage-plugin-humanitec-common@0.1.3

## 0.2.2

### Patch Changes

- 3ee04fe: Nothing changed, just experimenting with preview publish
- Updated dependencies [3ee04fe]
- @frontside/backstage-plugin-humanitec-common@0.1.2

## 0.2.1

### Patch Changes

- 0fc9f4f: Introducing a @frontside/backstage-plugin-humanitec-common package
- b95bda8: Adding missing dist files from Humanitec bundles
- Updated dependencies [0fc9f4f]
- @frontside/backstage-plugin-humanitec-common@0.1.1

## 0.2.0

### Minor Changes

- c3e89bd: Initial release of Humanitec plugin for Backstage
Loading

0 comments on commit 8549978

Please sign in to comment.