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

workflow-basic-steps-plugin "waitUntil" should have a quiet mode

XMLWordPrintable

    • workflow-basic-steps 2.20

      My code looks like this :

       

      // setup a latch
      MAX_CONCURRENT = 4
      latch = new java.util.concurrent.LinkedBlockingDeque(MAX_CONCURRENT)
      // put a number of items into the queue to allow that number of branches to run
      for (int i=0;i<MAX_CONCURRENT;i++) {
          latch.offer("$i")
      }
      
      tests.each{ testName, jobDesc ->
          runnedTests.push(testName)
          stages[testName] = {
              def testSlot = null
              // this will not allow proceeding until there is something in the queue.
              waitUntil {
                  testSlot = latch.pollFirst();
                  return testSlot != null;
              }
              try {
                  stage("Test: " + testName) {
                      build job: jobDesc.test, parameters: params, propagate: true
                  }
              }
              finally {
                  latch.offer(testSlot)
              }
          }
      }
      parallel(stages) 

      To make it possible to run multiple stages in parallel, with a maximum of jobs runned.

       

      However, this means that I have an enormous amount of logs since the wait between the stages is approximately 20 to 30 minutes in average.

      I would like to have an option to remove the log completely since it gives no information in my usecase, and it "hides" the real useful logs.

       

      The log is done here : https://github.com/jenkinsci/workflow-basic-steps-plugin/blob/5a406e8cdad581b93cffdfac5275c7a61a54d674/src/main/java/org/jenkinsci/plugins/workflow/steps/WaitForConditionStep.java#L126

      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      [Pipeline] {
      [Pipeline] }
      Will try again after 15 sec
      ...
      ...

            bawjensen Bryan Jensen
            edi9999 edgar hipp
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: