I want to know if it is possible to run a build on jenkins through another jenkins.
I have two separate jenkins running on two different computers how can I possibly run a build job on one of them from the other ?
If I am building an iphone application and I try to build and deploy it through jenkins, I know I need a mac to develop iphone apps but do I need a jenkins to be running on a mac to build and deploy those applications or can it be running on any computer with any os ?
By the sounds of it you don't need another jenkins instance but a jenkins slave. This is used to build jenkins jobs on other platforms.
I have slave that run on WinXP, Win7 32bit, Win7 64bit and Ubuntu. However my jenkins instance runs on Ubuntu (not the same as the slave). This way jobs can be created with specific labels that will correspond to labels on the slaves.
Example:
job 1, label: ios
job 2, label: winxp
jenkins master: label ubuntu
jenkins slave1: label ios
jenkins slave2: label winxp
This way job 1 will only run on slave 1 and job 2 will only run on slave2 and you don't need to do anything about it.
Related
.If you have 6 jobs can we run some jobs in window slave and some jobs in Linux slave?
Yes, you can run agent nodes on any OS that supports Java. You can also set labels to the slaves and specify this label as the agent when you are creating the pipeline so that the correct job runs on the correct VM. The way you would connect to Linux VMs vs Windows would be different, but after the initial setup, the rest of the steps should be similar.
https://www.jenkins.io/doc/book/managing/nodes/
I have a Jenkins server with a good number of jobs. Recently, I decided to implement slave servers to reduce the server load. Everything went fine until I had this new requirement. Almost all of the java jobs are compiled with OpenJDK 7. Now there are some new projects requiring to be compiled with open jdk 8 and sun jdk 7 and 8. I decided to install new slaves with openjdk 8 and sun jdk 7 and 8 (three separate slaves) and assign those jobs with those requirements using the 'Restrict where this job can be run'option. However, how can I prevent the existing jobs from getting compiled in the new slaves (i.e. I want them to be compiled on the slaves with openjdk 7)?
Master Jenkins is 1.598 running on Redhat 6.5.
Thanks
I found the answer myself. The slave jar, as found in this page, takes two arguments - mode and label. I start those slaves where the jobs to be prevented from running, with an 'exclusive' mode (and a specific label). On the master side I assigned those jobs for those slaves using the 'Restricted to <label>' option. Normal slaves run with a 'normal' mode where any un-restricted jobs can be run. Please let me know if the answer(and/or the question/requirement) is not clear.
You can use Jenkins labels. Please assigne the following labels to the relevant slave machines: jdk8, sun-jdk7 and sun-jdk8.
Next on your jobs, enable this option: "Restrict where this project can be run"
And select the relevant label.
The application I am looking to build is a distributed system with a server (and several other components) running on a linux machine and a client on the windows machine. At every commit I need to build both the components (linux first and windows next) and run some sanity tests
I installed Jenkins slave on the windows machine, but can't find a plugin which will let me link each build-step in a project to a different machine.
i.e I need to say
Run build-step A on machine M1
Run build-step B on machine M2
Run build-step C on machine M1
Think I can create three different projects for each of these jobs and create a fourth project and have 3 jobs triggering the 3 projects in the required order ("Trigger/call builds on other projects). Is this the only way to do it or is there a plug-in I can use to choose a different machine for each build-step in a project.
Once you have your slaves set up, you can tag them with labels like "windows", "linux", etc. Then you can restrict your jobs to only run on nodes with certain labels.
See Jenkins: The Definitive Guide for more details.
In therory Master is : Job and Slave is : Node (however that what im understand).
I installed JENKINS in 2 machines MAC OS X (maybe windows whatever), I set up my job with a correct repository and configure xCode in this job etc ... like same tutorial, i set up my slave etc ... all fine and 10/10 BUTTT this test is local test, in one machine.
My problem is : I want have SLave(Node) for building my xCode Project in MAC OS, and My Matser (job) in others server (why not my seconde machine MAC OS X), How i can establish connection between slave (Node) and Master(job) for building my project xCode in my Remote SLave.
Set your job to use "Restrict where this project can be run" by checking the box and put the name of the slave in the box (use quotes if there are spaces
I had a little trouble deciphering your questions so if this does not answer please rework what you are asking.
Easy set the IP address of the slave host machine in the Jenkins setup. Choose ssh as the communications method and set up accounting information on the slave machines jenkins setup. Make sure the slave machine can ssh to the account and machine you set up in jenkins. Your ready to roll
How to link jobs in Jenkins
Master job: "Trigger/call builds on other projects"
Slave job: Add a Condition Step build: "Run? Build Cause --> UpstreamCause (with The master project name)" and then copy the artifacts (.) from the "Master" job.
Don't forget to copy from the workspace and not from the latest successful build, since the master didn't finished yet and din't publish the artifacts.
I can only build my system on a FreeBSD 5 machine.
I am looking and introducing gerrit and Jenkins into my team.
I have setup the server running gerrit and Jenkins both on a Debian machine for now.
What is the standard way of dealing with Jenkins building on a remote server?
The standard way would be to install a Jenkins Slave on the remote server. See https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds
You then setup the job that must be built on a FreeBSD 5 machine, to only only run on that slave/node. This is can be achieved within the job configuration by specifying the FreeBSD machine by name.
If you don't want other Jenkin jobs to run on that FreeBSD machine, you can configure the slave to only run jobs that are tied to it. See step 4 in the JENKINS Step by step guide to setup master and slave machines for the config page that you need to do this.