Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JENKINS-40979 add trigger cause messages #996

Merged
merged 19 commits into from
Apr 27, 2017
Prev Previous commit
Next Next commit
.
  • Loading branch information
James Dumay committed Apr 23, 2017
commit b6c82d60affb563506f7ee00a173482205b8d33f
2 changes: 1 addition & 1 deletion blueocean-dashboard/src/main/js/components/Branches.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default class Branches extends Component {

// If there is no changeset, show the first cause otherwise show nothing (-)
const message = latestRun.changeSet && latestRun.changeSet.length > 0
&& latestRun.changeSet[latestRun.changeSet.length - 1]
&& latestRun.changeSet[latestRun.changeSet.length - 1].msg
|| (latestRun.causes.length > 0 && latestRun.causes[0].shortDescription)
|| '-';

Expand Down
15 changes: 10 additions & 5 deletions blueocean-dashboard/src/test/js/activity-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ const
"startTime": "2016-03-04T13:59:53.374+0100",
"state": "FINISHED",
"type": "WorkflowRun",
"commitId": "444196ac6afbd3e417f1d46ebfb3c4f0aac0c165"
"commitId": "444196ac6afbd3e417f1d46ebfb3c4f0aac0c165",
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
},
{
"changeSet": [],
Expand All @@ -36,7 +37,8 @@ const
"startTime": "2016-03-04T13:59:54.138+0100",
"state": "FINISHED",
"type": "WorkflowRun",
"commitId": "f8eeb35c03e52c17c27824fa77fa6b0f03a93625"
"commitId": "f8eeb35c03e52c17c27824fa77fa6b0f03a93625",
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
},
{
"changeSet": [
Expand Down Expand Up @@ -74,7 +76,8 @@ const
"startTime": "2016-03-04T14:18:55.490+0100",
"state": "FINISHED",
"type": "WorkflowRun",
"commitId": "746cf27525b7b1d615de408ca86786613ccf7548"
"commitId": "746cf27525b7b1d615de408ca86786613ccf7548",
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
},
{
"changeSet": [
Expand Down Expand Up @@ -112,7 +115,8 @@ const
"startTime": "2016-03-04T14:28:09.322+0100",
"state": "FINISHED",
"type": "WorkflowRun",
"commitId": "a2f0801fec8bad98663f0df5e9110261820e8c4e"
"commitId": "a2f0801fec8bad98663f0df5e9110261820e8c4e",
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
},
{
"changeSet": [],
Expand All @@ -127,7 +131,8 @@ const
"startTime": "2016-03-09T16:01:23.767+0100",
"state": "FINISHED",
"type": "WorkflowRun",
"commitId": "a2f0801fec8bad98663f0df5e9110261820e8c4e"
"commitId": "a2f0801fec8bad98663f0df5e9110261820e8c4e",
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
}
];

Expand Down
33 changes: 3 additions & 30 deletions blueocean-dashboard/src/test/js/data/branches/latestBranches.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,6 @@ export default [{
}
},
"actions": [{
"_class": "hudson.model.CauseAction",
"_links": {
"self": {
"_class": "io.jenkins.blueocean.rest.hal.Link",
"href": "/blue/rest/organizations/jenkins/pipelines/tfprdemo/branches/master/runs/3/cause/"
}
},
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
"urlName": "cause"
}, {
"_class": "jenkins.metrics.impl.TimeInQueueAction",
"_links": {
"self": {
Expand Down Expand Up @@ -170,6 +160,7 @@ export default [{
"urlName": "flowGraph"
}],
"artifacts": [],
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
"changeSet": [{
"_class": "io.jenkins.blueocean.service.embedded.rest.ChangeSetResource",
"_links": {
Expand Down Expand Up @@ -318,16 +309,6 @@ export default [{
}
},
"actions": [{
"_class": "hudson.model.CauseAction",
"_links": {
"self": {
"_class": "io.jenkins.blueocean.rest.hal.Link",
"href": "/blue/rest/organizations/jenkins/pipelines/tfprdemo/branches/quicker/runs/1/cause/"
}
},
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
"urlName": "cause"
}, {
"_class": "jenkins.metrics.impl.TimeInQueueAction",
"_links": {
"self": {
Expand Down Expand Up @@ -430,6 +411,7 @@ export default [{
"urlName": "flowGraph"
}],
"artifacts": [],
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
"changeSet": [],
"durationInMillis": 18710,
"enQueueTime": "2016-07-01T17:20:23.071+0100",
Expand Down Expand Up @@ -550,16 +532,6 @@ export default [{
}
},
"actions": [{
"_class": "hudson.model.CauseAction",
"_links": {
"self": {
"_class": "io.jenkins.blueocean.rest.hal.Link",
"href": "/blue/rest/organizations/jenkins/pipelines/tfprdemo/branches/tfennelly-patch-1/runs/1/cause/"
}
},
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
"urlName": "cause"
}, {
"_class": "jenkins.metrics.impl.TimeInQueueAction",
"_links": {
"self": {
Expand All @@ -582,6 +554,7 @@ export default [{
"urlName": "flowGraph"
}],
"artifacts": [],
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
"changeSet": [],
"durationInMillis": 0,
"enQueueTime": "2016-07-04T16:13:59.226+0100",
Expand Down
6 changes: 4 additions & 2 deletions blueocean-dashboard/src/test/js/data/runs/latestRuns.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ export const latestRuns = [{
'startTime': '2016-03-15T00:38:33.928+0100',
'state': 'FINISHED',
'type': 'WorkflowRun',
'commitId': '09794ca7e2e98cdc5e2f0f02117d79f5b112c7c1'
'commitId': '09794ca7e2e98cdc5e2f0f02117d79f5b112c7c1',
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
},
'name': 'master',
'weatherScore': 100,
Expand All @@ -82,7 +83,8 @@ export const latestRuns = [{
'startTime': '2016-03-15T00:38:35.980+0100',
'state': 'FINISHED',
'type': 'WorkflowRun',
'commitId': 'c38ab8e9275c2ee03e14e1bbfc9f44f2eddcff19'
'commitId': 'c38ab8e9275c2ee03e14e1bbfc9f44f2eddcff19',
"causes": [{"_class": "jenkins.branch.BranchIndexingCause", "shortDescription": "Branch indexing"}],
},
'name': 'PR-6',
'weatherScore': 0,
Expand Down