Skip to content

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

github integration with jenkins

This repository will show you how to integration github and jenkins.

alt text

Run 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/blueocean

Example 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/plugins

Example restart jenkins

http://xxx/safeRestart

Generate github access token

github --> setting --> Personal Access Token --> Generate new token

select
  - repo
  - admin:repo_hook
  - user:email

Create your Pipeline project in Blue Ocean

  • 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.

Reference

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages