From 51a37d996562afe674b2dac01afd9da63c341530 Mon Sep 17 00:00:00 2001 From: Ivan Shmidt Date: Fri, 4 Sep 2020 15:59:43 +0200 Subject: [PATCH] feat(circleci): add cicdswitcher to example-app --- packages/app/src/components/Root/Root.tsx | 1 - .../app/src/components/catalog/EntityPage.tsx | 32 +++++++++++++++++-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/packages/app/src/components/Root/Root.tsx b/packages/app/src/components/Root/Root.tsx index ab95f623af..2a43d4ee2f 100644 --- a/packages/app/src/components/Root/Root.tsx +++ b/packages/app/src/components/Root/Root.tsx @@ -99,7 +99,6 @@ const Root: FC<{}> = ({ children }) => ( - { + // This component is just an example of how you can implement your company's logic in entity page. + // You can for example enforce that all components of type 'service' should use GitHubActions + switch (true) { + case isGitHubActionsAvaiable(entity): + return ; + case isCircleCIAvailable(entity): + return ; + default: + return ( + + No CI/CD is available for this entity. Check corresponding + annotations! + + ); + } +}; const OverviewContent = ({ entity }: { entity: Entity }) => ( @@ -41,7 +67,7 @@ const ServiceEntityPage = ({ entity }: { entity: Entity }) => ( } + element={} /> ); @@ -56,7 +82,7 @@ const WebsiteEntityPage = ({ entity }: { entity: Entity }) => ( } + element={} /> );