Skip to content

Commit

Permalink
Hotfix/backstage/add devspace (#943)
Browse files Browse the repository at this point in the history
* 🐐 Fix Backstage

* 🐐 Fix Backstage
  • Loading branch information
diegoluisi authored Dec 27, 2023
1 parent 280cd53 commit 85a6160
Show file tree
Hide file tree
Showing 6 changed files with 110 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
app_old/
.devspace/
4 changes: 2 additions & 2 deletions app/backstage.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.21.0"
}
"version": "1.21.1"
}
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@
"dependencies": {
"@types/react": "^17"
}
}
}
6 changes: 3 additions & 3 deletions app/packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"dependencies": {
"@backstage/backend-common": "^0.20.0",
"@backstage/backend-tasks": "^0.5.13",
"@backstage/catalog-client": "^1.5.0",
"@backstage/catalog-client": "^1.5.1",
"@backstage/catalog-model": "^1.4.3",
"@backstage/config": "^1.1.1",
"@backstage/plugin-app-backend": "^0.3.56",
"@backstage/plugin-auth-backend": "^0.20.1",
"@backstage/plugin-auth-backend": "^0.20.2",
"@backstage/plugin-auth-node": "^0.4.2",
"@backstage/plugin-catalog-backend": "^1.16.0",
"@backstage/plugin-catalog-backend-module-github": "^0.4.6",
Expand Down Expand Up @@ -60,4 +60,4 @@
"files": [
"dist"
]
}
}
5 changes: 3 additions & 2 deletions app/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2805,7 +2805,7 @@
express "^4.18.2"
passport "^0.7.0"

"@backstage/plugin-auth-backend@^0.20.1":
"@backstage/plugin-auth-backend@^0.20.2":
version "0.20.2"
resolved "https://registry.yarnpkg.com/@backstage/plugin-auth-backend/-/plugin-auth-backend-0.20.2.tgz#3d9cf93530706af04e4d8e07edb3f02c53a43459"
integrity sha512-Afi3Cq0fwFnDsXIMlFLuJyLHX+ChU8v0D4CpWpKjgZhdmUDBIr7x9acAqmto3O4Lz4QxMwYZhrwifsYnMHQuuQ==
Expand Down Expand Up @@ -8984,7 +8984,7 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb"
integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==

"@types/react-dom@*", "@types/react-dom@<18.0.0":
"@types/react-dom@*", "@types/react-dom@<18.0.0", "@types/react-dom@^17":
version "17.0.25"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.25.tgz#e0e5b3571e1069625b3a3da2b279379aa33a0cb5"
integrity sha512-urx7A7UxkZQmThYA4So0NelOVjx3V4rNFVJwp0WZlbIK5eM4rNJDiN3R/E9ix0MBh6kAEojk/9YL+Te6D9zHNA==
Expand Down Expand Up @@ -9876,6 +9876,7 @@ anymatch@^3.0.3, anymatch@~3.1.2:
"@roadiehq/backstage-plugin-github-pull-requests" "^2.5.20"
"@roadiehq/backstage-plugin-prometheus" "^2.8.2"
"@roadiehq/backstage-plugin-security-insights" "^2.3.11"
"@suxess-it/backstage-plugin-kubecost" "^0.2.6"
history "^5.0.0"
react "^17.0.2"
react-dom "^17.0.2"
Expand Down
100 changes: 100 additions & 0 deletions devspace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
version: v2beta1
name: backstage

# `vars` specifies variables which may be used as ${VAR_NAME} in devspace.yaml
vars:
IMAGE: ghcr.io/devxp-tech/backstage

pullSecrets:
ghcr:
registry: ghcr.io
username: ${REGISTRY_USER}
password: ${REGISTRY_PASSWORD}

pipelines:
# Override the default pipeline for 'devspace dev'
dev:
run: |-
run_dependencies --all # 1. Deploy any projects this project needs (see "dependencies")
create_deployments --all # 2. Deploy Helm charts and manifests specfied as "deployments"
start_dev --all # 3. Start dev mode "app" (see "dev" section
# This is a list of `images` that DevSpace can build for this project
# We recommend to skip image building during development (devspace dev) as much as possible
# images:
# app:
# image: ${IMAGE}
# dockerfile: ./Dockerfile
# createPullSecret: true

# This is a list of `deployments` that DevSpace can create for this project
deployments:
app:
helm:
chart:
name: devxp-dev
version: 0.0.3
repo: https://devxp-tech.github.io/helm-charts
values:
name: backstage
serviceAccount:
name: backstage
imagePullSecrets:
enabled: true
name: ghcr
resources:
requests:
cpu: "100m"
memory: "256Mi"
limits:
cpu: "200m"
memory: "512Mi"

# This is a list of `dev` containers that are based on the containers created by your deployments
dev:
app:
# Search for the container that runs this image
imageSelector: ${IMAGE}
# Replace the container image with this dev-optimized image (allows to skip image building during development)
# devImage: ghcr.io/loft-sh/devspace-containers/java-maven:3-openjdk-17-slim
logs: {}
command:
- yarn
- dev
workingDir: /app
# Sync files between the local filesystem and the development container
sync:
- path: ./app:/app
excludePaths:
- .git/
uploadExcludePaths:
- Dockerfile
- target/
- .git/
terminal:
command: yarn dev
# Forward the following ports to be able access your application via localhost
ports:
- port: 23450:2345
- port: 3000:3000
# Open the following URLs once they return an HTTP status code other than 502 or 503
open:
- url: http://backstage.local:3000
- url: http://localhost:8090

# Use the `commands` section to define repeatable dev workflows for this project
commands:
migrate-db:
command: |-
echo 'This is a cross-platform, shared command that can be used to codify any kind of dev task.'
echo 'Anyone using this project can invoke it via "devspace run migrate-db"'
test:
command: |-
go test -v ./...
# Define dependencies to other projects with a devspace.yaml
# dependencies:
# homepage:
# git: https://github.com/devxp-tech/homepage
# branch: main
# pipeline: dev

0 comments on commit 85a6160

Please sign in to comment.