Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-1805

Implement a save or commit hook

    Details

      Description

      Question was about triggering CI build on Studio change, but it can also be used for automatic emailing, or any other kind of notification.

      From the discussion on dev@nuxeo.com:

      On Studio side

      We currently don't want to expose the Studio projects' SCM, we cannot (for various security and technical reasons) and it wouldn't be reliable (there are some slight differences between Studio "commit"/"tag"/"save" features and the underlying Git commits).
      Maven polling would work as is. But we shouldn't encourage it since such a behavior quickly overloads the targeted server. On CI, I stopped using it for a while since it was killing our servers.
      The best solution is the one suggestion by Mathieu: add a feature into Studio for registering URLs to notify when there's a change. Exactly like what we do for GitHub + Jenkins. Moreover, it's technically easy to add an URL push on the save or commit actions for instance.

      On Jenkins side

      There's a generic hook management based on a token
      => that's what we use for Mercurial triggering
      The client can add a intermediate processing receiving the push from Studio, doing some stuff, then forwarding it to Jenkins with the above hook
      => that's what we do for commit emails; see https://hgpriv.nuxeo.org/admin/github-hooks/file/b3776efabfb0 ; URL is https://qa.nuxeo.org/githooks/send-email
      There's a specific Jenkins GitHub plugin, listening to $JENKINS_URL/github-webhook/. It enhances the default token based hook and could easily be forked and adapted to Studio.
      => that's what we do for GitHub triggering; URL is https://qa.nuxeo.org/jenkins/github-webhook/

      Hook implementation Studio-side:

      • add the possibility to register URLs which will be notified (including authentication parameters),
      • with checkboxes, choose when to be notified (on change, commit, tag, ...),
      • define and document the JSON structure which will be sent,
      • sample the triggering configuration.

      Tests can be done to trigger builds on QA priv.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              jcarsique Julien Carsique
              Participants:
            • Votes:
              3 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                PagerDuty

                Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.