@backstage-community/plugin-tekton 4.0.1 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @backstage-community/plugin-tekton
2
2
 
3
+ ## 4.0.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 8ff1dd1: Added an extension `if` predicate so the Tekton entity tab is only shown when the user is authorized for `kubernetes.clusters.read` and `kubernetes.resources.read`.
8
+ - d0f4c91: Backstage version bump to v1.54.7
9
+ - Updated dependencies [8ff1dd1]
10
+ - Updated dependencies [d0f4c91]
11
+ - @backstage-community/plugin-tekton-common@1.24.1
12
+ - @backstage-community/plugin-tekton-react@0.9.1
13
+
3
14
  ## 4.0.1
4
15
 
5
16
  ### Patch Changes
package/README.md CHANGED
@@ -123,6 +123,8 @@ The Tekton plugin enables you to visualize the `PipelineRun` resources available
123
123
 
124
124
  If you are using Backstage's [new frontend system](https://backstage.io/docs/frontend-system/), add the default export and the translations module to your app `features` array. The Tekton entity tab is registered automatically for entities with the `tekton.dev/cicd` annotation.
125
125
 
126
+ The Tekton entity tab uses an extension `if` predicate so it is only shown when the signed-in user is authorized for `kubernetes.clusters.read` and `kubernetes.resources.read`. Users without those permissions will not see the **Tekton** tab on the entity page.
127
+
126
128
  ```ts
127
129
  import tektonPlugin, {
128
130
  tektonTranslationsModule,
@@ -177,6 +179,8 @@ If you are using permissions, please ensure that the following Kubernetes permis
177
179
  - `kubernetes.clusters.read`
178
180
  - `kubernetes.resources.read`
179
181
 
182
+ In the new frontend system, users without `kubernetes.clusters.read` and `kubernetes.resources.read` permissions will not see the **Tekton** entity tab.
183
+
180
184
  Read [the documentation](https://github.com/backstage/backstage/blob/master/docs/features/kubernetes/permissions.md) for more info on these permissions.
181
185
 
182
186
  ## For users
@@ -3,8 +3,15 @@ import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
3
3
  import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
4
4
  import { isTektonCIAvailable } from './utils/isTektonCIAvailable.esm.js';
5
5
 
6
+ const tektonReadPermissionsIfPredicate = {
7
+ $all: [
8
+ { permissions: { $contains: "kubernetes.clusters.read#read" } },
9
+ { permissions: { $contains: "kubernetes.resources.read#read" } }
10
+ ]
11
+ };
6
12
  const tektonEntityContent = EntityContentBlueprint.make({
7
13
  name: "tektonEntityContent",
14
+ if: tektonReadPermissionsIfPredicate,
8
15
  params: {
9
16
  path: "/tekton",
10
17
  title: "Tekton",
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport { isTektonCIAvailable } from './utils/isTektonCIAvailable';\n\nconst tektonEntityContent = EntityContentBlueprint.make({\n name: 'tektonEntityContent',\n params: {\n path: '/tekton',\n title: 'Tekton',\n filter: isTektonCIAvailable,\n loader: () => import('./components/Router').then(m => <m.Router />),\n },\n});\n\n/**\n * The Tekton frontend plugin for the new frontend system.\n *\n * @public\n */\nconst tektonPlugin = createFrontendPlugin({\n pluginId: 'tekton',\n info: { packageJson: () => import('../package.json') },\n extensions: [tektonEntityContent],\n});\n\nexport default tektonPlugin;\n"],"names":[],"mappings":";;;;;AAmBA,MAAM,mBAAA,GAAsB,uBAAuB,IAAA,CAAK;AAAA,EACtD,IAAA,EAAM,qBAAA;AAAA,EACN,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,SAAA;AAAA,IACN,KAAA,EAAO,QAAA;AAAA,IACP,MAAA,EAAQ,mBAAA;AAAA,IACR,MAAA,EAAQ,MAAM,OAAO,4BAAqB,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAAK,GAAA,CAAC,CAAA,CAAE,MAAA,EAAF,EAAS,CAAE;AAAA;AAEtE,CAAC,CAAA;AAOD,MAAM,eAAe,oBAAA,CAAqB;AAAA,EACxC,QAAA,EAAU,QAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,sCAAiB,CAAA,EAAE;AAAA,EACrD,UAAA,EAAY,CAAC,mBAAmB;AAClC,CAAC;;;;"}
1
+ {"version":3,"file":"plugin.esm.js","sources":["../src/plugin.tsx"],"sourcesContent":["/*\n * Copyright 2025 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { createFrontendPlugin } from '@backstage/frontend-plugin-api';\nimport { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';\nimport { isTektonCIAvailable } from './utils/isTektonCIAvailable';\n\nconst tektonReadPermissionsIfPredicate = {\n $all: [\n { permissions: { $contains: 'kubernetes.clusters.read#read' } },\n { permissions: { $contains: 'kubernetes.resources.read#read' } },\n ],\n};\n\nconst tektonEntityContent = EntityContentBlueprint.make({\n name: 'tektonEntityContent',\n if: tektonReadPermissionsIfPredicate,\n params: {\n path: '/tekton',\n title: 'Tekton',\n filter: isTektonCIAvailable,\n loader: () => import('./components/Router').then(m => <m.Router />),\n },\n});\n\n/**\n * The Tekton frontend plugin for the new frontend system.\n *\n * @public\n */\nconst tektonPlugin = createFrontendPlugin({\n pluginId: 'tekton',\n info: { packageJson: () => import('../package.json') },\n extensions: [tektonEntityContent],\n});\n\nexport default tektonPlugin;\n"],"names":[],"mappings":";;;;;AAmBA,MAAM,gCAAA,GAAmC;AAAA,EACvC,IAAA,EAAM;AAAA,IACJ,EAAE,WAAA,EAAa,EAAE,SAAA,EAAW,iCAAgC,EAAE;AAAA,IAC9D,EAAE,WAAA,EAAa,EAAE,SAAA,EAAW,kCAAiC;AAAE;AAEnE,CAAA;AAEA,MAAM,mBAAA,GAAsB,uBAAuB,IAAA,CAAK;AAAA,EACtD,IAAA,EAAM,qBAAA;AAAA,EACN,EAAA,EAAI,gCAAA;AAAA,EACJ,MAAA,EAAQ;AAAA,IACN,IAAA,EAAM,SAAA;AAAA,IACN,KAAA,EAAO,QAAA;AAAA,IACP,MAAA,EAAQ,mBAAA;AAAA,IACR,MAAA,EAAQ,MAAM,OAAO,4BAAqB,CAAA,CAAE,IAAA,CAAK,CAAA,CAAA,qBAAK,GAAA,CAAC,CAAA,CAAE,MAAA,EAAF,EAAS,CAAE;AAAA;AAEtE,CAAC,CAAA;AAOD,MAAM,eAAe,oBAAA,CAAqB;AAAA,EACxC,QAAA,EAAU,QAAA;AAAA,EACV,MAAM,EAAE,WAAA,EAAa,MAAM,OAAO,sCAAiB,CAAA,EAAE;AAAA,EACrD,UAAA,EAAY,CAAC,mBAAmB;AAClC,CAAC;;;;"}
@@ -1,5 +1,5 @@
1
1
  var name = "@backstage-community/plugin-tekton";
2
- var version = "4.0.1";
2
+ var version = "4.0.2";
3
3
  var main = "src/index.ts";
4
4
  var types = "src/index.ts";
5
5
  var license = "Apache-2.0";
@@ -45,7 +45,7 @@ var sideEffects = [
45
45
  ];
46
46
  var scripts = {
47
47
  start: "backstage-cli package start",
48
- "start:legacy": "backstage-cli package start --entrypoint dev/legacy",
48
+ "start:legacy": "backstage-cli package start --entrypoint dev/legacy.tsx",
49
49
  "start:mock": "backstage-cli package start --entrypoint dev/index.mock.tsx",
50
50
  "start:legacy:mock": "backstage-cli package start --entrypoint dev/legacy.mock.tsx",
51
51
  build: "backstage-cli package build",
@@ -60,16 +60,16 @@ var dependencies = {
60
60
  "@aonic-ui/pipelines": "^3.1.0",
61
61
  "@backstage-community/plugin-tekton-common": "workspace:^",
62
62
  "@backstage-community/plugin-tekton-react": "workspace:^",
63
- "@backstage/catalog-model": "^1.10.0",
64
- "@backstage/core-components": "^0.18.13",
65
- "@backstage/core-plugin-api": "^1.12.9",
66
- "@backstage/frontend-plugin-api": "^0.18.0",
67
- "@backstage/plugin-app-react": "^0.2.6",
68
- "@backstage/plugin-catalog-react": "^3.2.2",
69
- "@backstage/plugin-kubernetes-common": "^0.9.12",
70
- "@backstage/plugin-kubernetes-react": "^0.5.23",
71
- "@backstage/plugin-permission-react": "^0.5.4",
72
- "@backstage/theme": "^0.7.3",
63
+ "@backstage/catalog-model": "backstage:^",
64
+ "@backstage/core-components": "backstage:^",
65
+ "@backstage/core-plugin-api": "backstage:^",
66
+ "@backstage/frontend-plugin-api": "backstage:^",
67
+ "@backstage/plugin-app-react": "backstage:^",
68
+ "@backstage/plugin-catalog-react": "backstage:^",
69
+ "@backstage/plugin-kubernetes-common": "backstage:^",
70
+ "@backstage/plugin-kubernetes-react": "backstage:^",
71
+ "@backstage/plugin-permission-react": "backstage:^",
72
+ "@backstage/theme": "backstage:^",
73
73
  "@emotion/cache": "^11.14.0",
74
74
  "@emotion/react": "^11.11.4",
75
75
  "@kubernetes/client-node": "1.4.0",
@@ -94,15 +94,15 @@ var peerDependencies = {
94
94
  };
95
95
  var devDependencies = {
96
96
  "@axe-core/playwright": "^4.11.0",
97
- "@backstage/catalog-client": "^1.16.1",
98
- "@backstage/cli": "^0.36.5",
99
- "@backstage/dev-utils": "^1.1.26",
100
- "@backstage/frontend-defaults": "^0.5.5",
101
- "@backstage/plugin-catalog": "^2.0.8",
102
- "@backstage/plugin-kubernetes": "^0.12.22",
103
- "@backstage/plugin-permission-common": "^0.9.10",
104
- "@backstage/test-utils": "^1.7.21",
105
- "@backstage/ui": "^0.17.1",
97
+ "@backstage/catalog-client": "backstage:^",
98
+ "@backstage/cli": "backstage:^",
99
+ "@backstage/dev-utils": "backstage:^",
100
+ "@backstage/frontend-defaults": "backstage:^",
101
+ "@backstage/plugin-catalog": "backstage:^",
102
+ "@backstage/plugin-kubernetes": "backstage:^",
103
+ "@backstage/plugin-permission-common": "backstage:^",
104
+ "@backstage/test-utils": "backstage:^",
105
+ "@backstage/ui": "backstage:^",
106
106
  "@playwright/test": "1.61.1",
107
107
  "@remixicon/react": "^4.2.0",
108
108
  "@testing-library/dom": "^10.4.1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@backstage-community/plugin-tekton",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
4
4
  "main": "./dist/index.esm.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "license": "Apache-2.0",
@@ -68,7 +68,7 @@
68
68
  ],
69
69
  "scripts": {
70
70
  "start": "backstage-cli package start",
71
- "start:legacy": "backstage-cli package start --entrypoint dev/legacy",
71
+ "start:legacy": "backstage-cli package start --entrypoint dev/legacy.tsx",
72
72
  "start:mock": "backstage-cli package start --entrypoint dev/index.mock.tsx",
73
73
  "start:legacy:mock": "backstage-cli package start --entrypoint dev/legacy.mock.tsx",
74
74
  "build": "backstage-cli package build",
@@ -81,8 +81,8 @@
81
81
  },
82
82
  "dependencies": {
83
83
  "@aonic-ui/pipelines": "^3.1.0",
84
- "@backstage-community/plugin-tekton-common": "^1.24.0",
85
- "@backstage-community/plugin-tekton-react": "^0.9.0",
84
+ "@backstage-community/plugin-tekton-common": "^1.24.1",
85
+ "@backstage-community/plugin-tekton-react": "^0.9.1",
86
86
  "@backstage/catalog-model": "^1.10.0",
87
87
  "@backstage/core-components": "^0.18.13",
88
88
  "@backstage/core-plugin-api": "^1.12.9",