$ sudo docker run -p 8080:8080 -v ${HOME}:/home -v ${JENKINS_HOME}:/var/jenkins-home -v /var/run/docker.sock:/var/run/docker.sock -v $(which docker):/usr/bin/docker -u root jenkinsci/blueocean
- ${HOME} - home directory (e.g.: /Users/Username);
- ${JENKINS_HOME} - a Jenkins-containing directory;
You should add SSH keys both into Jenkins' host and into your SCM host (in this case - GitHub).
Please, refer to:
You should wrap the error-prone step into catchError {...} block. Example:
...
stage('Potentially Error Stage') {
steps {
catchError {
sh './scriptThatThrowsException'
}
}
}
post {
failure {
// NOTE: Pipeline status' is set to FAILED, thus ...
// ... at least one step has failed.
script {
echo "Exception has been caught."
}
}
}