Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-56300

New step or option that does not block on individual job completion

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      0.10.0

      Description

      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
          ) // return Job ID?
        }
        timeout(10) {
          waitUntil {
            jobs.every {
              def job = ansibleTowerJob(id: it)
              job.status == "successful"
            }
          }
        }
      }
      
      
      

       

        Attachments

          Activity

          Hide
          johnwestcottiv John Westcott added a comment -

          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

          Show
          johnwestcottiv John Westcott added a comment - 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

            People

            Assignee:
            johnwestcottiv John Westcott
            Reporter:
            tomcooperca Thomas Cooper
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: