jenkins-docker

A custom jenkins docker image with some plugins and git credentials set up based off the official docker image.

Official jenkins repo Official jenkins on docker hub

Setup

cp jenkins/ssh-key-example jenkins/ssh-key
ssh-keygen -t ed25519
# Update jenkins/ssh-key
# Add jenkins/ssh-key.pub to GitHub (or other provider)
make buildAndRun

Usage

Using nvm in a build:

stage('NVM') {
    steps {
        sh '''
        #!/usr/local/bin/bash
        source ~/.bashrc
        nvm --version
        '''
    }
}

Useful links