Skip to content
Open
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
7 changes: 7 additions & 0 deletions workspaces/x2a/.changeset/dirty-lizards-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@red-hat-developer-hub/backstage-plugin-x2a-backend': patch
'@red-hat-developer-hub/backstage-plugin-x2a-common': patch
'@red-hat-developer-hub/backstage-plugin-x2a': patch
---

Enables tests on both the SQLite and PostgreSQL. Adds app-config.production.yaml skeleton.
7 changes: 7 additions & 0 deletions workspaces/x2a/.changeset/eager-rats-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@red-hat-developer-hub/backstage-plugin-x2a-backend': patch
'@red-hat-developer-hub/backstage-plugin-x2a-common': patch
'@red-hat-developer-hub/backstage-plugin-x2a': patch
---

The UI shows projects list with sorting and pagination.
7 changes: 7 additions & 0 deletions workspaces/x2a/.changeset/proud-months-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@red-hat-developer-hub/backstage-plugin-x2a-backend': patch
'@red-hat-developer-hub/backstage-plugin-x2a-common': patch
'@red-hat-developer-hub/backstage-plugin-x2a': patch
---

Adding pagination and filtering by permissions to the GET|POST /projects and GET /project/[id] endpoints.
79 changes: 79 additions & 0 deletions workspaces/x2a/app-config.production.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
app:
title: X2Ansible Convertor
baseUrl: http://localhost:3000

organization:
name: Red Hat

backend:
# Used for enabling authentication, secret is shared by all backend plugins
# See https://backstage.io/docs/auth/service-to-service-auth for
# information on the format
# auth:
# keys:
# - secret: ${BACKEND_SECRET}
baseUrl: http://localhost:7007
listen:
port: 7007
# Uncomment the following host directive to bind to specific interfaces
# host: 127.0.0.1
csp:
connect-src: ["'self'", 'http:', 'https:']
# Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference
# Default Helmet Content-Security-Policy values can be removed by setting the key to false
cors:
origin: http://localhost:3000
methods: [GET, HEAD, PATCH, POST, PUT, DELETE]
credentials: true
database:
client: pg
connection:
host: ${POSTGRES_HOST}
port: ${POSTGRES_PORT}
user: ${POSTGRES_USER}
password: ${POSTGRES_PASSWORD}

#integrations:
# github:
# - host: github.com
# # This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information
# about setting up the GitHub integration here: https://backstage.io/docs/integrations/github/locations#configuration
# token: ${GITHUB_TOKEN}
### Example for how to add your GitHub Enterprise instance using the API:
# - host: ghe.example.net
# apiBaseUrl: https://ghe.example.net/api/v3
# token: ${GHE_TOKEN}

### Example for how to add a proxy endpoint for the frontend.
### A typical reason to do this is to handle HTTPS and CORS for internal services.
# endpoints:
# '/test':
# target: 'https://example.com'
# changeOrigin: true

# Reference documentation http://backstage.io/docs/features/techdocs/configuration
# Note: After experimenting with basic setup, use CI/CD to generate docs
# and an external cloud storage when deploying TechDocs for production use-case.
# https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach
techdocs:
builder: 'local' # Alternatives - 'external'
generator:
runIn: 'docker' # Alternatives - 'local'
publisher:
type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives.

auth:
# see https://backstage.io/docs/auth/ to learn about auth providers
providers:
# See https://backstage.io/docs/auth/guest/provider
guest: {}

scaffolder: {}
# see https://backstage.io/docs/features/software-templates/configuration for software template options

catalog:
import:
entityFilename: catalog-info.yaml
pullRequestBranchName: backstage-integration
rules:
- allow: [Component, System, API, Resource, Location]
1 change: 1 addition & 0 deletions workspaces/x2a/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"lint:all": "backstage-cli repo lint",
"prettier:check": "prettier --check .",
"prettier:fix": "prettier --write .",
"chores": "yarn prettier:fix && yarn lint:all --fix && yarn tsc:full && yarn build:api-reports && yarn test:all",
"new": "backstage-cli new --scope @red-hat-developer-hub",
"postinstall": "cd ../../ && yarn install"
},
Expand Down
2 changes: 1 addition & 1 deletion workspaces/x2a/plugins/x2a-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"@backstage/catalog-client": "^1.12.1",
"@backstage/errors": "^1.2.7",
"@backstage/plugin-catalog-node": "^1.20.0",
"@backstage/plugin-permission-common": "^0.9.4",
"@backstage/types": "^1.2.2",
"@kubernetes/client-node": "^1.4.0",
"@red-hat-developer-hub/backstage-plugin-x2a-common": "workspace:*",
Expand All @@ -51,7 +52,6 @@
"devDependencies": {
"@backstage/backend-test-utils": "^1.10.1",
"@backstage/cli": "^0.34.5",
"@backstage/plugin-permission-common": "^0.9.4",
"@backstage/repo-tools": "^0.16.2",
"@types/express": "^4.17.6",
"@types/knex": "^0.16.0",
Expand Down
3 changes: 3 additions & 0 deletions workspaces/x2a/plugins/x2a-backend/src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,13 @@ export const x2APlugin = createBackendPlugin({
httpRouter: coreServices.httpRouter,
database: coreServices.database,
logger: coreServices.logger,
permissionsSvc: coreServices.permissions,
x2aDatabase: x2aDatabaseServiceRef,
kubeService: kubeServiceRef,
},
async init({
httpRouter,
permissionsSvc,
x2aDatabase,
logger,
httpAuth,
Expand All @@ -53,6 +55,7 @@ export const x2APlugin = createBackendPlugin({
await createRouter({
httpAuth,
logger,
permissionsSvc,
x2aDatabase,
kubeService,
}),
Expand Down
Loading