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

Support "shortest timeout"parameter at TimeoutContext build stuck plugin

        [JENKINS-57233] Support "shortest timeout"parameter at TimeoutContext build stuck plugin

        This option is already supported by Dynamic DSL:

        job(String name) {
          wrappers {
            buildTimeoutWrapper {
              strategy {
                elasticTimeOutStrategy {
                  timeoutPercentage(String value)
                  timeoutMinutesElasticDefault(String value)
                  numberOfBuilds(String value)
                  failSafeTimeoutDuration(boolean value)
                }
              }
              operationList {
                // ...
              }
            }
          }
        } 
        

        Daniel Spilker added a comment - This option is already supported by Dynamic DSL : job( String name) { wrappers { buildTimeoutWrapper { strategy { elasticTimeOutStrategy { timeoutPercentage( String value) timeoutMinutesElasticDefault( String value) numberOfBuilds( String value) failSafeTimeoutDuration( boolean value) } } operationList { // ... } } } }

        Bernhard M added a comment -

        Thank you for the example. Not sure why I didn't find it myself even when browsing the dynamic documentation on my jenkins.

        Addition: It will only work if you add 

         timeoutEnvVar('BUILD_TIMEOUT_OCCURED')

        because for some reason this is mandatory.

        Bernhard M added a comment - Thank you for the example. Not sure why I didn't find it myself even when browsing the dynamic documentation on my jenkins. Addition: It will only work if you add   timeoutEnvVar( 'BUILD_TIMEOUT_OCCURED' ) because for some reason this is mandatory.

          daspilker Daniel Spilker
          bmaehr Bernhard M
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

            Created:
            Updated:
            Resolved: