Skip to content

Commit

Permalink
chore(wrapper): rhidp-4257 add topology wrapper (#1739)
Browse files Browse the repository at this point in the history
* Chore(wrappers): add wrapper for topology and topology-common

Signed-off-by: Yi Cai <yicai@redhat.com>

* Remove topology plugin from peerDependencies in import package.json

Signed-off-by: Yi Cai <yicai@redhat.com>

* Added wrapper folders

Signed-off-by: Yi Cai <yicai@redhat.com>

* Updates

Signed-off-by: Yi Cai <yicai@redhat.com>

* Updated package.json

Signed-off-by: Yi Cai <yicai@redhat.com>

* updated InternalPluginsMap

Signed-off-by: Yi Cai <yicai@redhat.com>

* Added a script to handle style-inject dependency

Signed-off-by: Yi Cai <yicai@redhat.com>

* Replaced janus-idp with backstage-community

Signed-off-by: Yi Cai <yicai@redhat.com>

* Resolved merging conflicts

Signed-off-by: Yi Cai <yicai@redhat.com>

* Resolved merging conflicts

Signed-off-by: Yi Cai <yicai@redhat.com>

* Updated topology version

Signed-off-by: Yi Cai <yicai@redhat.com>

* Cleaned code

Signed-off-by: Yi Cai <yicai@redhat.com>

* Rebased

Signed-off-by: Yi Cai <yicai@redhat.com>

* Updated yarn.lock

Signed-off-by: Yi Cai <yicai@redhat.com>

* Update wrapper package

Signed-off-by: Yi Cai <yicai@redhat.com>

* Update yarn.lock

Signed-off-by: Yi Cai <yicai@redhat.com>

* Match with upstream yarn.lock

Signed-off-by: Yi Cai <yicai@redhat.com>

* Update yarn.lock

Signed-off-by: Yi Cai <yicai@redhat.com>

* Clean code

Signed-off-by: Yi Cai <yicai@redhat.com>

* Update supported backstage versions

Signed-off-by: Yi Cai <yicai@redhat.com>

* Updated topology plugin dependency version

Signed-off-by: Yi Cai <yicai@redhat.com>

* Updated topology plugin version

Signed-off-by: Yi Cai <yicai@redhat.com>

* Updated topology version

Signed-off-by: Yi Cai <yicai@redhat.com>

* Added tsc and export-dynamic:clean scripts

Signed-off-by: Yi Cai <yicai@redhat.com>

* Remove topology-common wrapper

Signed-off-by: Yi Cai <yicai@redhat.com>

* Update yarn.lock

Signed-off-by: Yi Cai <yicai@redhat.com>

* Remove old janus-idp-backstage-plugin-topology wrapper

Signed-off-by: Yi Cai <yicai@redhat.com>

* Updated Dockerfile'

Signed-off-by: Yi Cai <yicai@redhat.com>

* Run yarn build:dockerfile

Signed-off-by: Yi Cai <yicai@redhat.com>

---------

Signed-off-by: Yi Cai <yicai@redhat.com>
  • Loading branch information
ciiay authored Nov 13, 2024
1 parent bffcb88 commit d62a347
Show file tree
Hide file tree
Showing 14 changed files with 176 additions and 122 deletions.
2 changes: 1 addition & 1 deletion .ibm/pipelines/value_files/values_showcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ global:
disabled: false
- package: ./dynamic-plugins/dist/backstage-plugin-catalog-backend-module-gitlab-dynamic
disabled: false
- package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-topology
- package: ./dynamic-plugins/dist/backstage-community-plugin-topology
disabled: false

# -- Upstream Backstage [chart configuration](https://github.com/backstage/charts/blob/main/charts/backstage/values.yaml)
Expand Down
2 changes: 1 addition & 1 deletion .rhdh/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-scaffo
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-regex-dynamic/dist-dynamic/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-regex-dynamic/dist-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-quay-dynamic/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-quay-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-quay-dynamic/dist-dynamic/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-quay-dynamic/dist-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-plugin-topology/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-plugin-topology/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-plugin-tekton/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-plugin-tekton/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-plugin-rbac/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-plugin-rbac/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-plugin-quay/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-plugin-quay/package.json
Expand Down Expand Up @@ -134,6 +133,7 @@ COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-plugin-catalog-b
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-plugin-catalog-backend-module-bitbucket-cloud-dynamic/dist-dynamic/package.json ./dynamic-plugins/wrappers/backstage-plugin-catalog-backend-module-bitbucket-cloud-dynamic/dist-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-scaffolder-backend-module-sonarqube-dynamic/package.json ./dynamic-plugins/wrappers/backstage-community-scaffolder-backend-module-sonarqube-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-scaffolder-backend-module-sonarqube-dynamic/dist-dynamic/package.json ./dynamic-plugins/wrappers/backstage-community-scaffolder-backend-module-sonarqube-dynamic/dist-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-plugin-topology/package.json ./dynamic-plugins/wrappers/backstage-community-plugin-topology/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-plugin-tech-radar/package.json ./dynamic-plugins/wrappers/backstage-community-plugin-tech-radar/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-plugin-tech-radar-backend-dynamic/package.json ./dynamic-plugins/wrappers/backstage-community-plugin-tech-radar-backend-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-plugin-tech-radar-backend-dynamic/dist-dynamic/package.json ./dynamic-plugins/wrappers/backstage-community-plugin-tech-radar-backend-dynamic/dist-dynamic/package.json
Expand Down
2 changes: 1 addition & 1 deletion app-config.dynamic-plugins.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ dynamicPlugins:
if:
allOf:
- isTektonCIAvailable
janus-idp.backstage-plugin-topology:
backstage-community.plugin-topology:
mountPoints:
- mountPoint: entity.page.topology/cards
importName: TopologyPage
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-scaffo
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-regex-dynamic/dist-dynamic/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-regex-dynamic/dist-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-quay-dynamic/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-quay-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-quay-dynamic/dist-dynamic/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-scaffolder-backend-module-quay-dynamic/dist-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-plugin-topology/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-plugin-topology/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-plugin-tekton/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-plugin-tekton/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-plugin-rbac/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-plugin-rbac/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/janus-idp-backstage-plugin-quay/package.json ./dynamic-plugins/wrappers/janus-idp-backstage-plugin-quay/package.json
Expand Down Expand Up @@ -135,6 +134,7 @@ COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-plugin-catalog-b
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-plugin-catalog-backend-module-bitbucket-cloud-dynamic/dist-dynamic/package.json ./dynamic-plugins/wrappers/backstage-plugin-catalog-backend-module-bitbucket-cloud-dynamic/dist-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-scaffolder-backend-module-sonarqube-dynamic/package.json ./dynamic-plugins/wrappers/backstage-community-scaffolder-backend-module-sonarqube-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-scaffolder-backend-module-sonarqube-dynamic/dist-dynamic/package.json ./dynamic-plugins/wrappers/backstage-community-scaffolder-backend-module-sonarqube-dynamic/dist-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-plugin-topology/package.json ./dynamic-plugins/wrappers/backstage-community-plugin-topology/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-plugin-tech-radar/package.json ./dynamic-plugins/wrappers/backstage-community-plugin-tech-radar/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-plugin-tech-radar-backend-dynamic/package.json ./dynamic-plugins/wrappers/backstage-community-plugin-tech-radar-backend-dynamic/package.json
COPY $EXTERNAL_SOURCE_NESTED/dynamic-plugins/wrappers/backstage-community-plugin-tech-radar-backend-dynamic/dist-dynamic/package.json ./dynamic-plugins/wrappers/backstage-community-plugin-tech-radar-backend-dynamic/dist-dynamic/package.json
Expand Down
4 changes: 2 additions & 2 deletions dynamic-plugins.default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,12 @@ plugins:
anyOf:
- hasAnnotation: backstage.io/kubernetes-id
- hasAnnotation: backstage.io/kubernetes-namespace
- package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-topology
- package: ./dynamic-plugins/dist/backstage-community-plugin-topology
disabled: true
pluginConfig:
dynamicPlugins:
frontend:
janus-idp.backstage-plugin-topology:
backstage-community.plugin-topology:
mountPoints:
- mountPoint: entity.page.topology/cards
importName: TopologyPage
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,45 @@
{
"name": "janus-idp-backstage-plugin-topology",
"version": "1.30.0",
"name": "backstage-community-plugin-topology",
"version": "1.29.4",
"main": "src/index.ts",
"types": "src/index.ts",
"license": "Apache-2.0",
"private": true,
"publishConfig": {
"access": "public",
"main": "dist/index.cjs.js",
"types": "dist/index.d.ts"
"access": "public"
},
"backstage": {
"role": "frontend-plugin",
"supported-versions": "1.32.4",
"pluginId": "janus-idp-topology",
"supported-versions": "^1.28.4",
"pluginId": "topology",
"pluginPackages": [
"janus-idp-backstage-plugin-topology"
"backstage-community-plugin-topology"
]
},
"exports": {
".": "./src/index.ts",
"./package.json": "./package.json"
},
"typesVersions": {
"*": {
"package.json": [
"package.json"
]
}
},
"sideEffects": false,
"scripts": {
"tsc": "tsc",
"build": "backstage-cli package build",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test --passWithNoTests --coverage",
"clean": "backstage-cli package clean",
"export-dynamic": "janus-cli package export-dynamic-plugin --in-place",
"lint": "backstage-cli package lint",
"test": "backstage-cli package test --passWithNoTests --coverage",
"clean-dynamic-sources": "yarn clean && rm -Rf node_modules",
"export-dynamic:clean": "janus-cli package export-dynamic-plugin --in-place --clean"
},
"dependencies": {
"@janus-idp/backstage-plugin-topology": "1.30.0"
"@backstage-community/plugin-topology": "^1.29.4"
},
"devDependencies": {
"@backstage/cli": "0.28.2",
Expand All @@ -39,24 +50,26 @@
"dist-scalprum"
],
"scalprum": {
"name": "janus-idp.backstage-plugin-topology",
"name": "backstage-community.plugin-topology",
"exposedModules": {
"PluginRoot": "./src/index.ts"
}
},
"repository": {
"type": "git",
"url": "https://github.com/janus-idp/backstage-showcase",
"directory": "dynamic-plugins/wrappers/janus-idp-backstage-plugin-topology"
"directory": "dynamic-plugins/wrappers/backstage-community-plugin-topology"
},
"maintainers": [
"@janus-idp/maintainers-showcase"
],
"author": "Red Hat",
"homepage": "https://red.ht/rhdh",
"bugs": "https://issues.redhat.com/browse/RHIDP",
"keywords": [
"support:production",
"support:tech-preview",
"lifecycle:active"
]
],
"homepage": "https://red.ht/rhdh",
"bugs": "https://github.com/janus-idp/backstage-plugins/issues",
"maintainers": [
"debsmita1",
"divyanshiGupta",
"ciiay"
],
"author": "Red Hat"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from '@backstage-community/plugin-topology';

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export const InternalPluginsMap: Record<string, string> = {
'./dynamic-plugins/dist/backstage-plugin-kubernetes-backend-dynamic',
'backstage-plugin-kubernetes':
'./dynamic-plugins/dist/backstage-plugin-kubernetes',
'janus-idp-backstage-plugin-topology':
'./dynamic-plugins/dist/janus-idp-backstage-plugin-topology',
'backstage-community-plugin-topology':
'./dynamic-plugins/dist/backstage-community-plugin-topology',
'roadiehq-scaffolder-backend-argocd-dynamic':
'./dynamic-plugins/dist/roadiehq-scaffolder-backend-argocd-dynamic',
'roadiehq-backstage-plugin-argo-cd':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ rules:
verbs:
- get
- list
# Additional permissions to access Openshift Dev Spaces for @janus-idp/backstage-plugin-topology
# Additional permissions to access Openshift Dev Spaces for @backstage-community/plugin-topology
- apiGroups:
- org.eclipse.che
resources:
Expand Down
4 changes: 2 additions & 2 deletions scripts/rhdh-openshift-setup/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ global:
# anyOf:
# - hasAnnotation: backstage.io/kubernetes-id
# - hasAnnotation: backstage.io/kubernetes-namespace
# - package: ./dynamic-plugins/dist/janus-idp-backstage-plugin-topology
# - package: ./dynamic-plugins/dist/backstage-community-plugin-topology
# disabled: false
# pluginConfig:
# dynamicPlugins:
# frontend:
# janus-idp.backstage-plugin-topology:
# backstage-community.plugin-topology:
# mountPoints:
# - mountPoint: entity.page.topology/cards
# importName: TopologyPage
Expand Down
Loading

0 comments on commit d62a347

Please sign in to comment.