The beauty of Jenkins is that a single installation can run on multiple hosts. That’s what slave nodes are for. Rather than cross-compiling, just put together a Linux machine with GCC, and build your Linux binaries there. Here’s what you do.
First off, I’m assuming that you have a job like “Build windows binary”. Configure that job, and check the “Restrict where this project can be run” box so that it runs on “master”. This forces it to run on the Jenkins server itself; since your Jenkins server runs in Windows, this forces this job to run on a Windows machine. In your Linux compiler box, create an account for Jenkins (maybe name it ‘jenkins’). In its home directory, make a directory called “linux1”. Go to Jenkins->Manage Jenkins->Manage Nodes->New Node. Create a new “dumb slave” node called “linux1”. Set up “linux1” to use the launch method of “Launch slave agents on Unix machines via SSH”. Give it the credentials to log in to your Linux compiler box. as a non-root user with access to the compiler. Set the Remote FS to the directory you set up (likely /home/jenkins/linux1). Give it a label of “linux”. After configuring it, make sure that it launches. If you go to the main Jenkins page, you will now see “linux1” on the left, under the build queue. Create a new job, called “Build Linux binary”, as a copy of the “Build windows binary” job. Change the “Restrict where this project can be run” to run on label “linux”. Replace all “Execute Windows batch command” steps with the appropriate “Execute shell” steps—while all new steps are created at the end of the list, you can drag steps into place by dragging the little 4x4 grid at the top left of a given step. Make whatever other changes are necessary to make this job appropriate to your Linux machine. With all this set up, your new job will run on the Linux host you set up, and you can still see everything from the Jenkins server. --Rob From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Kumara Raja S Sent: Friday, January 16, 2015 5:26 AM To: jenkinsci-users@googlegroups.com Cc: david.aldr...@emea.nec.com Subject: Re: Jenkins - Baby steps Hi David, Sorry for the delayed reply. Here is my further analysis. I want to integrate a simple "c" project. This project will be built using gcc. As you mentioned targetting Linux platform. But the Jenkins will be running in windows machine, reason is that, Jenkins need to build the windows based application as well. Further to this, I understood that, I need to have "gcc" compiler in windows machine to build the application. So, I have installed MinGW. But, still am not able to link the project successfully. On Wednesday, January 14, 2015 at 7:20:01 PM UTC+5:30, David Aldrich wrote: Which environment are you targeting? (I guess you are targeting Linux with the gcc compiler). -- 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+unsubscr...@googlegroups.com<mailto:jenkinsci-users+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/39ed8162-8990-42a5-8ef5-3fefa5f412ed%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/39ed8162-8990-42a5-8ef5-3fefa5f412ed%40googlegroups.com?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. Click here<https://www.mailcontrol.com/sr/JwETsHLN6G3GX2PQPOmvUqy!8K4P2+30iYib4kdjg12Ivnq81oddVp5ysW9bRhUYmC+Xt1!OxeesCq9I+zBdpQ==> to report this email as spam. ________________________________ This e-mail and the information, including any attachments it contains, are intended to be a confidential communication only to the person or entity to whom it is addressed and may contain information that is privileged. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender and destroy the original message. Thank you. Please consider the environment before printing this email. -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/0A40042D85E7C84DB443060EC44B3FD36D9ABBB0B7%40dekaexchange07.deka.local. For more options, visit https://groups.google.com/d/optout.