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?

5
  • 3
    Hi! Try this: stackoverflow.com/a/50606237/8442153 , or this: stackoverflow.com/a/49493403/8442153 Commented Feb 5, 2019 at 19:41
  • @dalmo.santos could you post this as an answer?
    – 030
    Commented Dec 20, 2019 at 8:54
  • This I think is just linking back to the jenkins job- user still needs to login to jenkins stackoverflow.com/a/49493403/8442153. This requires a POST stackoverflow.com/a/50606237/8442153 - how can you have slack send a POST request when a user clicks a button?
    – red888
    Commented Dec 20, 2019 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
    Commented Dec 24, 2019 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
    Commented Dec 24, 2019 at 19:15

0