Skip to content
Merged
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
5 changes: 5 additions & 0 deletions workspaces/tekton/.changeset/fix-tekton-tab-visibility.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@backstage-community/plugin-tekton': patch
---

Hide the CI/CD tab on entity pages when the tekton annotation is not present
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ const serviceEntityPage = (
{overviewContent}
</EntityLayout.Route>

<EntityLayout.Route path="/ci-cd" title="CI/CD">
<EntityLayout.Route path="/ci-cd" title="CI/CD" if={isTektonCIAvailable}>
{cicdContent}
</EntityLayout.Route>

Expand Down Expand Up @@ -219,7 +219,7 @@ const websiteEntityPage = (
{overviewContent}
</EntityLayout.Route>

<EntityLayout.Route path="/ci-cd" title="CI/CD">
<EntityLayout.Route path="/ci-cd" title="CI/CD" if={isTektonCIAvailable}>
{cicdContent}
</EntityLayout.Route>

Expand Down
2 changes: 2 additions & 0 deletions workspaces/tekton/plugins/tekton/src/alpha.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
*/
import { createFrontendPlugin } from '@backstage/frontend-plugin-api';
import { EntityContentBlueprint } from '@backstage/plugin-catalog-react/alpha';
import { isTektonCIAvailable } from './utils/isTektonCIAvailable';

const tektonEntityContent = EntityContentBlueprint.make({
name: 'tektonEntityContent',
params: {
path: '/tekton',
title: 'Tekton',
filter: isTektonCIAvailable,
loader: () => import('./components/Router').then(m => <m.Router />),
},
});
Expand Down
Loading