3

I want my Jenkins Pipeline to have a user input step where it posts to a slack channel and waits for user input then uses the input to user enters (button in the slack message).

So at the input step it posts to slack with a message that has buttons.

Then when a user clicks a button in slack a rest call or something hits Jenkins with the value of the button user pressed.

Is this possible?

030
  • 13,235
  • 16
  • 74
  • 173
red888
  • 253
  • 3
  • 10
  • 3
    Hi! Try this: https://stackoverflow.com/a/50606237/8442153 , or this: https://stackoverflow.com/a/49493403/8442153 – dalmo.santos Feb 05 '19 at 19:41
  • @dalmo.santos could you post this as an answer? – 030 Dec 20 '19 at 08:54
  • This I think is just linking back to the jenkins job- user still needs to login to jenkins https://stackoverflow.com/a/49493403/8442153. This requires a POST https://stackoverflow.com/a/50606237/8442153 - how can you have slack send a POST request when a user clicks a button? – red888 Dec 20 '19 at 16:51
  • @red888 please clarify the flow. E.g. jenkins job runs and then it shows a button, the user clicks on the button, a message appears in Slack. Please verify whether this is correct. Please explain what you mean with So at the input step it posts to slack with a message that has buttons. Does this mean that a button should appear in Slack? – 030 Dec 24 '19 at 18:49
  • yes so they dont have to log into jenkins at all. jenkins sends them a slack message with a button. they press the button in slack it sends jenkins some value – red888 Dec 24 '19 at 19:15

0 Answers0