Skip to content
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

feat: use plugin scaffolding helpers #31

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ jobs:

- name: Configure correct org after copying from template
run: |
# Ensure correct github org
find ./templates -type f -name "*.yaml" -exec sed -i 's/humanitec-architecture/${{ github.repository_owner }}/g' {} +

# Ensure correct humanitec org
sed -i 's/humanitec-architecture/${{ vars.HUMANITEC_ORG_ID }}/g' catalog-info.yaml

Expand Down
4 changes: 2 additions & 2 deletions app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ catalog:
humanitec:
orgId: ${HUMANITEC_ORG_ID}
token: ${HUMANITEC_TOKEN}

cloudProvider: ${CLOUD_PROVIDER}
cloudProvider: ${CLOUD_PROVIDER}
githubOrgId: ${GITHUB_ORG_ID}
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"@backstage/plugin-techdocs-react": "^1.2.3",
"@backstage/plugin-user-settings": "^0.8.5",
"@backstage/theme": "^0.5.3",
"@humanitec/backstage-plugin": "^0.5.1",
"@humanitec/backstage-plugin": "^0.6.0",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"backstage-plugin-techdocs-addon-mermaid": "^0.11.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
catalogImportPlugin,
} from '@backstage/plugin-catalog-import';
import { ScaffolderPage, scaffolderPlugin } from '@backstage/plugin-scaffolder';
import { ValidateHumanitecAppIDFieldExtension } from './scaffolder/ValidateHumanitecAppID';
import { ValidateHumanitecAppIDFieldExtension } from '@humanitec/backstage-plugin';
import { ScaffolderFieldExtensions } from '@backstage/plugin-scaffolder-react';
import { orgPlugin } from '@backstage/plugin-org';
import { SearchPage } from '@backstage/plugin-search';
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 2 additions & 4 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
"dependencies": {
"@backstage/backend-common": "^0.21.7",
"@backstage/backend-defaults": "^0.2.17",
"@backstage/backend-plugin-api": "^0.6.17",
"@backstage/backend-tasks": "^0.5.22",
"@backstage/config": "^1.2.0",
"@backstage/plugin-app-backend": "^0.3.65",
Expand All @@ -35,14 +34,13 @@
"@backstage/plugin-proxy-backend": "^0.4.15",
"@backstage/plugin-scaffolder-backend": "^1.22.4",
"@backstage/plugin-scaffolder-backend-module-github": "^0.2.7",
"@backstage/plugin-scaffolder-node": "^0.4.3",
"@backstage/plugin-search-backend": "^1.5.7",
"@backstage/plugin-search-backend-module-catalog": "^0.1.22",
"@backstage/plugin-search-backend-module-techdocs": "^0.1.22",
"@backstage/plugin-search-backend-node": "^1.2.21",
"@backstage/plugin-techdocs-backend": "^1.10.4",
"@humanitec/backstage-plugin-backend": "^0.6.0",
"@humanitec/backstage-plugin-scaffolder-backend-module": "^0.1.0",
"@humanitec/backstage-plugin-backend": "^0.6.3",
"@humanitec/backstage-plugin-scaffolder-backend-module": "^0.3.0",
"app": "link:../app",
"better-sqlite3": "^9.0.0",
"dockerode": "^3.3.1",
Expand Down
68 changes: 0 additions & 68 deletions packages/backend/src/actions/get-environment.ts

This file was deleted.

2 changes: 0 additions & 2 deletions packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ backend.add(import('@backstage/plugin-search-backend-module-techdocs/alpha'));
// scaffolder plugin
backend.add(import('@backstage/plugin-scaffolder-backend/alpha'));
backend.add(import('@backstage/plugin-scaffolder-backend-module-github'));
// backend:get-environment used in humanitec templates
backend.add(import('./actions/get-environment'));

// humanitec
backend.add(import('@humanitec/backstage-plugin-backend'));
Expand Down
4 changes: 2 additions & 2 deletions templates/node-service/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
steps:
- name: Read Environment
id: environment
action: backend:get-environment
action: humanitec:get-environment

- id: fetch-base
name: Fetch Base
Expand All @@ -48,7 +48,7 @@ spec:
allowedHosts: ['github.com']
defaultBranch: main
description: This is ${{ parameters.componentName }}
repoUrl: github.com?owner=humanitec-architecture&repo=${{ parameters.componentName }}
repoUrl: github.com?owner=${{ steps.environment.output.githubOrgId }}&repo=${{ parameters.componentName }}
repoVisibility: public
protectDefaultBranch: false
oidcCustomization: ${{ steps.environment.output.githubOIDCCustomization }}
Expand Down
4 changes: 2 additions & 2 deletions templates/podinfo-example/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
steps:
- name: Read Environment
id: environment
action: backend:get-environment
action: humanitec:get-environment

- id: fetch-base
name: Fetch Base
Expand All @@ -48,7 +48,7 @@ spec:
allowedHosts: ['github.com']
defaultBranch: main
description: This is ${{ parameters.componentName }}
repoUrl: github.com?owner=humanitec-architecture&repo=${{ parameters.componentName }}
repoUrl: github.com?owner=${{ steps.environment.output.githubOrgId }}&repo=${{ parameters.componentName }}
repoVisibility: public
protectDefaultBranch: false
oidcCustomization: ${{ steps.environment.output.githubOIDCCustomization }}
Expand Down
Loading