-
Notifications
You must be signed in to change notification settings - Fork 254
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(acr): add backstage app to workspace
Signed-off-by: Christoph Jerolimov <jerolimov+git@redhat.com>
- Loading branch information
1 parent
9643308
commit 9fe384b
Showing
68 changed files
with
12,926 additions
and
2,757 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@backstage-community/plugin-acr': minor | ||
--- | ||
|
||
fix `react-use` compile issue and update plugin description |
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 +1 @@ | ||
module.exports = { root: true, }; | ||
module.exports = require('../../.eslintrc.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 |
---|---|---|
|
@@ -15,7 +15,7 @@ coverage | |
# Dependencies | ||
node_modules/ | ||
|
||
# Yarn 3 files | ||
# Yarn files | ||
.pnp.* | ||
.yarn/* | ||
!.yarn/patches | ||
|
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,114 @@ | ||
app: | ||
title: Azure Container Registry Plugin Example App | ||
baseUrl: http://localhost:3000 | ||
|
||
organization: | ||
name: Azure Container Registry Plugin Example | ||
|
||
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 | ||
# This is for local development only, it is not recommended to use this in production | ||
# The production database configuration is stored in app-config.production.yaml | ||
database: | ||
client: better-sqlite3 | ||
connection: ':memory:' | ||
# workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir | ||
|
||
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} | ||
|
||
proxy: | ||
endpoints: | ||
'/acr/api': | ||
target: 'https://${ACR_HOST}/acr/v1/' | ||
credentials: require | ||
changeOrigin: true | ||
headers: | ||
# If you use Bearer Token for authorization, please replace the 'Basic' with 'Bearer' in the following line. | ||
Authorization: 'Basic ${ACR_AUTH_TOKEN}' | ||
# Change to "false" in case of using self hosted artifactory instance with a self-signed certificate | ||
secure: 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] | ||
locations: | ||
# Local example data, file locations are relative to the backend process, typically `packages/backend` | ||
- type: file | ||
target: ../../examples/entities.yaml | ||
|
||
# Local example template | ||
- type: file | ||
target: ../../examples/template/template.yaml | ||
rules: | ||
- allow: [Template] | ||
|
||
# Local example organizational data | ||
- type: file | ||
target: ../../examples/org.yaml | ||
rules: | ||
- allow: [User, Group] | ||
|
||
## Uncomment these lines to add more example data | ||
# - type: url | ||
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml | ||
|
||
## Uncomment these lines to add an example org | ||
# - type: url | ||
# target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml | ||
# rules: | ||
# - allow: [User, Group] | ||
|
||
# see https://backstage.io/docs/permissions/getting-started for more on the permission framework | ||
permission: | ||
# setting this to `false` will disable permissions | ||
enabled: true |
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,13 +1,10 @@ | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: acr | ||
description: An example of a Backstage application. | ||
# Example for optional annotations | ||
# annotations: | ||
# github.com/project-slug: backstage/backstage | ||
# backstage.io/techdocs-ref: dir:. | ||
name: backstage-plugin-acr-workspace | ||
title: 'Azure Container Registry plugin for Backstage' | ||
description: A Backstage plugin that displays information about your container images available in the Azure Container Registry | ||
spec: | ||
type: website | ||
owner: john@example.com | ||
lifecycle: experimental | ||
type: backstage-plugin | ||
owner: maintainers |
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 @@ | ||
--- | ||
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: System | ||
metadata: | ||
name: backstage | ||
spec: | ||
owner: guests | ||
--- | ||
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: acr-example | ||
annotations: | ||
azure-container-registry/repository-name: samples/hello-world | ||
spec: | ||
type: service | ||
lifecycle: testing | ||
owner: guests | ||
system: backstage | ||
--- | ||
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: acr-not-found-example | ||
annotations: | ||
azure-container-registry/repository-name: samples/container-not-found | ||
spec: | ||
type: service | ||
lifecycle: testing | ||
owner: guests | ||
system: backstage | ||
--- | ||
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Component | ||
metadata: | ||
name: no-acr-annotation | ||
spec: | ||
type: service | ||
lifecycle: testing | ||
owner: guests | ||
system: backstage |
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,17 @@ | ||
--- | ||
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-user | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: User | ||
metadata: | ||
name: guest | ||
spec: | ||
memberOf: [guests] | ||
--- | ||
# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-group | ||
apiVersion: backstage.io/v1alpha1 | ||
kind: Group | ||
metadata: | ||
name: guests | ||
spec: | ||
type: team | ||
children: [] |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# The Packages Folder | ||
|
||
This is where your own applications and centrally managed libraries live, each | ||
in a separate folder of its own. | ||
|
||
From the start there's an `app` folder (for the frontend) and a `backend` folder | ||
(for the Node backend), but you can also add more modules in here that house | ||
your core additions and adaptations, such as themes, common React component | ||
libraries, utilities, and similar. |
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 @@ | ||
public |
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 @@ | ||
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); |
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,27 @@ | ||
/* | ||
* Copyright 2020 The Backstage Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import { test, expect } from '@playwright/test'; | ||
|
||
test('App should render the welcome page', async ({ page }) => { | ||
await page.goto('/'); | ||
|
||
const enterButton = page.getByRole('button', { name: 'Enter' }); | ||
await expect(enterButton).toBeVisible(); | ||
await enterButton.click(); | ||
|
||
await expect(page.getByText('My Company Catalog')).toBeVisible(); | ||
}); |
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,19 @@ | ||
# Knip report | ||
|
||
## Unused dependencies (4) | ||
|
||
| Name | Location | Severity | | ||
| :------------------------------ | :----------- | :------- | | ||
| @backstage-community/plugin-npm | package.json | error | | ||
| react-router | package.json | error | | ||
| react-use | package.json | error | | ||
| history | package.json | error | | ||
|
||
## Unused devDependencies (4) | ||
|
||
| Name | Location | Severity | | ||
| :-------------------------- | :----------- | :------- | | ||
| @testing-library/user-event | package.json | error | | ||
| @backstage/test-utils | package.json | error | | ||
| @testing-library/dom | package.json | error | | ||
| cross-env | package.json | error | |
Oops, something went wrong.