In this part you'll let the pipeline log in to AWS with its ID token. The call you'll cover: call 5, job → AWS STS: the job trades the ID token for AWS credentials. What it adds: AWS is set up once to trust GitHub's tokens for your repository's main branch. No AWS secret is stored in GitHub: each run gets credentials …
Read MoreIn this part you'll let the pipeline deploy to an EKS cluster. The call you'll cover: call 6, job → EKS: the job deploys the image with the AWS credentials from Part 4. What it shows: Two worlds check the job, so it is refused twice before it gets in: IAM decides what the role may do in AWS: read the cluster's address; …
Read MoreIn this part you'll give the cluster a credential of its own, so its pods can pull the private image. The call you'll cover: call 7, cluster → Docker Hub: the node starting a pod pulls the image Part 5 deployed. The caller here is not the job. Part 5's last run was this call's refusal: pull access denied, since the …
Read MoreIn this part you'll have the pipeline tell a Slack channel about each deployment, then clean up the whole lab. The call you'll cover: call 8, job → Slack: the job posts a message after each deployment. The credential is a URL: Slack accepts any message posted to it. It needs a Slack workspace where you may add an app; …
Read MoreIn 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 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 pipelines. …
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 More