Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,761
    • Issues 44,761
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,329
    • Merge requests 1,329
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #31197
Closed
Open
Issue created Aug 23, 2019 by ..:: Mark Veenstra ::..@mark-veenstra🤖

Pass webhook POST body to the trigger CI job

Release notes

When triggering a pipeline using a webhook the payload is lost in the way, in some cases the payload carries important information that can determine how the triggered pipeline should work. in this release, we've added a new predefined variable to capture the webhook body so it can be kept and be used in the triggered pipeline.

Problem to solve

At the moment you can trigger a pipeline in a different project or the same project based on webhooks. The only problem is that the body that get's posted on the trigger gets lost in the process and can't be retrieved from the CI job that get's triggered.

Intended users

Developer

Further details

A use-case for us would be:

On each project we could add a webhook on the merge request events. Within the Settings --> Integration we could add a URL to a different GitLab project, for example https://gitlab.example.com/api/v4/projects/9/ref/master/trigger/pipeline?token=TOKEN.

The trigger job on that project should have the body of the webhook passed into it. So within that job we could analyze the body from the webhook and based on some values to or maintaince tasks or other nice things.

Proposal

Pass the webhook body to the triggered job. as a file type variable

What does success look like, and how can we measure that?

The webhook body should be passed to the trigger job

Links / references

Edited Feb 16, 2021 by Dov Hershkovitch
Assignee
Assign to
Time tracking