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

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

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

       

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

          Thomas Cooper created issue -
          Thomas Cooper made changes -
          Description Original: 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
              )
            }
            timeout(10) {
              waitUntil {
                jobs.every {
                  it.JOB_RESULT == "SUCCESS"
                }
              }
            }
          }


          {noformat}
           
          New: 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.status == "successful"
                }
              }
            }
          }


          {noformat}
           
          Thomas Cooper made changes -
          Priority Original: Major [ 3 ] New: Minor [ 4 ]
          John Westcott made changes -
          Released As New: 0.10.0
          Resolution New: Fixed [ 1 ]
          Status Original: Open [ 1 ] New: Resolved [ 5 ]
          John Westcott made changes -
          Status Original: Resolved [ 5 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: