Wilson Mar bio photo

Wilson Mar

Hello!

Calendar YouTube Github

LinkedIn

Slave nodes are now opinionated agents

US (English)   Norsk (Norwegian)   Español (Spanish)   Français (French)   Deutsch (German)   Italiano   Português   Estonian   اَلْعَرَبِيَّةُ (Egypt Arabic)   Napali   中文 (简体) Chinese (Simplified)   日本語 Japanese   한국어 Korean

Overview

This article shows you how to install and configure Jenkins Freestyle jobs for Continuous Delivery (CD) as well as Continuouse Integration (CI) using Groovy DSL scripts

This is the companion to my Pipeline tutorial.

I want you to feel confident that you’ve mastered this skill. That’s why this takes a hands-on approach where you type in commands and we explain the responses and possible troubleshooting. This is a “deep dive” because all details are presented.

Like a good music DJ, I’ve carefully arranged the presentation of concepts into a sequence for easy learning, so you don’t have to spend as much time as me making sense of the flood of material around this subject.

Sentences that begin with PROTIP are a high point of this website to point out wisdom and advice from experience. NOTE point out observations that many miss. Search for them if you only want “TL;DR” (Too Long Didn’t Read) highlights.

Stuck? Contact me and I or one of my friends will help you.

An example of the Console Output from a Freestyle job:

Started by user anonymous
Building in workspace /var/lib/jenkins/workspace/dv node freestyle v01
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url https://github.com/hotwilson/box.git # timeout=10
Fetching upstream changes from https://github.com/hotwilson/box.git
 > git --version # timeout=10
using .gitcredentials to set credentials
 > git config --local credential.username hotwilson # timeout=10
 > git config --local credential.helper store --file=/tmp/git2674827390822911879.credentials # timeout=10
 > git -c core.askpass=true fetch --tags --progress https://github.com/hotwilson/box.git +refs/heads/*:refs/remotes/origin/*
 > git config --local --remove-section credential # timeout=10
 > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
 > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
Checking out Revision 61274be42caff84c52856db2e13b5f6e70259211 (refs/remotes/origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 61274be42caff84c52856db2e13b5f6e70259211
 > git rev-list 61274be42caff84c52856db2e13b5f6e70259211 # timeout=10
   
  1. Docker build Nodejs on CentOS
  2. Push to dockerhub

At end:

Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Finished: SUCCESS