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

build-timeout-plugin cannot be used with pipelines (workflows)

    XMLWordPrintable

Details

    Description

      It seems that the build-timeout plugin cannot be used in Jenkins pipelines and we would really want to be able to use it.

      While the pipelines do have the `timeout()` command this has a different behaviour which sets a fixed timeout, not one that can vary based on the existence or not of output on the build.

      Also it would be extremely useful to update the plugin homepage (wiki) in order to document its relationship with the timeout() from pipelines.

      Attachments

        Issue Links

          Activity

            ikedam ikedam added a comment -

            Not a bug.

            build-timeout is provided as an implementation of BuildWrapper which is applicable to `AbstractBuild`.

            As pipelines don't use `BuildWrapper`, build-timeout doesn't work for pipelines.
            In other words, build-timeout doesn't target pipeline for now.

            > Also it would be extremely useful to update the plugin homepage (wiki) in order to document its relationship with the timeout() from pipelines.

            You can do that by yourself as it is a wiki.
            I don't know so much about timeout() in pipeline to write documents.

            ikedam ikedam added a comment - Not a bug. build-timeout is provided as an implementation of BuildWrapper which is applicable to `AbstractBuild`. As pipelines don't use `BuildWrapper`, build-timeout doesn't work for pipelines. In other words, build-timeout doesn't target pipeline for now. > Also it would be extremely useful to update the plugin homepage (wiki) in order to document its relationship with the timeout() from pipelines. You can do that by yourself as it is a wiki. I don't know so much about timeout() in pipeline to write documents.
            ikedam ikedam added a comment -

            Steps to make build-timeout-plugin compatibile with pipeline:

            ikedam ikedam added a comment - Steps to make build-timeout-plugin compatibile with pipeline: Swtich BuildWrapper to SimpleBuildWrapper ( https://github.com/jenkinsci/pipeline-plugin/blob/master/DEVGUIDE.md#build-wrappers ) The target Jenkins switches to 1.609. Use @Symbol ( https://github.com/jenkinsci/pipeline-plugin/blob/master/DEVGUIDE.md#defining-symbols )
            ikedam ikedam added a comment - Just like this: https://github.com/jenkinsci/xvnc-plugin/pull/11
            ikedam ikedam added a comment -

            Reference to switch to SimpleBuildWrapper: https://github.com/jenkinsci/xvnc-plugin/pull/5/files

            ikedam ikedam added a comment - Reference to switch to SimpleBuildWrapper : https://github.com/jenkinsci/xvnc-plugin/pull/5/files
            ikedam ikedam added a comment -

            I found it's really difficult to make build-timeout to pipeline, as the mechanism of pipeline is completely different from that of legacy projects (Freestyle, Multiconfiguration, and so on).

            I thinks it's better to extend timeout feature of pipelines so that it supports same features of build-timeout.
            There are JIRA issues for that, and I close this issue as "Won't Fix".

            ikedam ikedam added a comment - I found it's really difficult to make build-timeout to pipeline, as the mechanism of pipeline is completely different from that of legacy projects (Freestyle, Multiconfiguration, and so on). I thinks it's better to extend timeout feature of pipelines so that it supports same features of build-timeout. There are JIRA issues for that, and I close this issue as "Won't Fix". Elastic timeout: JENKINS-27396 Timeout operations: JENKINS-32228 No activity timeout: JENKINS-26521
            ikedam ikedam added a comment -

            Added a note to the Wiki page: https://wiki.jenkins-ci.org/display/JENKINS/Build-timeout+Plugin
            (You might not see that in a day for the server-side caching)

            ikedam ikedam added a comment - Added a note to the Wiki page: https://wiki.jenkins-ci.org/display/JENKINS/Build-timeout+Plugin (You might not see that in a day for the server-side caching)

            People

              ikedam ikedam
              ssbarnea Sorin Sbarnea
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: