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

Retry option doesn't respect timeout in declarative pipeline

XMLWordPrintable

      The following pipeline succeeds, even though `sleep` times out on the first try. It appears that the second try ignores the `timeout` option.

      pipeline {
          agent none
          stages {
              stage('With timeout') {
                  options {
                      retry(2)
                      timeout(time: 5, unit: 'SECONDS')
                  }
                  steps {
                      sleep time: 10, unit: 'SECONDS'
                  }
              }
          }
      }
      

            Unassigned Unassigned
            victor_yousician Victor Balakine
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: