From 3b22f4b977a924ec2e59fe8a855a3e99397d12d8 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Mon, 22 Feb 2021 21:11:46 -0500 Subject: [PATCH 1/7] Add Jenkins logo --- plugins/jenkins/src/assets/JenkinsLogo.svg | 283 ++++++++++++++++++ .../BuildsPage/lib/CITable/CITable.tsx | 8 +- 2 files changed, 287 insertions(+), 4 deletions(-) create mode 100644 plugins/jenkins/src/assets/JenkinsLogo.svg diff --git a/plugins/jenkins/src/assets/JenkinsLogo.svg b/plugins/jenkins/src/assets/JenkinsLogo.svg new file mode 100644 index 0000000000..4a4538daf6 --- /dev/null +++ b/plugins/jenkins/src/assets/JenkinsLogo.svg @@ -0,0 +1,283 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx index 2d8f43ca80..3044094ccc 100644 --- a/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx +++ b/plugins/jenkins/src/components/BuildsPage/lib/CITable/CITable.tsx @@ -16,7 +16,7 @@ import React from 'react'; import { Box, IconButton, Link, Typography, Tooltip } from '@material-ui/core'; import RetryIcon from '@material-ui/icons/Replay'; -import GitHubIcon from '@material-ui/icons/GitHub'; +import JenkinsLogo from '../../../../assets/JenkinsLogo.svg'; import { generatePath, Link as RouterLink } from 'react-router-dom'; import { Table, TableColumn } from '@backstage/core'; import { JenkinsRunStatus } from '../Status'; @@ -231,9 +231,9 @@ export const CITableView = ({ onChangeRowsPerPage={onChangePageSize} title={ - - - {projectName} + Jenkins logo + + Project: {projectName} } columns={generatedColumns} From 5e67788a300fbdfa1f95f5e752cee53ac693b9d1 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Mon, 22 Feb 2021 21:12:18 -0500 Subject: [PATCH 2/7] Use new Backstage breadcrumb --- .../components/BuildWithStepsPage/BuildWithStepsPage.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx b/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx index d8f728bb27..23618dec9e 100644 --- a/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx +++ b/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx @@ -15,10 +15,9 @@ */ import React from 'react'; import { useParams } from 'react-router-dom'; -import { Content, Link } from '@backstage/core'; +import { Breadcrumbs, Content, Link } from '@backstage/core'; import { Typography, - Breadcrumbs, Paper, TableContainer, Table, @@ -36,7 +35,6 @@ import ExternalLinkIcon from '@material-ui/icons/Launch'; const useStyles = makeStyles(theme => ({ root: { maxWidth: 720, - margin: theme.spacing(2), }, table: { padding: theme.spacing(1), @@ -57,9 +55,10 @@ const BuildWithStepsView = () => { return (
- Jobs + Projects Run +
From 0452ba238c9afdfd72e57901638e0cedd60f77d7 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Mon, 22 Feb 2021 21:15:39 -0500 Subject: [PATCH 3/7] Add changeset --- .changeset/three-pumpkins-watch.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .changeset/three-pumpkins-watch.md diff --git a/.changeset/three-pumpkins-watch.md b/.changeset/three-pumpkins-watch.md new file mode 100644 index 0000000000..bc686c77c4 --- /dev/null +++ b/.changeset/three-pumpkins-watch.md @@ -0,0 +1,7 @@ +--- +'@backstage/plugin-jenkins': patch +--- + +Add Jenkins logo to project page. +Move to new Backstage breadcrumb component. +Change references of deprecated "Job" terminology to "Project" per [Jenkins Glossary](https://www.jenkins.io/doc/book/glossary/). From db75434e40c3a2b7ed5ca03316dd55f339a8e493 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Mon, 22 Feb 2021 21:21:17 -0500 Subject: [PATCH 4/7] Update doc refs of deprecated naming --- plugins/jenkins/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/jenkins/README.md b/plugins/jenkins/README.md index 154fcf913d..13ff9b3547 100644 --- a/plugins/jenkins/README.md +++ b/plugins/jenkins/README.md @@ -50,7 +50,7 @@ metadata: name: 'your-component' description: 'a description' annotations: - jenkins.io/github-folder: 'folder-name/job-name' + jenkins.io/github-folder: 'folder-name/project-name' spec: type: service lifecycle: experimental @@ -84,5 +84,5 @@ YWRtaW46MTFlYzI1NmU0Mzg1MDFjM2Y1Yzc2Yjc1MWE3ZTQ3YWY4Mw== is the base64 of user a ## Limitations -- Only works with organization folder jobs backed by GitHub -- No pagination support currently, limited to 50 jobs - don't run this on a Jenkins with lots of builds +- Only works with organization folder projects backed by GitHub +- No pagination support currently, limited to 50 projects - don't run this on a Jenkins with lots of builds From c70702c048c6ba77926689ecaac488969c0d04af Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Mon, 22 Feb 2021 22:48:01 -0500 Subject: [PATCH 5/7] Bullet changeset --- .changeset/three-pumpkins-watch.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.changeset/three-pumpkins-watch.md b/.changeset/three-pumpkins-watch.md index bc686c77c4..cb059a5381 100644 --- a/.changeset/three-pumpkins-watch.md +++ b/.changeset/three-pumpkins-watch.md @@ -2,6 +2,6 @@ '@backstage/plugin-jenkins': patch --- -Add Jenkins logo to project page. -Move to new Backstage breadcrumb component. -Change references of deprecated "Job" terminology to "Project" per [Jenkins Glossary](https://www.jenkins.io/doc/book/glossary/). +- Add Jenkins logo to project page. +- Move to new Backstage breadcrumb component. +- Change references of deprecated "Job" terminology to "Project" per [Jenkins Glossary](https://www.jenkins.io/doc/book/glossary/). From 7bd6bde38839adecc59b37efbbe9d74127805c0d Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Tue, 23 Feb 2021 08:46:46 -0500 Subject: [PATCH 6/7] Move line break to a Box --- .../components/BuildWithStepsPage/BuildWithStepsPage.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx b/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx index 23618dec9e..65a213a1e6 100644 --- a/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx +++ b/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx @@ -17,6 +17,7 @@ import React from 'react'; import { useParams } from 'react-router-dom'; import { Breadcrumbs, Content, Link } from '@backstage/core'; import { + Box, Typography, Paper, TableContainer, @@ -33,9 +34,9 @@ import { JenkinsRunStatus } from '../BuildsPage/lib/Status'; import ExternalLinkIcon from '@material-ui/icons/Launch'; const useStyles = makeStyles(theme => ({ - root: { - maxWidth: 720, - }, + // root: { + // maxWidth: 720, + // }, table: { padding: theme.spacing(1), }, @@ -58,7 +59,7 @@ const BuildWithStepsView = () => { Projects Run -
+
From 560b4ad72a1cf3ea3d6eab989a6f2466967e3ec0 Mon Sep 17 00:00:00 2001 From: Adam Harvey Date: Tue, 23 Feb 2021 09:02:45 -0500 Subject: [PATCH 7/7] Revert maxWidth removal testing --- .../components/BuildWithStepsPage/BuildWithStepsPage.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx b/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx index 65a213a1e6..5d9d81c985 100644 --- a/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx +++ b/plugins/jenkins/src/components/BuildWithStepsPage/BuildWithStepsPage.tsx @@ -34,9 +34,9 @@ import { JenkinsRunStatus } from '../BuildsPage/lib/Status'; import ExternalLinkIcon from '@material-ui/icons/Launch'; const useStyles = makeStyles(theme => ({ - // root: { - // maxWidth: 720, - // }, + root: { + maxWidth: 720, + }, table: { padding: theme.spacing(1), },