Jenkins Pipeline "Build when a change is pushed to GitLab"
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
Related videos on Youtube
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, 2022Comments
-
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:
Is there a way for me to add this trigger to my Jenkins declarative pipeline, if so how?
-
Kishori Agrawal almost 6 yearsThis is 100% exactly what I needed!
-
jayhendren almost 6 yearsIn addition to this, you should be able to use Jenkins' "Pipeline Syntax" tool to generate the declarative code from the web UI configuration.
-
tbradt about 4 yearsThe implementation/support for gitlab triggers inside the Declarative Directive Generator is thing o' beauty.