In the previuos post we have create smee.io infrastructre that can be used to deliver push notification from Github to Jenkins. Now we can go to Github and Jenkins to configure those webhooks. Github Plugin There are several plugins that can receive webhooks in Jenkins. Generic Webhook Trigger Gitlab Plugin Job trigger …
Read MoreWe start our journey towards a full example where we use github webhooks to trigger a build in a single branch pipeline. The big picture This is what we want to achieve (see notes below): We want to configure GitHub to use webhooks to send notifications about change in repository (git push) Unfortunatelly, my computer …
Read MoreIntroduction Jenkins Terms Jenkins GUI Jenkins Freestyle Job Jenkins installation jenkins all in docker 1 jenkins all in docker 2 Pipelines Pipelines Primer 1 Pipelines Primer 2 Scripted Pipelines Declarative Pipelines Docker Agent Environment variables Multibranch Pipelines Multibranch Basics Triggering Multibranch …
Read MoreIn the previous post , we have created a docker:dind container, a smart container that has docker installed inside, can store docker images, and run internal containers. In this post we'll use it as a jenkins agent from a Jenkins controller (also a container), so that Jenkins could run docker agent stages and …
Read MoreThis post is based on these instructions . How to run everything in docker containers We are using a unique configuration, where the Jenkins controller+agent are running in a docker container. The basic Jenkins image we can use is jenkins/jenkins image. The problem with this image is that the Jenkins agent included …
Read MoreWhat is a docker agent? How can we create one and use it? We'll explore this on the next post(2) What is a docker agent Let's say that I want to run some nodejs javascript code. I don't want to really install nodejs on any of my agents. Can I use docker? Yes!!! I can specify a docker agent in my pipeline. Jenkins will …
Read MoreHere's an example of a file with environment variables: 1pipeline { 2 agent any 3 4 environment { 5 globalvar = 'global' 6 } 7 8 stages { 9 stage('stage1') { 10 environment { 11 localvar = 'local' 12 } 13 steps { 14 echo localvar 15 echo globalvar 16 } 17 } 18 stage('stage2') { 19 steps { 20 echo localvar 21 echo …
Read MoreDeclarative pipelines were created to allow users create pipelines without learning Groovy programming. Declarative pipeline example Create a new pipeline, as we've done in pipelines-primer-1 post ...but... Choose GitHub + Maven example, which is the same as the one we have covered in scripted-pipelines , but using a …
Read MoreScripted pipelines are using Groovy language syntax to achieve part of the requirements for a pipeline. The other option (that we'll cover in another post) is Declarative syntax. Scripted Pipeline example Create a pipeline as explained in pipelines-primer-1 but select Scripted Pipeline from the dropdown selection: …
Read MoreLet's add some scm (source control management) abilities to our pipelines. SCM We can add one more stage to the pipeline created in the previous post that will be used to clone a git repository I'll be using checkout: Check out from version control (that has more options than git:Git) Using the Pipeline Syntax tool …
Read More