The pipeline script written to tranfer the pipeline project from Slave to Master in Jenkins?Master(Windows server) and Slave(windows local) - jenkins

In Jenkins, I have build a pipeline project on Master and given Agent label Slave in the script where the project is build. I want to transfer this build from Slave to Master. I am not able to find the script to transfer this process as i am using Windows for both master and slave.My Master is on Windows server(i.e. VM) and Slave is on Local Windows machine.Can someone please help me to find this as I am new for the Jenkins.

Related

How I can copy files from one remote workspace to master machine in jenkins pipeline?

I have created one jenkins pipeline in which I am running 4 jobs on four slave machine, it creates four workspaces on all 4 slave machines ,once the execution will be completed ,I want to copy some files from the slave workspaces to master workspace or master machine .
Please help me to figure out the solution for the same.
Use the SSH Pipeline steps and use the command sshGet.
Here's the code:
sshGet remote: remote, from: "${yourSlaveFilePath}", into: "${yourJenkinsworkspaceFileName}"

How do I tell Jenkins what to run on my slave machine?

My Jenkins master is up and running. I have created a slave node, launched it successfully from the slave machine, and have done the web services installation so that the connection is established on startup of the slave machine. I have also created a "job" that builds successfully in Jenkins.
How do I tell Jenkins what to actually do on my slave machine? I want to use Jenkins to run an IntelliJ test suite (Selenium and Cucumber) on the slave machine, but haven't been able to figure out exactly how to get it to do this. Note: I've just started looking into the Seleniumhq plug-in, but I'm not sure if this is what I need or not since I'm working with a remote slave.
Limit where the jobs can run using the 'Restrict where this project can be run' to your slave node.
Distributed Builds in Jenkins
My confusion here stemmed from not having my project connected to a VCS repository. Without it, I couldn't figure out how to build-out my project's workspace in the slave environment from Jenkins. I also didn't understand the concept of adding additional build steps at the time I asked this question.
Once I had the VCS connection set-up (I had to do some finagling with Git/Visual Studio Team Services to get it connected, which is why I went with "none" as my version control option at first), my workspace was built for me on the slave machine when I built the project from Jenkins. Then, I used a combination of build steps ("execute Windows batch command" and "Invoke top-level Maven targets") to carry-out the rest of the project's functions.

Run a windows batch job on jenkins slave

I am a newbie to the jenkins and trying to run a windows batch job in Jenkins slave. I can see the workspace with all the svn code in job but when am trying to access the command from the workspace folder , i am getting an error path not specified. this is because the Jenkins master is having workspace path as [workspace]/[jobname] where as in slave it is [jobname]/[workspace]. How can i identify the workspace path in jenkins master and run from the slave . please help!
Your not supposed to work on the master. You need to tell which slave your working on with the agent{ label 's1'} block. After, go see the Snippet Generator and check the Checkout function for your svn request.

Setting up multiple Jenkins Mac slaves with Jenkins Linux master

I wanted to create ipa files with a Jenkins slave on mac. My Jenkins master is on Linux.
So when creating a job in master, I need to configure the Xcode plugin. So should I give the path and keychain in the slave?
Or is there a way to create the job in slave and the master triggering it?
Jenkins slaves are just "runners", they don't provide configuration page. All the job configurations are made on the master, even if it's a Linux machine.
Start by setting up a Jenkins slave on the Mac:
http://www.parsed.io/setup-a-mac-slave-for-jenkins/
https://blog.samsaodev.com/how-to-setup-a-jenkins-slave-running-mac-osx-for-ios-projects-part-1/

Jenkins - How to build a master job in slave machine?

Initially, I configured the master and slave connection setup in windows machine by launching Java web start method. And then Created a Job in Master machine. Now my question is how to assign a master job to slave machine to build the job. Please provide me the steps to follows. Thanks you.
And please let me know is slave machine requires master machine URL for Connecting Master Slave Connection setup?
You can tie your job on whichever slave you want.
There is option of "Restrict where this project can be run", You can provide jenkins slave name on which this job should always run.
Answer to your last doubt. There is standard methods to connect slave to master, it depends how are you connecting the slave to master.

Resources