Can a Jenkins Maven build be executed on separate servers? - maven

Specifically, have the Jenkins instance running on a Linux server execute a Maven build on a Windows server

Yep, you can have a master-slave relation with another box: https://wiki.jenkins-ci.org/display/JENKINS/Distributed+builds
If you only want launch a maven build there without setting up a slave, you can install the ssh plugin, configure ssh access on the Windows box, and then remotely execute the maven build

Related

How to set automatic download dependencies to JMeter slave machines from JMeter Maven Plugin

I was using <jmeterExtensions> tag to specify the dependency plugins although the dependencies are not getting downloaded for slave machines where It is required to manually download them in slave machine. Is there any solution to download dependencies to slave machines as well.
This is not handled by jmeter-maven-plugin and I don't think it can be implemented there.
So the option would be to run a kind of warmup on every machine using remote ssh and launching maven on it.
You could try to automate this using Ansible.
See this blog for more details on using the plugin.

running maven build on jenkins slave not working

I am trying to setup a maven project in jenkins via freestyle option. I have set manage jenkins->configure system to set maven downlaod automatic. But, when I run the project on the slave where there is no maven isntall, it does not automatically download maven on slave and install as i expected. am i thinking something wrong here?
This is what I have done :
1. Manage jenkins-> configure system-> maven install automatically
2. create a new job and select freestyle project
3. in the build step:
scp pom file from master to slave machine
run maven from slave using this pom file
Here there is no maven installed in slave. But, i though because of step 1, it will automatically download maven on slave and install before running the build .
In your build step you need to "Invoke top-level Maven targets", select the Maven version you configured and trigger the job again.
if the installation you added is by extracting *zip and not from Apache you have a "Label" field that is co-related to the Label of the node you're running on. I always use Tools label on my slaves, so just make sure you have this label configured in the node itself.

Jenkins Inegration with TestNG.(when running from jenkins it's not invoking browser)

My project contains (Webdriver,Maven3.05,jenkins) when I run maven command "mvn test" , test will trigger and browser will be invoked, the same set when i had configured using jenkins it will run the tests but browser will not be invoked.Please help me where iam going wrong.(I had installed testng plugin for jenkins all necessary configurations are taken care).
Try starting jenkins using the command line:
java -jar jenkins.war
Usually in Windows not all the services are allowed to use the interface
Hope helps!

Issue on Running JUnit Selenium tests in Jenkins

I'm beginner by using Selenium and Jenkins. So here is my problem.
I got on a Linux VM, jenkins which is installed and got plugins : JUnit attachment and filesystem_SCM.
I got in a folder of that VM the java files containing my selenium tests.
I would to execute from jenkins those scripts executing on a windows machine where Selenium RC is turning on.
How could I do that ? I've seen Selenium grid plugin or just tried to create a job with a shell command containing mvn instruction but I don't really understand what to do ? Does someone could help me ?
What I believe you'll want to do is to configure a Windows Machine (VMs are terrific for this) as a Selenium Slave machine and then have your tests executed there. In this scenario, your Jenkins Master (the linux VM) would trigger the slave (the windows VM) to execute the build.
In Jenkins you can do this by having the Slave execute your build that runs the tests via JUnit. You can either configure executing the tests as a separate build in Jenkins, or simply as a build step in your main build.
Here's some relevant Links:
Jenkins Distributed Builds
Setting up Master and Slave Machines in Jenkins

Configuring a windows jenkins slave to use proper Grails tools location?

I have an ubuntu jenkins master and a windows jenkins slave.
I have one Build with Grails command, and I choose
GRAILS_137, which on the master is set to /opt/tools/grails-1.3.7/
I don't see anywhere to configure the slave to set the grails location. How do I do this? When this build runs on windows, it does this:
cmd.exe /C /opt/Tools/grails-1.3.7/bin/grails
How do I configure the grails location for the windows slave jenkins? Trying to configure Node options of the slave from the master only lets me select JDK, Git, and Gradle locations.
The grails plugin has no support for slaves.

Resources