4

I have a Jenkins declarative pipeline that is ran via a webhook from GitLab whenever a change is pushed to my repo. In Jenkins, I have the following trigger option selected:

GitLab Push Trigger

Is there a way for me to add this trigger to my Jenkins declarative pipeline, if so how?

3

Looks like you are using the Gitlab plugin for jenkins? if so this link should be of help https://github.com/jenkinsci/gitlab-plugin#declarative-pipeline-jobs

  • 1
    This is 100% exactly what I needed! – PrestonM Aug 14 '18 at 21:05
  • 1
    In addition to this, you should be able to use Jenkins' "Pipeline Syntax" tool to generate the declarative code from the web UI configuration. – jayhendren Aug 14 '18 at 22:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.