Skip to content

Commit ce9c944

Browse files
authored
Merge pull request #13 from kadras-io/update-to-backstage-1.30.0
Update to backstage 1.30.0
2 parents dd61460 + 6735a89 commit ce9c944

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+8846
-6938
lines changed

.dockerignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ packages/*/src
66
packages/*/node_modules
77
plugins
88
*.local.yaml
9+
.github
10+
compose.yml
11+
*.md
12+
demo-catalog

.github/workflows/commit-stage.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
jobs:
1111
build:
1212
name: Build
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414
permissions:
1515
contents: read
1616
steps:
@@ -20,25 +20,41 @@ jobs:
2020
- name: Set up Node
2121
uses: actions/setup-node@v4
2222
with:
23-
node-version-file: '.nvmrc'
23+
node-version: 20
2424
cache: 'yarn'
2525

2626
- name: Install dependencies
2727
run: |
2828
yarn install --frozen-lockfile
29+
30+
- name: Validate configuration
31+
run: |
32+
yarn backstage-cli config:check --lax
33+
34+
- name: Validate types and definitions
35+
run: |
36+
yarn tsc:full
2937
3038
- name: Prettier
3139
run: |
32-
yarn run prettier:check
40+
yarn prettier:check
3341
34-
- name: Compile and test
42+
- name: Build
43+
run: |
44+
yarn build:all
45+
46+
- name: Lint
47+
run: |
48+
yarn lint:all
49+
50+
- name: Test
3551
run: |
36-
yarn run ci
52+
yarn test:all
3753
3854
package:
3955
if: ${{ github.ref == 'refs/heads/main' }}
4056
needs: [ build ]
41-
runs-on: ubuntu-22.04
57+
runs-on: ubuntu-24.04
4258
permissions:
4359
contents: read
4460
packages: write
@@ -55,7 +71,7 @@ jobs:
5571
- name: Set up Node
5672
uses: actions/setup-node@v4
5773
with:
58-
node-version-file: '.nvmrc'
74+
node-version: 20
5975
cache: 'yarn'
6076

6177
- name: Install dependencies
@@ -101,7 +117,7 @@ jobs:
101117
registry: ${{ env.REGISTRY }}
102118

103119
- name: Build and push
104-
uses: docker/build-push-action@v5
120+
uses: docker/build-push-action@v6
105121
id: build
106122
with:
107123
context: .
@@ -127,7 +143,7 @@ jobs:
127143
merge:
128144
if: ${{ github.ref == 'refs/heads/main' }}
129145
needs: [package]
130-
runs-on: ubuntu-22.04
146+
runs-on: ubuntu-24.04
131147
permissions:
132148
contents: read
133149
packages: write
@@ -144,7 +160,7 @@ jobs:
144160
uses: docker/setup-buildx-action@v3
145161

146162
- name: Install Cosign
147-
uses: sigstore/cosign-installer@v3.4.0
163+
uses: sigstore/cosign-installer@v3.6.0
148164

149165
- name: Generate Docker meta information
150166
id: meta

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ node_modules/
2424
!.yarn/sdks
2525
!.yarn/versions
2626

27+
# Node version directives
28+
.nvmrc
29+
2730
# dotenv environment variables file
2831
.env
2932
.env.test

.nvmrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.prettierignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ dist-types
33
coverage
44
.vscode
55
.github
6-
docker-compose.yml
6+
compose.yml
77
CODE_OF_CONDUCT.md
8-
MAINTAINERS.md
8+
MAINTAINERS.md
9+
demo-catalog

app-config.production.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,35 @@
11
app:
2+
# Should be the same as backend.baseUrl when using the `app-backend` plugin.
23
baseUrl: ${BACKSTAGE_BASE_URL}
34

45
backend:
5-
auth:
6-
keys:
7-
- secret: ${BACKSTAGE_BACKEND_SECRET}
6+
# Note that the baseUrl should be the URL that the browser and other clients
7+
# should use when communicating with the backend, i.e. it needs to be
8+
# reachable not just from within the backend host, but from all of your
9+
# callers. When its value is "http://localhost:7007", it's strictly private
10+
# and can't be reached by others.
811
baseUrl: ${BACKSTAGE_BASE_URL}
912
cors:
1013
origin: ${BACKSTAGE_BASE_URL}
14+
# The listener can also be expressed as a single <host>:<port> string. In this case we bind to
15+
# all interfaces, the most permissive setting. The right value depends on your specific deployment.
16+
# listen: ':7007'
1117
listen:
1218
port: 7007
1319

1420
auth:
15-
autologout:
16-
enabled: true
1721
environment: production
1822
providers:
23+
# See https://backstage.io/docs/auth/github/provider
1924
github:
2025
production:
21-
clientId: ${GITHUB_AUTH_PROVIDER_CLIENT_ID}
22-
clientSecret: ${GITHUB_AUTH_PROVIDER_CLIENT_SECRET}
26+
clientId: ${AUTH_GITHUB_CLIENT_ID}
27+
clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}
28+
## uncomment if using GitHub Enterprise
29+
# enterpriseInstanceUrl: ${AUTH_GITHUB_ENTERPRISE_INSTANCE_URL}
30+
signIn:
31+
resolvers:
32+
- resolver: usernameMatchingUserEntityName
2333

2434
catalog:
2535
locations: []

app-config.yaml

Lines changed: 69 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ backend:
99
baseUrl: http://localhost:7007
1010
listen:
1111
port: 7007
12+
# Uncomment the following host directive to bind to specific interfaces
13+
# host: 127.0.0.1
1214
csp:
13-
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
1415
connect-src: ["'self'", 'http:', 'https:']
16+
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
17+
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
1518
cors:
1619
origin: http://localhost:3000
1720
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
1821
credentials: true
22+
# Config options: https://node-postgres.com/apis/client
1923
database:
2024
client: pg
2125
connection:
@@ -29,11 +33,29 @@ backend:
2933
# ssl:
3034
# ca: # if you have a CA file and want to verify it you can uncomment this section
3135
# $file: <file-path>/ca/server.crt
36+
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir
37+
# reading:
38+
# allow:
39+
# - host: "*.swagger.io"
3240

3341
integrations:
3442
github:
3543
- host: github.com
44+
# This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information
45+
# about setting up the GitHub integration here: https://backstage.io/docs/integrations/github/locations#configuration
3646
token: ${GITHUB_TOKEN}
47+
### Example for how to add your GitHub Enterprise instance using the API:
48+
# - host: ghe.example.net
49+
# apiBaseUrl: https://ghe.example.net/api/v3
50+
# token: ${GHE_TOKEN}
51+
52+
proxy:
53+
### Example for how to add a proxy endpoint for the frontend.
54+
### A typical reason to do this is to handle HTTPS and CORS for internal services.
55+
# endpoints:
56+
# '/test':
57+
# target: 'https://example.com'
58+
# changeOrigin: true
3759

3860
# Reference documentation http://backstage.io/docs/features/techdocs/configuration
3961
# Note: After experimenting with basic setup, use CI/CD to generate docs
@@ -47,38 +69,70 @@ techdocs:
4769
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.
4870

4971
auth:
72+
# See https://backstage.io/docs/auth/autologout
5073
autologout:
5174
enabled: false
75+
idleTimeoutMinutes: 60
76+
promptBeforeIdleSeconds: 10
77+
useWorkerTimers: true
78+
logoutIfDisconnected: true
5279
environment: development
80+
# See https://backstage.io/docs/auth
5381
providers:
82+
# See https://backstage.io/docs/auth/github/provider
5483
github:
5584
development:
56-
clientId: ${GITHUB_AUTH_PROVIDER_CLIENT_ID}
57-
clientSecret: ${GITHUB_AUTH_PROVIDER_CLIENT_SECRET}
85+
clientId: ${AUTH_GITHUB_CLIENT_ID}
86+
clientSecret: ${AUTH_GITHUB_CLIENT_SECRET}
87+
## uncomment if using GitHub Enterprise
88+
# enterpriseInstanceUrl: ${AUTH_GITHUB_ENTERPRISE_INSTANCE_URL}
89+
signIn:
90+
resolvers:
91+
- resolver: usernameMatchingUserEntityName
92+
# - resolver: emailMatchingUserEntityProfileEmail
93+
# - resolver: emailLocalPartMatchingUserEntityName
94+
95+
enableExperimentalRedirectFlow: false
5896

5997
scaffolder:
98+
# see https://backstage.io/docs/features/software-templates/configuration for software template options
6099
defaultAuthor:
61100
name: Kadras Developer Portal
62-
email: scaffolder@backstage.io
101+
email: scaffolder@kadras.io
63102
defaultCommitMessage: 'Initial commit'
64103

65104
catalog:
66105
import:
67106
entityFilename: catalog-info.yaml
68107
pullRequestBranchName: backstage-integration
69108
rules:
70-
- allow: [Component, System, API, Resource, Location]
109+
- allow: [API, Component, Location, Resource, System]
71110
locations:
72-
## Uncomment these lines to add more example data
73-
# - type: url
74-
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml
75-
76-
- type: url
77-
target: https://github.com/ThomasVitale/symphony-for-dev-and-platform/blob/main/platform/catalog/organization/catalog-info.yml
111+
# Users and Groups
112+
- type: file
113+
target: ../../demo-catalog/organizations/organization-kadras.yml
114+
rules:
115+
- allow: [Group, Location, User]
116+
- type: file
117+
target: ../../demo-catalog/organizations/organization-guest.yml
78118
rules:
79-
- allow: [User, Group, Location]
119+
- allow: [Group, User]
80120

81-
- type: url
82-
target: https://github.com/ThomasVitale/symphony-for-dev-and-platform/blob/main/platform/catalog/templates/catalog-info.yml
121+
# Templates
122+
- type: file
123+
target: ../../demo-catalog/templates/templates.yml
83124
rules:
84-
- allow: [Template, Location]
125+
- allow: [Location, Template]
126+
127+
# see https://backstage.io/docs/features/kubernetes/configuration for kubernetes configuration options
128+
kubernetes:
129+
serviceLocatorMethod:
130+
type: 'multiTenant'
131+
clusterLocatorMethods:
132+
- type: 'config'
133+
clusters: []
134+
135+
# see https://backstage.io/docs/permissions/getting-started for more on the permission framework
136+
permission:
137+
# setting this to `false` will disable permissions
138+
enabled: true

backstage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "1.23.4"
2+
"version": "1.30.0"
33
}
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
version: "3.8"
21
services:
32

43
postgres:
5-
image: postgres:16.2-alpine
4+
image: docker.io/library/postgres:16.4-alpine
65
container_name: "postgres"
76
ports:
87
- 5432:5432
@@ -13,15 +12,16 @@ services:
1312
backstage:
1413
image: backstage
1514
container_name: "backstage"
15+
depends_on:
16+
- postgres
1617
ports:
1718
- 7007:7007
1819
environment:
1920
- BACKSTAGE_BASE_URL=http://localhost:7007
20-
- BACKSTAGE_BACKEND_SECRET=lYXoL2XuDhIJE07CMTOunVB0pdZNCgS2
2121
- POSTGRES_HOST=postgres
2222
- POSTGRES_PORT=5432
2323
- POSTGRES_USER=user
2424
- POSTGRES_PASSWORD=password
2525
- GITHUB_TOKEN
26-
- GITHUB_AUTH_PROVIDER_CLIENT_ID
27-
- GITHUB_AUTH_PROVIDER_CLIENT_SECRET
26+
- AUTH_GITHUB_CLIENT_ID
27+
- AUTH_GITHUB_CLIENT_SECRET
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
apiVersion: backstage.io/v1alpha1
3+
kind: Group
4+
metadata:
5+
name: guests
6+
spec:
7+
type: team
8+
children: []
9+
10+
---
11+
apiVersion: backstage.io/v1alpha1
12+
kind: User
13+
metadata:
14+
name: guest
15+
spec:
16+
memberOf: [guests]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
apiVersion: backstage.io/v1alpha1
3+
kind: Group
4+
metadata:
5+
name: kadras
6+
title: Kadras
7+
description: Researching technology to power your path from idea to production on Kubernetes
8+
links:
9+
- url: https://www.kadras.io
10+
title: Website
11+
- url: https://github.com/kadras-io
12+
title: GitHub
13+
icon: github
14+
spec:
15+
type: organization
16+
profile:
17+
displayName: Kadras
18+
picture: https://avatars.githubusercontent.com/u/122495299?s=400&u=b7253f864937e362b42c0b390da51ea9492194f4&v=4
19+
children: []
20+
21+
---
22+
apiVersion: backstage.io/v1alpha1
23+
kind: User
24+
metadata:
25+
name: ThomasVitale
26+
title: Thomas Vitale
27+
spec:
28+
memberOf: [kadras]
29+
profile:
30+
displayName: Thomas Vitale
31+
32+
picture: https://avatars.githubusercontent.com/u/8523418?s=400&u=0ff9935d7aef1e1a735c661da9703c85513320ca&v=4

0 commit comments

Comments
 (0)