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

Not possible to use String in absolute timeout

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • job-dsl-plugin
    • None

      job.with { wrappers { timeout { absolute(int timeout) } } }
      

      We use a variable in our timeout that is set in prepare environment, to be able to increased if its a e.g. a maven release.
      So current API doesn't work when only possible to add int's.

      Workaround

      job.with {
        configure{ project -> 
          project / buildWrappers / 'hudson.plugins.build__timeout.BuildTimeoutWrapper' / strategy(class: "hudson.plugins.build_timeout.impl.AbsoluteTimeOutStrategy") { timeoutMinutes "\${JOB_TIMEOUT}" }
        }
      }
      

            edgar0119 Edgar Yu
            devchibbe chibbe dev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: