ikedam commented on Bug JENKINS-22212

Sorry, that's my mistake.
It requires using fingerprints to have Jenkins recognize "upstream" and "downstream".

This would be done in following way (but not so simple...):

  1. In upstream project, fingerprint the revision as following:
    1. run following script with "Execute shell":
      echo ${SVN_REVISION} >revision.txt
      
    2. Call "Record fingerprints of files to track usage" for "revision.txt"
    3. Pass SVN_REVISION to downstream project as following with "Predefined Parameters" in "Trigger parameterized build on other projects"
      UPSTREAM_SVN_REVISION=${SVN_REVISION}
      
      • As you use "Include/passthrough Upstream SVN Revisons", SVN_REVISION may be passed to downstream automatically. I cannot test as I don't use subversion in my environment.
  2. Also in downstream project, fingerprint the revision as following:
    1. run following script with "Execute shell":
      echo ${UPSTREAM_SVN_REVISION} >revision.txt
      
    2. Call "Record fingerprints of files to track usage" for "revision.txt"
      • This should be called before calling Email-ext.


You can see fingerprints work correct in "See Fingerprints" of the build page.
And you can also test in Manage Jenkins > Script Console:

  • hudson.model.AbstractBuild.upstreamCulprits
    • Returns true if hudson.upstreamCulprits is successfully configured.
  • Jenkins.instance.getItemByFullName("downstreamProjectName").lastBuild.getDependencyChanges(Jenkins.instance.getItemByFullName("downstreamProjectName").lastBuild.previousBuild)
    • Returns upstream build if successfully tracked using fingerprints
  • Jenkins.instance.getItemByFullName("downstreamProjectName").lastBuild.culprits
    • Returns upstream developers if upstreamCulprits (and fingerprints) work successfully.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to