Initial steps with Jenkins

43 views
Skip to first unread message

joa...@mistbase.com

unread,
Oct 7, 2016, 5:06:36 AM10/7/16
to Jenkins Users
Hi!
I apologize for asking this extremely stupid newbie question, but currently I'm a bit stuck.
I've been looking on the Internet for an answer, but either this is so simple that anyone can do it (except me) or I've been asking the wrong questions :-(

I've become responsible for setting up a Jenkins server to to build tests and other stuff for our project.

We have several gits that we download via a manifest file using repo.

I've successfully set up the connection between Gerrit and Jenkins so that Jenkins triggers a build when a change is uploaded and by using the repo scm, I'm able to download the code as well.

Sadly, the patches that trigger the build are not downloaded.

All documentation that I've found refer to triggering on a single git and to use the git scm.

Could anyone please point me in the right direction on how to get this setup working? It really shouldn't be anything difficult since many people and large companies use this approach already with Android being a prime example.

BRs,
Joachim Holst

Baptiste Mathus

unread,
Oct 9, 2016, 1:55:55 AM10/9/16
to jenkins...@googlegroups.com

I guess you're using a freestyle job. What config did you put under the "Gerrit event" checkbox?


--
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/caf46b60-fc66-40ff-92df-01e39aeb0919%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Joachim Holst

unread,
Oct 10, 2016, 3:06:12 AM10/10/16
to jenkins...@googlegroups.com
I used patchset created and draft published as triggers. I excluded Drafts, Trivial rebase and No code change.
The trigger works perfectly (at least when I stopped using "**" for branch name).

I finally managed to get the patchset downloaded as well using a script. Not sure that is the correct way to do it though :-/

repo init -u ssh://{username}@gerrit.my.server:29418/{my_manifest} -b master
repo sync
repo download $GERRIT_PROJECT $GERRIT_CHANGE_NUMBER/$GERRIT_PATCHSET_NUMBER

BRs,
/Jocke!

Hälsningar/Best regards,

Joachim Holst
SW Architect

Ideon Science Park
Scheelevägen 27
223 63 LUND

Mobile:     +46 703 45 99 77
E-mail:      jocke@mistbase.com
Website:    www.mistbase.com

Note: Privileged/Confidential information may be contained in this message and may be subject to legal privilege. Access to this e-mail by anyone other than the intended is unauthorised. If you are not the intended recipient (or responsible for delivery of the message to such person), you may not use, copy, distribute or deliver to anyone this message (or any part of its contents ) or take any action in reliance on it. In such case, you should destroy this message, and notify us immediately. If you have received this email in error, please notify us immediately by e-mail or telephone and delete the e-mail from any computer. If you or your employer does not consent to internet e-mail messages of this kind, please notify us immediately. All reasonable precautions have been taken to ensure no viruses are present in this e-mail. As our company cannot accept responsibility for any loss or damage arising from the use of this e-mail or attachments we recommend that you subject these to your virus checking procedures prior to use. The views, opinions, conclusions and other informations expressed in this electronic mail are not given or endorsed by the company unless otherwise indicated by an authorized representative independent of this message.


--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/6xhdIZgb1T8/unsubscribe.
To unsubscribe from this group and all its topics, 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/CANWgJS6oeg%2B_jo6ddCsm%3Db9eLi90BK5YhCZVfEEMZjruW65oqA%40mail.gmail.com.

amol malokar

unread,
Oct 10, 2016, 6:42:22 AM10/10/16
to jenkins...@googlegroups.com

Please go through, Jenkins pipeline steps documentation.

Being heavily developed right now still would be best choice continuous integration & to processes .


--
Reply all
Reply to author
Forward
0 new messages