Github with jenkins

16 views
Skip to first unread message

dit. k

unread,
Sep 4, 2016, 2:45:53 PM9/4/16
to Jenkins Users
After 2 days of configuration nightmare of jenkins I have to give up and hope the community can help me...

I just want to create a simple job with this tasks:
  1. If I click on "Build" jenkins clones my project from private repsitory on github
  2. then, project should be compiled (maven)
  3. execute junit-test
I don't understand why the configuration should be so complicated. I'm using jenkins 2.3.7 and all tutorials I found are deprecated.

Any tips how to connect jenkins with github?

regards
dit



 

Baptiste Mathus

unread,
Sep 4, 2016, 3:06:53 PM9/4/16
to jenkins...@googlegroups.com
Hi,

You're not saying anything about what failed for you. 

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/aa105947-1c1a-48b1-9b81-5f6f1983d959%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

James Dumay

unread,
Sep 5, 2016, 8:01:47 PM9/5/16
to Jenkins Users
Hi Dit,

One really easy way to get this working is using Pipeline. We've released a new version of Pipeline recently with use case driven documentation that is aimed to get people started quickly.

With Pipeline you checkin a Jenkinsfile into the root of your Git repository to control how the build is run. I've provided an example from the simple quick start guide on the wiki below. The quick start example uses Docker to provide a Maven and Java 8 environment to run the build in (I very much recommend giving it a try). If you don't want to use Docker, there are a few other options to look at.

I hope this is useful to you!

pipeline {
  agent docker:'maven:3.3.3'
  stages {
    stage('build') {
      sh 'mvn --version'
      sh 'mvn install'
    }
  }
}
Reply all
Reply to author
Forward
0 new messages