Jenkins: Difference between revisions

From Pumping Station One
No edit summary
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{mbox |type=warning |text=This system has been decommissioned. [[IT Infrastructure|Up-to-date IT information can be found here]] }}
== General info ==
== General info ==


Jenkins is an automatic build server. It compiles code projects on change
Jenkins is an automatic build server. It compiles code projects on change


== Github Integration ==
== Github Integration ==


Github integration requires an ouath token to create post commit callbacks to the jenkins server.
* Go to your projects "settings" link in github
* Click "Webhooks & Services"
* Click "Add Service"
* Type "Jenkins" and then click "Jenkisn (Git Plugin)"
* In the '''Jenkins Url ''' field, type "https://jenkins.pumpingstationone.org/github-webhook/"
* Clock "Add Service"


=== Option 1: Let Jenkis Manage Webhooks ===
After following these steps, you will be able to turn on the "Build when a change is pushed to GitHub" build trigger for projects.


* go to https://github.com/settings/applications
== Adding A Buildslave ==
* click "Generate New Token"
** Token Description: https://jenkins.pumpingstationone.org/
** write:repo_hook - Checked
** read:read:repo_hook - Checked
** admin:repo_hook - Checked
** All other options should be unchecked
* Click Generate Token
* Copy the token under "Personal access tokens".
* go to https://jenkins.pumpingstationone.org/configure and scroll down until you see "GitHub Web Hook"
* Click Add
** API URL: leave this blank
** username: your github username
** OAuth token:  Paste the token from "Personal access tokens"
* click save


=== Option 2: Manually Manage Webhooks ===
    sudo pacman -S libvirt qemu jdk8-openjdk
    sudo useradd --home-dir /srv/jenkins --groups kvm --create-home --system jenkins
    sudo -u jenkins mkdir ~jenkins/.ssh
    sudo chown jenkins:jenkins /srv/jenkins/.ssh/authorized_keys
    sudo chmod 700 /srv/jenkins/.ssh/authorized_keys


* go to your project page on github.
[[Category: Systems]]
* Click "Settings" in the right sidebar
* Click "Webhooks and Services"
* Click "Add Service" and type "jenkins"
** You should see "Jenkins (Git plugin)"
* In the "Jenkins hook url" box, enter "https://jenkins.pumpingstationone.org/github-webhook/"
* Click "Add Service"