•  
     
    story #11035 trigger webhook on artifact updates
Summary
Empty
trigger webhook on artifact updates

Several use case are already identified:

  • Transition from "Waiting" to "Open" should trigger a slack alert
  • Transition from "Tech design" to "Ready to dev" should create a branch in git + alert DM to developer in Slack
  • Transition to "Closed" should delete the corresponding Sonar project, checkmark branch and notify in Slack

Implementation of those actions are left to the webhook endpoint

Inspired by Github and Gitlab webhooks on

Those events would be configured as a new section in Tracker Administration > Workflow (only by trackers administrators). The UI would be close to the one for webhooks in git:

  • Several target URLs can be configured
  • For each URLs Tuleap will keep the last N log entries of events sent (not the whole payload, just date of sending + remote server answer)

The exact payload is yet to be defined but the goal is to be as close as possible to github v3 / gitlab to ease potential re-use and integration with other systems. However the compatiblity will be in "best effort" mode (that is to say if something is not possible Tuleap side because lack of a specific semantic for instance, it will be skiped).

The whole payload format will be documented in Tuleap Documentation

WARNING: unlike github, Tuleap do manage a whole set of fine grain permissions. Tracker administrator will need to 100% trust the target server as ALL data will be sent, regardless of permission set.

The configuration is

  • exported & imported with XML structure
  • duplicated at tracker creation

 

Empty
Empty
Status
Empty
Done
Development
  • [ ] Does it involves User Interface? 
  • [ ] Are there any mockups?
  • [ ] Are permissions checked?
  • [ ] Does it need Javascript development?
  • [ ] Does it need a forge upgrade bucket?
  • [ ] Does it need to execute things in system events?
  • [ ] Does it impact project creation (templates)?
  • [ ] Is it exploratory?
Empty
Details
#11035
Manuel Vacelet (vaceletm)
2018-07-17 17:25
2018-01-22 15:30
4366

References
Referencing story #11035

Git commit

tuleap/tuleap/stable

Send a webhook at artifact creation / update 916ae13791
Define payload content d9f50a2f8c
Log request results 86856e3b9a
Inherit at project creation 0d2f7aa97e
Export webhooks in XML 9ffcf35bea
Import webhooks from XML 6a3acf14a5
Webhooks can be processed per batch aff0da6537
Display existing webhooks in UI 85ce114558
Display last 30 logs in dedicated modal cb8026fe37
Delete Webhook through UI 1f8433a50d
Create webhooks through web UI 395f6fd4d6
Update webhook through web UI 124740f1c3
Ensure URL is valid during both creation and update 503e008762
Presenter are objects instead of associative arrays eb0534a4af
Do not mix Retriever and Factory for the same object 1ce3422112
Prepare changeset post creation to deal with other task than mail notifications 16e168ecee
Webhooks are emitted asynchronously when possible 1cc0245883
Retrieval of not processed post changeset creation events should be possible 15f16649bd
Be compatible with the webhook batch API db3035eafb

Follow-ups

User avatar
Thomas Gerbet (tgerbet)2018-06-25 10:28
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • So that
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
User avatar
  • Acceptance criteria
    Something went wrong, the follow up content couldn't be loaded
    Only formatting have been changed, you should switch to markup to see the changes
  • Permissions set to