Akin to the build-timeout plugin (which alas is not suitable for direct reuse from Workflow), there should be an option for timeout to expire after a time compared to a "similar" block in the previous build.

          [JENKINS-27396] Elastic timeout in pipeline

          Andrew Bayer added a comment -

          So the first thing that jumps out at me is having to find the "similar" block in previous builds. Once I understand that, the rest should be pretty easy. =)

          Andrew Bayer added a comment - So the first thing that jumps out at me is having to find the "similar" block in previous builds. Once I understand that, the rest should be pretty easy. =)

          Jesse Glick added a comment -

          I think the only reliable way to do that is to have the option include a unique textual ID, whereupon an Action gets attached to the FlowNode recording the ID and observed run time for use in subsequent builds. (TimingAction might already cover the latter.)

          Jesse Glick added a comment - I think the only reliable way to do that is to have the option include a unique textual ID, whereupon an Action gets attached to the FlowNode recording the ID and observed run time for use in subsequent builds. ( TimingAction might already cover the latter.)

          Jesse Glick added a comment -
          stage('Build') {
            node {
              checkout scm
              timeout(id: 'main', initial: 10, percentage: 150) {
                sh 'make'
              }
              stash name: 'bin', includes: 'a.out'
            }
          }
          stage('Test') {
            node {
              unstash 'bin'
              timeout(id: 'test', initial: 60, percentage: 150) {
                sh 'make test'
              }
            }
          }
          

          Jesse Glick added a comment - stage( 'Build' ) { node { checkout scm timeout(id: 'main' , initial: 10, percentage: 150) { sh 'make' } stash name: 'bin' , includes: 'a.out' } } stage( 'Test' ) { node { unstash 'bin' timeout(id: 'test' , initial: 60, percentage: 150) { sh 'make test' } } }

          ikedam added a comment -

          ikedam added a comment - pipeline-graph-analysis-plugin::StatusAndTiming#computeChunkTiming is available for get execution durations.

          ikedam added a comment -

          ikedam added a comment - https://github.com/jenkinsci/workflow-basic-steps-plugin/pull/19

          Adir Atias added a comment -

          we're looking for a solution exactly for this case,

          is there any update ? 

          Adir Atias added a comment - we're looking for a solution exactly for this case, is there any update ? 

          Jean-Luc Pé added a comment -

          Dear all,

          What about the elastic timeout ?
          Is there a plan to implement this ?

          Jean-Luc Pé added a comment - Dear all, What about the elastic timeout ? Is there a plan to implement this ?

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            3 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated: