[JIRA] (JENKINS-56300) New step or option that does not block on individual job completion

4 views
Skip to first unread message

thomascooperca@gmail.com (JIRA)

unread,
Feb 26, 2019, 7:12:02 PM2/26/19
to jenkinsc...@googlegroups.com
Thomas Cooper created an issue
 
Jenkins / Improvement JENKINS-56300
New step or option that does not block on individual job completion
Issue Type: Improvement Improvement
Assignee: John Westcott
Components: ansible-tower-plugin
Created: 2019-02-27 00:11
Labels: plugin
Priority: Major Major
Reporter: Thomas Cooper

Using Ansible Tower in a pipeline, there is no way to trigger multiple Tower jobs to be run concurrently then poll each for completion status. I'd like some sort of option on the ansibleTower step that prevents the AnsibleTowerRunner from blocking on job completion before continuing. This might warrant a separate step. Below is my use case:

 

 

script {
  def myapps = [...]
  def jobs = myapps.collect {
    ansibleTower( 
      jobTemplate: 'deploy-one-app',
      extraVars: "---\napp_to_deploy: ${it}",
      throwExceptionWhenFail: false,
      waitForCompletion: false
    )
  }
  timeout(10) {
    waitUntil {
      jobs.every {
        it.JOB_RESULT == "SUCCESS"
      }
    }
  }
}


 

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

thomascooperca@gmail.com (JIRA)

unread,
Feb 26, 2019, 7:16:02 PM2/26/19
to jenkinsc...@googlegroups.com
Thomas Cooper updated an issue
Change By: Thomas Cooper
Using Ansible Tower in a pipeline, there is no way to trigger multiple Tower jobs to be run concurrently then poll each for completion status. I'd like some sort of option on the ansibleTower step that prevents the AnsibleTowerRunner from blocking on job completion before continuing. This might warrant a separate step. Below is my use case:

 

 
{noformat}

script {
  def myapps = [...]
  def jobs = myapps.collect {
    ansibleTower(
      jobTemplate: 'deploy-one-app',
      extraVars: "---\napp_to_deploy: ${it}",
      throwExceptionWhenFail: false,
      waitForCompletion: false
    ) // return Job ID?
  }
  timeout(10) {
    waitUntil {
      jobs.every {
        def job = ansibleTowerJob(id:         it )
        job
. JOB_RESULT status == " SUCCESS successful "
      }
    }
  }
}


{noformat}
 

thomascooperca@gmail.com (JIRA)

unread,
Mar 21, 2019, 11:48:08 AM3/21/19
to jenkinsc...@googlegroups.com

john.westcott.iv@redhat.com (JIRA)

unread,
Aug 14, 2019, 10:55:02 AM8/14/19
to jenkinsc...@googlegroups.com
John Westcott resolved as Fixed
 

Please see the 0.10.0 version which now adds an async option to pipeline invocation. Examples of how to use this can be found on the plugin wiki:
https://wiki.jenkins.io/display/JENKINS/Ansible+Tower+Plugin

Change By: John Westcott
Status: Open Resolved
Resolution: Fixed
Released As: 0.10.0

john.westcott.iv@redhat.com (JIRA)

unread,
Jan 8, 2020, 9:54:03 AM1/8/20
to jenkinsc...@googlegroups.com
John Westcott closed an issue as Fixed
Change By: John Westcott
Status: Resolved Closed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages