Skip to content

Commit ccb8fbe

Browse files
update to 1.31.0-next.2
1 parent e4687fc commit ccb8fbe

Some content is hidden

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

48 files changed

+38587
-31180
lines changed

.dockerignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
.git
2-
#.yarn/cache
3-
#.yarn/install-state.gz
42
#node_modules
53
#packages/*/src
64
#packages/*/node_modules
@@ -13,3 +11,5 @@ packages/*/dist
1311
packages/*/node_modules
1412
plugins/*/dist
1513
plugins/*/node_modules
14+
.yarn/cache
15+
.yarn/install-state.gz

.github/workflows/docker-build.yml

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,47 +14,46 @@ env:
1414
PROJECT: backstage
1515

1616
jobs:
17-
1817
build:
1918
if: github.event.pull_request.merged == false
2019
runs-on: ubuntu-latest
2120

2221
steps:
23-
- uses: actions/checkout@v4
22+
- uses: actions/checkout@v4
2423

25-
- name: Docker meta
26-
id: meta
27-
uses: docker/metadata-action@v5
28-
with:
29-
images: |
30-
"${{ secrets.REGISTRY }}/${{ env.ORG }}/${{ env.PROJECT }}"
31-
tags: |
32-
type=schedule
33-
type=ref,event=branch
34-
type=ref,event=pr
35-
type=semver,pattern={{version}}
36-
type=semver,pattern={{major}}.{{minor}}
37-
type=semver,pattern={{major}}
38-
type=sha
24+
- name: Docker meta
25+
id: meta
26+
uses: docker/metadata-action@v5
27+
with:
28+
images: |
29+
"${{ secrets.REGISTRY }}/${{ env.ORG }}/${{ env.PROJECT }}"
30+
tags: |
31+
type=schedule
32+
type=ref,event=branch
33+
type=ref,event=pr
34+
type=semver,pattern={{version}}
35+
type=semver,pattern={{major}}.{{minor}}
36+
type=semver,pattern={{major}}
37+
type=sha
3938
40-
- name: Set up Docker Buildx
41-
uses: docker/setup-buildx-action@v3
39+
- name: Set up Docker Buildx
40+
uses: docker/setup-buildx-action@v3
4241

43-
- name: Build and push
44-
uses: docker/build-push-action@v5
45-
with:
46-
context: .
47-
tags: ${{ steps.meta.outputs.tags }}
48-
labels: ${{ steps.meta.outputs.labels }}
49-
push: false
42+
- name: Build and push
43+
uses: docker/build-push-action@v5
44+
with:
45+
context: .
46+
tags: ${{ steps.meta.outputs.tags }}
47+
labels: ${{ steps.meta.outputs.labels }}
48+
push: false
5049

5150
push_if_merged:
5251
if: github.event.pull_request.merged == true
5352
runs-on: ubuntu-latest
5453

5554
steps:
5655
- uses: actions/checkout@v4
57-
56+
5857
- name: Docker meta
5958
id: meta
6059
uses: docker/metadata-action@v5

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,4 @@ site
4949

5050
# vscode database functionality support files
5151
*.session.sql
52+
app-config.yaml

.yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

Lines changed: 541 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

Lines changed: 28 additions & 0 deletions
Large diffs are not rendered by default.

.yarn/releases/yarn-3.5.0.cjs

Lines changed: 873 additions & 0 deletions
Large diffs are not rendered by default.

.yarnclean

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# test directories
2+
__tests__
3+
test
4+
tests
5+
powered-test
6+
7+
# asset directories
8+
docs
9+
doc
10+
website
11+
images
12+
assets
13+
14+
# examples
15+
example
16+
examples
17+
18+
# code coverage directories
19+
coverage
20+
.nyc_output
21+
22+
# build scripts
23+
Makefile
24+
Gulpfile.js
25+
Gruntfile.js
26+
27+
# configs
28+
appveyor.yml
29+
circle.yml
30+
codeship-services.yml
31+
codeship-steps.yml
32+
wercker.yml
33+
.tern-project
34+
.gitattributes
35+
.editorconfig
36+
.*ignore
37+
.eslintrc
38+
.jshintrc
39+
.flowconfig
40+
.documentup.json
41+
.yarn-metadata.json
42+
.travis.yml
43+
44+
# misc
45+
*.md

.yarnrc.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
compressionLevel: mixed
2+
3+
enableGlobalCache: false
4+
5+
nodeLinker: node-modules
6+
7+
plugins:
8+
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
9+
spec: "@yarnpkg/plugin-interactive-tools"
10+
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
11+
spec: "@yarnpkg/plugin-workspace-tools"
12+
13+
yarnPath: .yarn/releases/yarn-3.5.0.cjs

Dockerfile

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# syntax=docker/dockerfile:1.2
22

33
# Stage 1 - Create yarn install skeleton layer
4-
FROM node:18-bookworm-slim AS packages
4+
FROM node:20-bookworm-slim AS packages
55

66
WORKDIR /app
7-
COPY package.json yarn.lock ./
7+
8+
# Set up Yarn 3.5
9+
RUN corepack enable && \
10+
corepack prepare yarn@3.5.0 --activate
11+
12+
COPY package.json yarn.lock .yarnrc.yml ./
13+
COPY .yarn .yarn
814

915
COPY packages packages
1016

@@ -14,12 +20,13 @@ COPY plugins plugins
1420
RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 2 -exec rm -rf {} \+
1521

1622
# Stage 2 - Install dependencies and build packages
17-
FROM node:18-bookworm-slim AS build
23+
FROM node:20-bookworm-slim AS build
1824

1925
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
2026
RUN apt-get update && \
21-
apt-get install -y --no-install-recommends python3 g++ build-essential && \
22-
yarn config set python /usr/bin/python3
27+
apt-get install -y --no-install-recommends python3 g++ git build-essential && \
28+
corepack enable && \
29+
corepack prepare yarn@3.5.0 --activate
2330

2431
# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
2532
# in which case you should also move better-sqlite3 to "devDependencies" in package.json.
@@ -34,26 +41,27 @@ COPY --from=packages --chown=node:node /app .
3441
ENV CYPRESS_CACHE_FOLDER /app/cypress_cache
3542
RUN mkdir -p /app/cypress_cache && chown -R node:node /app/cypress_cache
3643

37-
RUN yarn install --frozen-lockfile --network-timeout 600000
44+
RUN yarn install --immutable
3845

3946
COPY --chown=node:node . .
4047

48+
RUN yarn postinstall
49+
4150
RUN yarn tsc
42-
RUN yarn --cwd packages/backend build
43-
# If you have not yet migrated to package roles, use the following command instead:
44-
# RUN yarn --cwd packages/backend backstage-cli backend:bundle --build-dependencies
51+
RUN yarn build:backend
4552

4653
RUN mkdir packages/backend/dist/skeleton packages/backend/dist/bundle \
4754
&& tar xzf packages/backend/dist/skeleton.tar.gz -C packages/backend/dist/skeleton \
4855
&& tar xzf packages/backend/dist/bundle.tar.gz -C packages/backend/dist/bundle
4956

5057
# Stage 3 - Build the actual backend image and install production dependencies
51-
FROM node:18-bookworm-slim
58+
FROM node:20-bookworm-slim
5259

5360
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend.
5461
RUN apt-get update && \
5562
apt-get install -y --no-install-recommends python3 g++ build-essential && \
56-
yarn config set python /usr/bin/python3
63+
corepack enable && \
64+
corepack prepare yarn@3.5.0 --activate
5765

5866
# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image,
5967
# in which case you should also move better-sqlite3 to "devDependencies" in package.json.
@@ -63,19 +71,16 @@ RUN apt-get update && \
6371
# From here on we use the least-privileged `node` user to run the backend.
6472
USER node
6573

66-
# This should create the app dir as `node`.
67-
# If it is instead created as `root` then the `tar` command below will
68-
# fail: `can't create directory 'packages/': Permission denied`.
69-
# If this occurs, then ensure BuildKit is enabled (`DOCKER_BUILDKIT=1`)
70-
# so the app dir is correctly created as `node`.
7174
WORKDIR /app
7275

7376
# Copy the install dependencies from the build stage and context
74-
COPY --from=build --chown=node:node /app/yarn.lock /app/package.json /app/packages/backend/dist/skeleton/ ./
77+
COPY --from=build --chown=node:node /app/package.json /app/yarn.lock /app/.yarnrc.yml ./
78+
COPY --from=build --chown=node:node /app/.yarn ./.yarn
79+
COPY --from=build --chown=node:node /app/packages/backend/dist/skeleton/ ./
7580

7681
RUN mkdir -p /app/cypress_cache && chown -R node:node /app/cypress_cache
7782

78-
RUN yarn install --frozen-lockfile --production --network-timeout 600000
83+
RUN yarn workspaces focus
7984

8085
# Copy the built packages from the build stage
8186
COPY --from=build --chown=node:node /app/packages/backend/dist/bundle/ ./

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ yarn dev
1010
```
1111

1212
To build container, run:
13+
1314
```sh
1415
yarn tsc
1516
yarn build:backend

app-config.production.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ backend:
1919
cors:
2020
origin: https://backstage.eco.tsi-dev.otc-service.com
2121

22-
# config options: https://node-postgres.com/api/client
22+
# config options: https://node-postgres.com/apis/client
2323
# database:
2424
# client: pg
2525
# connection:
@@ -37,7 +37,7 @@ backend:
3737
integrations:
3838
gitea:
3939
- host: gitea.eco.tsi-dev.otc-service.com
40-
password: "${GITEA_TOKEN}"
40+
password: '${GITEA_TOKEN}'
4141
github:
4242
- host: github.com
4343
apps:

app-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ proxy:
106106
headers:
107107
X-Api-Key: "${DEPENDENCYTRACK_TOKEN}"
108108

109-
scaffolder:
110-
# see https://backstage.io/docs/features/software-templates/configuration for software template options
109+
# scaffolder:
110+
# # see https://backstage.io/docs/features/software-templates/configuration for software template options
111111

112112
# Reference documentation http://backstage.io/docs/features/techdocs/configuration
113113
# Note: After experimenting with basic setup, use CI/CD to generate docs

backstage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "1.26.3"
2+
"version": "1.31.0-next.2"
33
}

knip.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"$schema": "https://unpkg.com/knip@3/schema.json",
3+
"ignore": ["**/setupTests.ts", "**/.eslintrc.js", "**/config.d.ts"],
4+
"ignoreDependencies": [
5+
"better-sqlite3",
6+
"app",
7+
"@testing-library/jest-dom",
8+
"webpack-env",
9+
"lint-staged",
10+
"@types/lodash"
11+
]
12+
}

package.json

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"private": true,
55
"engines": {
6-
"node": "16 || 18"
6+
"node": "18 || 20"
77
},
88
"scripts": {
99
"dev": "concurrently \"yarn start\" \"yarn start-backend\"",
@@ -17,12 +17,15 @@
1717
"clean": "backstage-cli repo clean",
1818
"test": "backstage-cli repo test",
1919
"test:all": "backstage-cli repo test --coverage",
20-
"lint": "backstage-cli package lint",
20+
"test:e2e": "playwright test",
21+
"fix": "backstage-cli repo fix",
22+
"lint": "backstage-cli repo lint --since origin/master",
2123
"lint:all": "backstage-cli repo lint",
2224
"prettier:check": "prettier --check .",
23-
"create-plugin": "backstage-cli create-plugin --scope internal",
2425
"new": "backstage-cli new --scope internal",
25-
"export-dynamic": "janus-cli package export-dynamic-plugin"
26+
"knip": "knip",
27+
"prepare": "husky",
28+
"postinstall": "husky || true && patch-package"
2629
},
2730
"workspaces": {
2831
"packages": [
@@ -31,37 +34,44 @@
3134
]
3235
},
3336
"devDependencies": {
34-
"@backstage/cli": "^0.26.4",
35-
"@janus-idp/cli": "^1.8.0",
36-
"@spotify/prettier-config": "^12.0.0",
37-
"concurrently": "^8.1.0",
38-
"node-gyp": "^9.0.0",
39-
"prettier": "3.2.5",
40-
"typescript": "~5.0.0"
41-
},
42-
"resolutions": {
43-
"@types/react": "^17",
44-
"@types/react-dom": "^17"
37+
"@backstage/cli": "^0.27.1",
38+
"@backstage/e2e-test-utils": "^0.1.1",
39+
"@playwright/test": "^1.32.3",
40+
"@spotify/prettier-config": "^15.0.0",
41+
"@types/lodash": "^4.14.202",
42+
"@types/node": "^20.10.5",
43+
"concurrently": "^9.0.0",
44+
"eslint": "^8.6.0",
45+
"fs-extra": "11.2.0",
46+
"husky": "^9.0.0",
47+
"jest": "^29.7.0",
48+
"knip": "^5.0.0",
49+
"lint-staged": "^15.0.0",
50+
"node-fetch": "^2.6.7",
51+
"patch-package": "^8.0.0",
52+
"postinstall-postinstall": "^2.1.0",
53+
"prettier": "^3.0.0",
54+
"typescript": "~5.4.0"
4555
},
4656
"prettier": "@spotify/prettier-config",
4757
"lint-staged": {
48-
"*.{js,jsx,ts,tsx,mjs,cjs}": [
58+
"*.{js,jsx,ts,tsx}": [
4959
"eslint --fix",
5060
"prettier --write"
5161
],
52-
"*.{json,md}": [
62+
"*.{json,md,yaml,yml}": [
5363
"prettier --write"
5464
]
5565
},
5666
"dependencies": {
57-
"@backstage/backend-dynamic-feature-service": "^0.2.9",
58-
"@backstage/test-utils": "^1.5.4",
59-
"@types/passport-oauth2": "^1.4.12",
60-
"passport-oauth2": "^1.7.0"
67+
"@backstage/plugin-kubernetes": "^0.11.14",
68+
"@backstage/plugin-kubernetes-backend": "^0.18.6",
69+
"@janus-idp/backstage-plugin-topology": "^1.28.0"
70+
},
71+
"jest": {
72+
"transformModules": [
73+
"@asyncapi/react-component"
74+
]
6175
},
62-
"files": [
63-
"dist-dynamic/*.*",
64-
"dist-dynamic/dist/**",
65-
"dist-dynamic/alpha/*"
66-
]
76+
"packageManager": "yarn@3.5.0"
6777
}

0 commit comments

Comments
 (0)