-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update to 1.31.0-next.2 main goal was to update backstage and dependencies, but there are also multiple changes in the build, including: migration to yarn 3.5. performed migration to new backstage auth and backend API. removed deprecated plugins Reviewed-by: Vladimir Hasko <[email protected]>
- Loading branch information
1 parent
e4687fc
commit ea18cb6
Showing
48 changed files
with
38,587 additions
and
31,180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,3 +49,4 @@ site | |
|
||
# vscode database functionality support files | ||
*.session.sql | ||
app-config.yaml |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# test directories | ||
__tests__ | ||
test | ||
tests | ||
powered-test | ||
|
||
# asset directories | ||
docs | ||
doc | ||
website | ||
images | ||
assets | ||
|
||
# examples | ||
example | ||
examples | ||
|
||
# code coverage directories | ||
coverage | ||
.nyc_output | ||
|
||
# build scripts | ||
Makefile | ||
Gulpfile.js | ||
Gruntfile.js | ||
|
||
# configs | ||
appveyor.yml | ||
circle.yml | ||
codeship-services.yml | ||
codeship-steps.yml | ||
wercker.yml | ||
.tern-project | ||
.gitattributes | ||
.editorconfig | ||
.*ignore | ||
.eslintrc | ||
.jshintrc | ||
.flowconfig | ||
.documentup.json | ||
.yarn-metadata.json | ||
.travis.yml | ||
|
||
# misc | ||
*.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
compressionLevel: mixed | ||
|
||
enableGlobalCache: false | ||
|
||
nodeLinker: node-modules | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs | ||
spec: "@yarnpkg/plugin-interactive-tools" | ||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||
spec: "@yarnpkg/plugin-workspace-tools" | ||
|
||
yarnPath: .yarn/releases/yarn-3.5.0.cjs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
# syntax=docker/dockerfile:1.2 | ||
|
||
# Stage 1 - Create yarn install skeleton layer | ||
FROM node:18-bookworm-slim AS packages | ||
FROM node:20-bookworm-slim AS packages | ||
|
||
WORKDIR /app | ||
COPY package.json yarn.lock ./ | ||
|
||
# Set up Yarn 3.5 | ||
RUN corepack enable && \ | ||
corepack prepare [email protected] --activate | ||
|
||
COPY package.json yarn.lock .yarnrc.yml ./ | ||
COPY .yarn .yarn | ||
|
||
COPY packages packages | ||
|
||
|
@@ -14,12 +20,13 @@ COPY plugins plugins | |
RUN find packages \! -name "package.json" -mindepth 2 -maxdepth 2 -exec rm -rf {} \+ | ||
|
||
# Stage 2 - Install dependencies and build packages | ||
FROM node:18-bookworm-slim AS build | ||
FROM node:20-bookworm-slim AS build | ||
|
||
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend. | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends python3 g++ build-essential && \ | ||
yarn config set python /usr/bin/python3 | ||
apt-get install -y --no-install-recommends python3 g++ git build-essential && \ | ||
corepack enable && \ | ||
corepack prepare [email protected] --activate | ||
|
||
# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, | ||
# 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 . | |
ENV CYPRESS_CACHE_FOLDER /app/cypress_cache | ||
RUN mkdir -p /app/cypress_cache && chown -R node:node /app/cypress_cache | ||
|
||
RUN yarn install --frozen-lockfile --network-timeout 600000 | ||
RUN yarn install --immutable | ||
|
||
COPY --chown=node:node . . | ||
|
||
RUN yarn postinstall | ||
|
||
RUN yarn tsc | ||
RUN yarn --cwd packages/backend build | ||
# If you have not yet migrated to package roles, use the following command instead: | ||
# RUN yarn --cwd packages/backend backstage-cli backend:bundle --build-dependencies | ||
RUN yarn build:backend | ||
|
||
RUN mkdir packages/backend/dist/skeleton packages/backend/dist/bundle \ | ||
&& tar xzf packages/backend/dist/skeleton.tar.gz -C packages/backend/dist/skeleton \ | ||
&& tar xzf packages/backend/dist/bundle.tar.gz -C packages/backend/dist/bundle | ||
|
||
# Stage 3 - Build the actual backend image and install production dependencies | ||
FROM node:18-bookworm-slim | ||
FROM node:20-bookworm-slim | ||
|
||
# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend. | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends python3 g++ build-essential && \ | ||
yarn config set python /usr/bin/python3 | ||
corepack enable && \ | ||
corepack prepare [email protected] --activate | ||
|
||
# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, | ||
# in which case you should also move better-sqlite3 to "devDependencies" in package.json. | ||
|
@@ -63,19 +71,16 @@ RUN apt-get update && \ | |
# From here on we use the least-privileged `node` user to run the backend. | ||
USER node | ||
|
||
# This should create the app dir as `node`. | ||
# If it is instead created as `root` then the `tar` command below will | ||
# fail: `can't create directory 'packages/': Permission denied`. | ||
# If this occurs, then ensure BuildKit is enabled (`DOCKER_BUILDKIT=1`) | ||
# so the app dir is correctly created as `node`. | ||
WORKDIR /app | ||
|
||
# Copy the install dependencies from the build stage and context | ||
COPY --from=build --chown=node:node /app/yarn.lock /app/package.json /app/packages/backend/dist/skeleton/ ./ | ||
COPY --from=build --chown=node:node /app/package.json /app/yarn.lock /app/.yarnrc.yml ./ | ||
COPY --from=build --chown=node:node /app/.yarn ./.yarn | ||
COPY --from=build --chown=node:node /app/packages/backend/dist/skeleton/ ./ | ||
|
||
RUN mkdir -p /app/cypress_cache && chown -R node:node /app/cypress_cache | ||
|
||
RUN yarn install --frozen-lockfile --production --network-timeout 600000 | ||
RUN yarn workspaces focus | ||
|
||
# Copy the built packages from the build stage | ||
COPY --from=build --chown=node:node /app/packages/backend/dist/bundle/ ./ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ yarn dev | |
``` | ||
|
||
To build container, run: | ||
|
||
```sh | ||
yarn tsc | ||
yarn build:backend | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
{ | ||
"version": "1.26.3" | ||
"version": "1.31.0-next.2" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"$schema": "https://unpkg.com/knip@3/schema.json", | ||
"ignore": ["**/setupTests.ts", "**/.eslintrc.js", "**/config.d.ts"], | ||
"ignoreDependencies": [ | ||
"better-sqlite3", | ||
"app", | ||
"@testing-library/jest-dom", | ||
"webpack-env", | ||
"lint-staged", | ||
"@types/lodash" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
"version": "1.0.0", | ||
"private": true, | ||
"engines": { | ||
"node": "16 || 18" | ||
"node": "18 || 20" | ||
}, | ||
"scripts": { | ||
"dev": "concurrently \"yarn start\" \"yarn start-backend\"", | ||
|
@@ -17,12 +17,15 @@ | |
"clean": "backstage-cli repo clean", | ||
"test": "backstage-cli repo test", | ||
"test:all": "backstage-cli repo test --coverage", | ||
"lint": "backstage-cli package lint", | ||
"test:e2e": "playwright test", | ||
"fix": "backstage-cli repo fix", | ||
"lint": "backstage-cli repo lint --since origin/master", | ||
"lint:all": "backstage-cli repo lint", | ||
"prettier:check": "prettier --check .", | ||
"create-plugin": "backstage-cli create-plugin --scope internal", | ||
"new": "backstage-cli new --scope internal", | ||
"export-dynamic": "janus-cli package export-dynamic-plugin" | ||
"knip": "knip", | ||
"prepare": "husky", | ||
"postinstall": "husky || true && patch-package" | ||
}, | ||
"workspaces": { | ||
"packages": [ | ||
|
@@ -31,37 +34,44 @@ | |
] | ||
}, | ||
"devDependencies": { | ||
"@backstage/cli": "^0.26.4", | ||
"@janus-idp/cli": "^1.8.0", | ||
"@spotify/prettier-config": "^12.0.0", | ||
"concurrently": "^8.1.0", | ||
"node-gyp": "^9.0.0", | ||
"prettier": "3.2.5", | ||
"typescript": "~5.0.0" | ||
}, | ||
"resolutions": { | ||
"@types/react": "^17", | ||
"@types/react-dom": "^17" | ||
"@backstage/cli": "^0.27.1", | ||
"@backstage/e2e-test-utils": "^0.1.1", | ||
"@playwright/test": "^1.32.3", | ||
"@spotify/prettier-config": "^15.0.0", | ||
"@types/lodash": "^4.14.202", | ||
"@types/node": "^20.10.5", | ||
"concurrently": "^9.0.0", | ||
"eslint": "^8.6.0", | ||
"fs-extra": "11.2.0", | ||
"husky": "^9.0.0", | ||
"jest": "^29.7.0", | ||
"knip": "^5.0.0", | ||
"lint-staged": "^15.0.0", | ||
"node-fetch": "^2.6.7", | ||
"patch-package": "^8.0.0", | ||
"postinstall-postinstall": "^2.1.0", | ||
"prettier": "^3.0.0", | ||
"typescript": "~5.4.0" | ||
}, | ||
"prettier": "@spotify/prettier-config", | ||
"lint-staged": { | ||
"*.{js,jsx,ts,tsx,mjs,cjs}": [ | ||
"*.{js,jsx,ts,tsx}": [ | ||
"eslint --fix", | ||
"prettier --write" | ||
], | ||
"*.{json,md}": [ | ||
"*.{json,md,yaml,yml}": [ | ||
"prettier --write" | ||
] | ||
}, | ||
"dependencies": { | ||
"@backstage/backend-dynamic-feature-service": "^0.2.9", | ||
"@backstage/test-utils": "^1.5.4", | ||
"@types/passport-oauth2": "^1.4.12", | ||
"passport-oauth2": "^1.7.0" | ||
"@backstage/plugin-kubernetes": "^0.11.14", | ||
"@backstage/plugin-kubernetes-backend": "^0.18.6", | ||
"@janus-idp/backstage-plugin-topology": "^1.28.0" | ||
}, | ||
"jest": { | ||
"transformModules": [ | ||
"@asyncapi/react-component" | ||
] | ||
}, | ||
"files": [ | ||
"dist-dynamic/*.*", | ||
"dist-dynamic/dist/**", | ||
"dist-dynamic/alpha/*" | ||
] | ||
"packageManager": "[email protected]" | ||
} |
Oops, something went wrong.