Answers: <p>Looks like you are using the Gitlab plugin for jenkins?
  if so this link should be of help <a href="https://github.com/jenkinsci/gitlab-plugin#declarative-pipeline-jobs" rel="noreferrer">https://github.com/jenkinsci/gitlab-plugin#declarative-pipeline-jobs</a></p>
  
Answers: CC BY-SA 4.0
Answers: 2020-04-14T16:56:08.983Z
Answers: The implementation/support for gitlab triggers inside the Declarative Directive Generator is thing o' beauty.
Answers: tbradt
Answers: CC BY-SA 4.0
Answers: 2018-08-14T21:05:45.697Z
Answers: This is 100% exactly what I needed!
Answers: Preston Martin
Answers: CC BY-SA 4.0
Answers: 2018-08-14T22:05:40.723Z
Answers: In addition to this, you should be able to use Jenkins' "Pipeline Syntax" tool to generate the declarative code from the web UI configuration.
Answers: jayhendren
Answers: CC BY-SA 4.0
Answers: 2018-08-14T20:40:24.370Z
Answers: 2018-08-14T20:40:24.370Z
Answers: Nune Isabekyan
Body: <p>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:</p>
  
  <p><a href="https://i.sstatic.net/sKc54.png" rel="noreferrer"><img src="https://i.sstatic.net/sKc54.png" alt="GitLab Push Trigger"></a></p>
  
  <p>Is there a way for me to add this trigger to my Jenkins declarative pipeline, if so how? </p>
  
Tags: <jenkins><jenkins-pipeline><gitlab>
Title: Jenkins Pipeline "Build when a change is pushed to GitLab"
UserDisplayName: Preston Martin
ThreadText: # Jenkins Pipeline "Build when a change is pushed to GitLab"
  
  (Asked by: username_0 on 2018-08-13)
  
  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](https://i.sstatic.net/sKc54.png)](https://i.sstatic.net/sKc54.png)
  
  Is there a way for me to add this trigger to my Jenkins declarative pipeline, if so how?
  
  **Tags:** jenkins, jenkins-pipeline, gitlab
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-08-14. Score: 6 | Accepted answer
  
  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>
  
  > **Comments:**
  > **username_0**: This is 100% exactly what I needed!  
  > **username_3**: In addition to this, you should be able to use Jenkins' "Pipeline Syntax" tool to generate the declarative code from the web UI configuration.  
  > **username_2**: The implementation/support for gitlab triggers inside the Declarative Directive Generator is thing o' beauty.  
  
  ---
  
  