This repository will show you how to integration github and jenkins.
Run the jenkinsci/blueocean image as a container
docker run \
--rm \
--name jenkins \
-u root \
-p 8080:8080 \
-p 50000:50000 \
-v jenkins-data:/var/jenkins_home \
-v /var/run/docker.sock:/var/run/docker.sock \
jenkinsci/blueoceanExample to build plugin for jenkins
mkdir plugin_build && git clone https://github.com/AngryBytes/jenkins-build-everything-strategy-plugin
cd plugin_build/jenkins-build-everything-strategy-plugin
docker run -it --rm --name my-maven-project -v "$(pwd)":/usr/src/mymaven -w /usr/src/mymaven maven:3.3-jdk-8 mvn package
cp target/build-everything-strategy.hpi ../../jenkins-data/pluginsExample restart jenkins
http://xxx/safeRestartgithub --> setting --> Personal Access Token --> Generate new token
select
- repo
- admin:repo_hook
- user:email- Fork and clone this sample repository on github
- add webhook to jenkins server
Payload URL: http://xxx/github-webhook/
Content type: application/json
Which events would you like to trigger this webhook: Just the push event. - Create a new pipeline with blueocean pipeline creation wizard.
