Integrate with travis-ci plugin

This commit is contained in:
Marek Calus
2020-09-28 14:39:58 +02:00
parent 17c30eaf3e
commit 0ed398633a
6 changed files with 374 additions and 32 deletions
+1 -1
View File
@@ -32,7 +32,7 @@
"@material-ui/icons": "^4.9.1",
"@octokit/rest": "^18.0.0",
"@roadiehq/backstage-plugin-github-pull-requests": "0.3.0",
"@roadiehq/backstage-plugin-travis-ci": "^0.1.4",
"@roadiehq/backstage-plugin-travis-ci": "^0.2.3",
"history": "^5.0.0",
"prop-types": "^15.7.2",
"react": "^16.12.0",
@@ -13,6 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import {
isPluginApplicableToEntity as isTravisCIAvailable,
RecentTravisCIBuildsWidget,
Router as TravisCIRouter,
} from '@roadiehq/backstage-plugin-travis-ci';
import {
isPluginApplicableToEntity as isGitHubActionsAvailable,
RecentWorkflowRunsCard,
@@ -51,6 +56,8 @@ const CICDSwitcher = ({ entity }: { entity: Entity }) => {
return <GitHubActionsRouter entity={entity} />;
case isCircleCIAvailable(entity):
return <CircleCIRouter entity={entity} />;
case isTravisCIAvailable(entity):
return <TravisCIRouter entity={entity} />;
default:
return (
<WarningPanel title="CI/CD switcher:">
@@ -70,6 +77,9 @@ const RecentCICDRunsSwitcher = ({ entity }: { entity: Entity }) => {
case isGitHubActionsAvailable(entity):
content = <RecentWorkflowRunsCard entity={entity} />;
break;
case isTravisCIAvailable(entity):
content = <RecentTravisCIBuildsWidget entity={entity} />;
break;
default:
content = null;
}