Skip to content
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
6 changes: 6 additions & 0 deletions .github/workflows/cd-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ jobs:
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}


- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v1
Expand All @@ -110,3 +111,8 @@ jobs:
flags: >
--allow-unauthenticated
--port=7007
--add-cloudsql-instances=${{ secrets.GCP_SQL_CONNECTION_NAME }}
env_vars: |
POSTGRES_HOST=${{ secrets.POSTGRES_HOST }}
POSTGRES_PORT=5432
BASE_URL=https://backstage.foundations-software-engineering.com
58 changes: 58 additions & 0 deletions .github/workflows/techdocs-gcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build and Publish TechDocs to GCS

on:
push:
branches:
- main
paths:
- 'docs/**'
- 'mkdocs.yml'

jobs:
publish-techdocs-site:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20.x']

env:
TECHDOCS_BUCKET_NAME: ${{ secrets.TECHDOCS_BUCKET_NAME }}
TECHDOCS_GCS_CREDENTIALS: ${{ secrets.TECHDOCS_GCS_CREDENTIALS }}
ENTITY_NAMESPACE: 'default'
ENTITY_KIND: 'Component'
ENTITY_NAME: 'code-idp-docs'

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Enable Corepack
run: corepack enable

- name: Set Yarn Version
run: corepack prepare [email protected] --activate

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

- name: Install techdocs-cli
run: yarn global add @techdocs/cli

- name: Install mkdocs and mkdocs-plugin
run: python3 -m pip install mkdocs-techdocs-core==1.*

- name: Generate docs site
run: techdocs-cli generate --no-docker --verbose

- name: Publish docs site
run: techdocs-cli publish --publisher-type googleGcs --storage-name $TECHDOCS_BUCKET_NAME --entity $ENTITY_NAMESPACE/$ENTITY_KIND/$ENTITY_NAME
6 changes: 3 additions & 3 deletions app-config.production.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
app:
baseUrl: https://backstage-deployment-1006240973223.europe-west10.run.app
baseUrl: https://backstage.foundations-software-engineering.com

backend:
baseUrl: https://backstage-deployment-1006240973223.europe-west10.run.app
baseUrl: https://backstage.foundations-software-engineering.com
cors:
origin: https://backstage-deployment-1006240973223.europe-west10.run.app
origin: https://backstage.foundations-software-engineering.com
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
credentials: true

Expand Down
6 changes: 5 additions & 1 deletion app-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ backend:
origin: http://localhost:3000
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
credentials: true

database:
client: pg
connection:
Expand All @@ -34,8 +35,11 @@ integrations:
- host: gitlab.com
token: ${GITLAB_TOKEN}


techdocs:
builder: 'external'
builder: 'external'
generator:
runIn: 'local'
publisher:
type: 'googleGcs'
googleGcs:
Expand Down
Empty file added docs/CHANGELOG.md
Empty file.
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ nav:
- Register Your Software Component: 'how-to-register-a-component.md'
- Technical Documentation:
- Publish Your Docs: 'how-to-publish-documentation.md'
- CHANGELOG: 'CHANGELOG.md'

plugins:
- techdocs-core
Expand Down
4 changes: 3 additions & 1 deletion packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"@backstage/plugin-permission-node": "^0.8.5",
"@backstage/plugin-proxy-backend": "^0.5.8",
"@backstage/plugin-scaffolder-backend": "^1.27.2",
"@backstage/plugin-scaffolder-backend-module-github": "^0.5.5",
"@backstage/plugin-scaffolder-backend-module-gitlab": "^0.7.1",
"@backstage/plugin-search-backend": "^1.7.0",
"@backstage/plugin-search-backend-module-catalog": "^0.2.5",
"@backstage/plugin-search-backend-module-pg": "^0.5.38",
Expand All @@ -47,7 +49,7 @@
"express": "^4.17.1",
"express-promise-router": "^4.1.0",
"node-gyp": "^9.0.0",
"pg": "^8.11.3"
"pg": "^8.13.1"
},
"devDependencies": {
"@backstage/cli": "^0.29.0",
Expand Down
6 changes: 5 additions & 1 deletion packages/backend/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const backend = createBackend();

backend.add(import('@backstage/plugin-app-backend'));
backend.add(import('@backstage/plugin-proxy-backend'))
backend.add(import('@backstage/plugin-scaffolder-backend'));
backend.add(import('@backstage/plugin-techdocs-backend'));

// Add the auth backend
Expand Down Expand Up @@ -117,6 +116,11 @@ backend.add(import('@backstage/plugin-catalog-backend'));
backend.add(import('@backstage/plugin-catalog-backend-module-scaffolder-entity-model'),
);

// scaffolder plugin
backend.add(import('@backstage/plugin-scaffolder-backend'));
backend.add(import('@backstage/plugin-scaffolder-backend-module-github'));
backend.add(import('@backstage/plugin-scaffolder-backend-module-gitlab'));

backend.add(import('@backstage/plugin-permission-backend'));
backend.add(
import('@backstage/plugin-permission-backend-module-allow-all-policy'),
Expand Down
6 changes: 4 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15420,6 +15420,8 @@ __metadata:
"@backstage/plugin-permission-node": "npm:^0.8.5"
"@backstage/plugin-proxy-backend": "npm:^0.5.8"
"@backstage/plugin-scaffolder-backend": "npm:^1.27.2"
"@backstage/plugin-scaffolder-backend-module-github": "npm:^0.5.5"
"@backstage/plugin-scaffolder-backend-module-gitlab": "npm:^0.7.1"
"@backstage/plugin-search-backend": "npm:^1.7.0"
"@backstage/plugin-search-backend-module-catalog": "npm:^0.2.5"
"@backstage/plugin-search-backend-module-pg": "npm:^0.5.38"
Expand All @@ -15436,7 +15438,7 @@ __metadata:
express: "npm:^4.17.1"
express-promise-router: "npm:^4.1.0"
node-gyp: "npm:^9.0.0"
pg: "npm:^8.11.3"
pg: "npm:^8.13.1"
languageName: unknown
linkType: soft

Expand Down Expand Up @@ -28602,7 +28604,7 @@ __metadata:
languageName: node
linkType: hard

"pg@npm:^8.11.3":
"pg@npm:^8.11.3, pg@npm:^8.13.1":
version: 8.13.1
resolution: "pg@npm:8.13.1"
dependencies:
Expand Down