Jenkins Pipeline "Build when a change is pushed to GitLab"

11,938

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

Share:
11,938

Related videos on Youtube

Kishori Agrawal
Author by

Kishori Agrawal

DevOps Engineer at GitHub and certified AWS DevOps Engineer with a love for all things automated. I teach and preach DevOps, and believe that continuous integration pipelines are essential to delivering products in a fast and effective manner. If my answers have helped you, feel free to leave an endorsement @ https://www.linkedin.com/in/pmartindev/

Updated on September 18, 2022

Comments

  • Kishori Agrawal
    Kishori Agrawal almost 2 years

    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?

  • Kishori Agrawal
    Kishori Agrawal almost 6 years
    This is 100% exactly what I needed!
  • jayhendren
    jayhendren almost 6 years
    In addition to this, you should be able to use Jenkins' "Pipeline Syntax" tool to generate the declarative code from the web UI configuration.
  • tbradt
    tbradt about 4 years
    The implementation/support for gitlab triggers inside the Declarative Directive Generator is thing o' beauty.