[JIRA] (JENKINS-44218) Downstream to Upstream Job Build Trigger doesn't work with Github Organization Jobs

3 views
Skip to first unread message

dranon@gmail.com (JIRA)

unread,
Aug 29, 2018, 3:07:04 PM8/29/18
to jenkinsc...@googlegroups.com
Jonathan Drapeau commented on Bug JENKINS-44218
 
Re: Downstream to Upstream Job Build Trigger doesn't work with Github Organization Jobs

Still not working in Jenkins ver. 2.89.4 .

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

dranon@gmail.com (JIRA)

unread,
Aug 29, 2018, 3:19:02 PM8/29/18
to jenkinsc...@googlegroups.com
Jonathan Drapeau edited a comment on Bug JENKINS-44218
Still not working in [Jenkins ver. 2.89.4 .|https://jenkins.io/]

I also see the same thing when looking at the branch configuration my project B, that it should trigger after project A is successful.

This is my jenkinsfile in my project B that depends on A :

{{#!groovy?#!groovy?pipeline \{  agent { label 'windows' }  environment \{    settingsXml = '-s F:/Data/var/maven/settings.xml'  }  options \{    disableConcurrentBuilds()  }  tools \{    maven 'maven3.5.4'    jdk 'jdk8'  }  triggers \{    upstream(upstreamProjects: "projectA" + env.BRANCH_NAME.replaceAll("/", "%2F"), threshold: hudson.model.Result.SUCCESS)  }  stages \{    stage ('Update dependencies and test') {      steps {        withMaven(maven: 'maven3.5.4', jdk: 'jdk8', mavenSettingsFilePath: 'F:/Data/var/maven/settings.xml') {          bat "mvn clean"          bat "mvn test -U"      }      }      post \{ always {   junit 'target/surefire-reports/**/*.xml'  }   }    }    stage ('Build') \{      steps {        withMaven(maven: 'maven3.5.4', jdk: 'jdk8', mavenSettingsFilePath: 'F:/Data/var/maven/settings.xml') {        bat "mvn install -Dmaven.test.skip=true"      }      } } stage ('Deploy') \{      when {        anyOf {          branch 'release'          branch 'master'        }      }      steps \{        withMaven(maven: 'maven3.5.4', jdk: 'jdk8', mavenSettingsFilePath: 'F:/Data/var/maven/settings.xml') {        bat "mvn deploy -Dmaven.test.skip=true"      }      } }  }}}}

dranon@gmail.com (JIRA)

unread,
Aug 29, 2018, 3:22:02 PM8/29/18
to jenkinsc...@googlegroups.com
Jonathan Drapeau edited a comment on Bug JENKINS-44218
Still not working in [Jenkins ver. 2.89.4 .|https://jenkins.io/]

I also see the same thing when looking at the branch configuration my project B, that it should trigger after project A is successful.

This is my jenkinsfile in my Jenkinsfile of project B that depends on A : attached.

{{#!groovy?#!groovy?pipeline \{   agent { label 'windows' }  environment \{    settingsXml = '-s F:/Data/var/maven/settings.xml'  }  options \{    disableConcurrentBuilds()  }  tools \{    maven 'maven3.5.4'    jdk 'jdk8'  }  triggers \{    upstream(upstreamProjects: "projectA" + env.BRANCH_NAME.replaceAll("/", "%2F"), threshold: hudson.model.Result.SUCCESS)  }  stages \{    stage ('Update dependencies and test') {      steps {        withMaven(maven: 'maven3.5.4', jdk: 'jdk8', mavenSettingsFilePath: 'F:/Data/var/maven/settings.xml') {          bat "mvn clean"          bat "mvn test -U"      }      }      post \{ always {   junit 'target/surefire-reports/**/*.xml'  }   }    }    stage ('Build') \{      steps {        withMaven(maven: 'maven3.5.4', jdk: 'jdk8', mavenSettingsFilePath: 'F:/Data/var/maven/settings.xml') {        bat "mvn install -Dmaven.test.skip=true"      }      } } stage ('Deploy') \{      when {        anyOf {          branch 'release'          branch 'master'        }      }      steps \{        withMaven(maven: 'maven3.5.4', jdk: 'jdk8', mavenSettingsFilePath: 'F:/Data/var/maven/settings.xml') {        bat "mvn deploy -Dmaven.test.skip=true"      }      } }  }}}}

dranon@gmail.com (JIRA)

unread,
Aug 29, 2018, 3:23:01 PM8/29/18
to jenkinsc...@googlegroups.com

dranon@gmail.com (JIRA)

unread,
Aug 29, 2018, 3:23:03 PM8/29/18
to jenkinsc...@googlegroups.com
Jonathan Drapeau edited a comment on Bug JENKINS-44218
Still not working in [Jenkins ver. 2.89.4 .|https://jenkins.io/]

I also see the same thing when looking at the branch configuration of my project B, that it should trigger after project A is successful.

Jenkinsfile of project B attached.

 

dranon@gmail.com (JIRA)

unread,
Aug 30, 2018, 9:05:01 AM8/30/18
to jenkinsc...@googlegroups.com

ch48h2o@hotmail.com (JIRA)

unread,
May 23, 2019, 8:31:02 PM5/23/19
to jenkinsc...@googlegroups.com

It seems that you need to build the pipeline that will be triggered once before you actually trigger it for the first time.

ch48h2o@hotmail.com (JIRA)

unread,
May 23, 2019, 8:41:02 PM5/23/19
to jenkinsc...@googlegroups.com
Wen Jiang edited a comment on Bug JENKINS-44218
It seems that you need to build the pipeline that will be triggered once before you actually trigger it for the first time. The reason behind this is when you run the pipeline that is going to be triggered, jenkins will read your jenkins file and set the build triggers configuration for you. Hence, when you run the upstream, jenkins will know which pipeline to trigger.

ch48h2o@hotmail.com (JIRA)

unread,
May 23, 2019, 8:45:01 PM5/23/19
to jenkinsc...@googlegroups.com
Wen Jiang edited a comment on Bug JENKINS-44218
Sorry, I didn't see that you've built it before trigger.

-
It seems that you need to build the pipeline that will be triggered once before you actually trigger it for the first time. The reason behind this is when you run the pipeline that is going to be triggered, jenkins will read your jenkins file and set the build triggers configuration for you. Hence, when you run the upstream, jenkins will know which pipeline to trigger. -
Reply all
Reply to author
Forward
0 new messages