>
> On Mon, Aug 8, 2016 at 4:31 AM, Sverre Moe > wrote:
> > I just need the last build from an upstream dependency. The upstream
> build
> > cause might be an upstream dependency, or it may be an SCM cause. Such
> that
> > the upstream project might not be the upstream
On Mon, Aug 8, 2016 at 4:31 AM, Sverre Moe wrote:
> I just need the last build from an upstream dependency. The upstream build
> cause might be an upstream dependency, or it may be an SCM cause. Such that
> the upstream project might not be the upstream cause. Also an
It is related somewhat. That issue is about getting the upstream build that
triggered this running build.
I just need the last build from an upstream dependency. The upstream build
cause might be an upstream dependency, or it may be an SCM cause. Such that
the upstream project might not be the
On Fri, Aug 5, 2016 at 4:02 AM, Sverre Moe wrote:
> Variable currentBuild irefers to the currently running build. What I needed
> was the last build of a upstream dependency.
Like JENKINS-31576 you mean?
--
You received this message because you are subscribed to the
Pipeline Syntax -> Global Variables Reference
Variable currentBuild irefers to the currently running build. What I needed
was the last build of a upstream dependency.
org.jenkinsci.plugins.workflow.job.WorkflowJob job = anotherUpstreamProject.
getAllJobs().first()
On Wed, Aug 3, 2016 at 5:14 AM, Sverre Moe wrote:
> I need to get the latest build job in my Groovy build script.
Did you look at the documentation under Global Variables for `currentBuild`?
--
You received this message because you are subscribed to the Google Groups
With some experimenting I think I have gotten what I need.
def jenkinsInstance = jenkins.model.Jenkins.getInstance()
def jenkinsProject = "multiBranchPipelineProjectA/master"
def project = jenkinsInstance.getItemByFullName(jenkinsProject)
def job = project.getAllJobs().first()
def lastBuild =
Have Jenkins projects as Multibranch pipeline:
org.jenkinsci.plugins.workflow.multibranch.WorkflowMultiBranchProject
extends jenkins.branch.MultiBranchProject
extends com.cloudbees.hudson.plugins.folder.computed.ComputedFolder
extends com.cloudbees.hudson.plugins.folder.AbstractFolder