Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

How to run Jenkins

$ 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;

Troubleshooting

1. Unable to connect to remote git repository.

You should add SSH keys both into Jenkins' host and into your SCM host (in this case - GitHub).
Please, refer to:

2. POST condition doesn't get executed.

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."
        }
    }
}