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

Displays the tree of upstream causes #56

Merged
merged 6 commits into from
Jun 10, 2015
Merged

Conversation

dcoraboeuf
Copy link
Contributor

With the 0.17 version of the Build Flow plug-in, the upstream causes of the Flow job itself are lost when looking at the build cause of a downstream job.

For example, if we have a build A triggering a build B triggering a FLOW, which itself launches a C job, I want the C job showing that it has been fired by FLOW, fired by B, fire by A. As we have when using basic project triggers.

My pull request appends to the existing FlowCause description the representation of the upstream causes (actually copied from the Cause.UpstreamCause description.jelly file).

I had to switch to Jelly for the FlowCause.description resource but it might be possible to use Groovy as well.

In the end, I can see the upstream cause:

image

@dnozay
Copy link
Member

dnozay commented Jun 8, 2015

Unit tests would be nice. The email-ext plugin has some examples...

thank you!

@dcoraboeuf
Copy link
Contributor Author

I'll add unit tests either tonight or tomorrow.

@jenkinsadmin
Copy link
Member

Thank you for a pull request! Please check this document for how the Jenkins project handles pull requests

@dcoraboeuf dcoraboeuf closed this Jun 8, 2015
@dcoraboeuf
Copy link
Contributor Author

Closed by mistake :(

@dcoraboeuf dcoraboeuf reopened this Jun 8, 2015
@dcoraboeuf
Copy link
Contributor Author

This PR has actually a problem - the Jenkins version (1.480) for this plug-in is not recent enough to get access the list of upstream causes from a Cause.Upstream. The access has been granted in a later version. I just know for sure that it works with Jenkins 1.584. I'll see later which minimal version of Jenkins we would need to make this work.

Just in case, could we consider upgrading the minimum Jenkins version for this plug-in?

@dcoraboeuf
Copy link
Contributor Author

Access to the upstream causes has been introduced by the 0626f28965a773ffa73921561df1a9b5279f33bc commit in Jenkins and is available from version 1.482 and onward.

I suggest we upgrade at least to this version or to next LTS version (1.509.1)

@dcoraboeuf
Copy link
Contributor Author

Hi Damien, I've added a unit test and taken into account your remarks. I finally chose to upgrade Jenkins version to 1.482 (from 1.480). This is just enough to get the support for the Cause.UpstreamCause#getUpstreamCauses() method.

@daniel-beck
Copy link
Member

I finally chose to upgrade Jenkins version to 1.482 (from 1.480).

It is generally preferable to use LTS releases as parent versions to limit the number of different versions in use, see https://wiki.jenkins-ci.org/display/JENKINS/Plugin+Report+Card

For stats, see e.g. http://stats.jenkins-ci.org/plugin-installation-trend/installations.json — less than 2% of known installations use a version between 1.482 and 1.509.1.

@dcoraboeuf
Copy link
Contributor Author

I'll upgrade to 1.509.1 then.

@dcoraboeuf
Copy link
Contributor Author

I've upgraded the minimal version to the earliest LTS version after the minimal 1.482 version: 1.509.1.

@dnozay dnozay merged commit a73d517 into jenkinsci:master Jun 10, 2015
dnozay added a commit that referenced this pull request Jun 10, 2015
see pull request #56.
Displays the tree of upstream causes
@dcoraboeuf
Copy link
Contributor Author

Thanks Damien. Do you know if I can expect a new release soon?

@dnozay
Copy link
Member

dnozay commented Jun 10, 2015

working on it... tests are taking some time.

@dnozay
Copy link
Member

dnozay commented Jun 10, 2015

done. thanks for the changes.

@dcoraboeuf
Copy link
Contributor Author

Thanks for the release. Much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants