[JIRA] (JENKINS-56259) Allow input timeout parameter

2 views
Skip to first unread message

flood@itnews-bg.com (JIRA)

unread,
Feb 24, 2019, 5:07:02 PM2/24/19
to jenkinsc...@googlegroups.com
Steve Todorov created an issue
 
Jenkins / Improvement JENKINS-56259
Allow input timeout parameter
Issue Type: Improvement Improvement
Assignee: Unassigned
Components: pipeline, pipeline-input-step-plugin
Created: 2019-02-24 22:06
Priority: Minor Minor
Reporter: Steve Todorov

I have been wondering for ages why is there no `timeout` option in the `input` step? I am aware you can wrap your input in a `timeout() {}`, but that is just impossible when you are using the `input` as part of the stage like so:

 

pipeline {
    agent any
    stages {
        stage('Example') {
            input {
                message "Should we continue?"
                ok "Yes, we should."
                submitter "alice,bob"
                parameters {
                    string(name: 'PERSON', defaultValue: 'Mr Jenkins', description: 'Who should I say hello to?')
                }
            }
            steps {
                echo "Hello, ${PERSON}, nice to meet you."
            }
        }
    }
}

 

(Taken from https://jenkins.io/blog/2018/04/09/whats-in-declarative/#input)

 

The possible "workaround" to this would be to create an `input` step in a previous stage which is wrapped in a `timeout` step, but in our case this makes things even more complicated and hard to read. 

Are there any plans to include an `timeout` parameter for the `input` step? Maybe something like this (or better?):

 

input { 
  message "Should we continue?" 
  ok "Yes, we should." 
  submitter "alice,bob" 
  timeout: [time: 1234, unit: 'MINUTES']
  parameters { 
    string(
      name: 'PERSON', 
      defaultValue: 'Mr Jenkins', 
      description: 'Who should I say hello to?'
    ) 
  }
}

 

 

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

jglick@cloudbees.com (JIRA)

unread,
Feb 25, 2019, 12:09:01 PM2/25/19
to jenkinsc...@googlegroups.com
Jesse Glick updated an issue
Change By: Jesse Glick
Component/s: pipeline-model-definition-plugin
Component/s: pipeline
Component/s: pipeline-input-step-plugin

jglick@cloudbees.com (JIRA)

unread,
Feb 25, 2019, 12:10:01 PM2/25/19
to jenkinsc...@googlegroups.com
Jesse Glick commented on Improvement JENKINS-56259
 
Re: Allow input timeout parameter

Specific to Declarative Pipeline; adjusted component accordingly.

flood@itnews-bg.com (JIRA)

unread,
Feb 25, 2019, 5:27:02 PM2/25/19
to jenkinsc...@googlegroups.com

Jesse Glick thanks for fixing that! Apologize for the wrong component

carlspring@java.net (JIRA)

unread,
Mar 12, 2019, 5:43:02 PM3/12/19
to jenkinsc...@googlegroups.com

Hi Jesse Glick

 

Is there any update on this?

 

mark.vinkx@uzleuven.be (JIRA)

unread,
Apr 2, 2019, 12:02:03 PM4/2/19
to jenkinsc...@googlegroups.com

You simply can wrap the input in a timeout 

        stages {
            stage('Deploy') {
                steps {
                            timeout(time: 5, unit: "MINUTES") {
                                input message: 'Do you want to approve the deploy?', ok: 'Yes'
                            }
                            sh './flakey-deploy.sh'
                 }
            }
        }

jglick@cloudbees.com (JIRA)

unread,
Apr 2, 2019, 1:14:02 PM4/2/19
to jenkinsc...@googlegroups.com

Mark Vinkx this is about input as part of a stage rather than one of its steps, which has different behavior (if I understand correctly) with respect to when an executor is locked.

flood@itnews-bg.com (JIRA)

unread,
Apr 3, 2019, 2:03:02 PM4/3/19
to jenkinsc...@googlegroups.com

Mark Vinkx Yes, you could wrap the input like that, but unfortunately this means that you will allocate an agent and have it do nothing for 5 minutes. Also the Blue Ocean UI would display this stage as "passed" (green) which will be (and is) confusing, because you never know if the stage has actually passed or it has been skipped/not approved - you will need to specifically go into the stage to check the steps, whereas if you have it as a stage input it would show in the UI as skipped. 

Jesse Glick yes, you've understood me correctly

jordan.cockles@gmail.com (JIRA)

unread,
Dec 17, 2019, 7:03:04 AM12/17/19
to jenkinsc...@googlegroups.com

Hi, has there been any other movement on this particular functionality?

I've been looking into using pipeline as code to automate deployments and use the steps in stages approach to manage the different elements of the CI process. Having the ability to specify a timeout directly on the input option would be perfect as it appears the stage method does not accept timeout as a valid nested parameter.

This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages