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

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

XMLWordPrintable

    • 0.10.0

      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"
            }
          }
        }
      }
      
      
      

       

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

              Created:
              Updated:
              Resolved: