I'm newbie with Jenkins and I want to run jobs dedicated to embedded boards.
Question: Is it possible to view all boards connected into a slave machine USB port in Jenkins?
Still Searching for possibilities
Related
I have the following setup:
Microsoft TFS with jobs and pipelines
A VM under Virtual Machine Manager (VMM) which has Windows10
The job from TFS can connect to VM to run commands remotely
My goal is to automate test case when there is no network connection inside the VM (mainly no internet connection) to verify that some features of my software under test behave as expected and do not use network to achieve my test calls.
Currently I use powershell on target machine to run scripts remotely in the VM https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/deploy/powershell-on-target-machines?view=azure-devops .
I made research online already but I didn't find something specific to TFS and VMM.
Perhaps it is worth it to mention that I found this script online:
#!/bin/sh
ip link set ens32 down
sleep 20
ip link set ens32 up
But the script was written in a Linux and SSH connection context, which isn't the same as my environment.
Is there anyway to achieve automation of networking disconnection remotely and then turning on again the network connection state ? (simulation tools are also ok for me if they do achieve my goal and can be integrated in TFS pipeline or VM tools installation).
We are trying to setup a virtual machine environment complete with build tools, sql server, etc to allow development teams to have unique CI environments (both code and DB to allow functional verification). We have created this machine with everything installed (visual studio tools, sql server, etc) along with a couple of agent agents on other machines for performing unique tasks like redgate sql compare sync,etc. Our idea is to create a VMWare template of this machine. Each DEV team could spin up one of these machines and develop/verify on their unique branch which will be configured while the virtual machine is being spun up.
My question is how can we have several of these machines that have jenkins server, use the same agent machines. I don't want to reconfigure new agents at spin up but have the new VMs use the existing agents.
Try Docker, I think it will fulfill your requirements.
"Setup Jenkins master and Build Slaves as Docker Container" :-
https://devopscube.com/jenkins-master-build-slaves-docker-container/
I hope this link is helpful.
I have two different jenkins. I have a windows machine which acts as a slave for both jenkins , workspace is different. I have used Launch Agent via java web start (slave.jar). I want to know that will this cause any problems.
In short two different master have a common slave , will it cause any issue.
It will never cause an issue till the working directories of slaves are different. I had used this to be part of large CI setup with less than 8 machines with configurations of 20+ slaves
The same will be the case with different masters where the working directories of slaves are not the same on the remote machine
I am setting up a CI workflow using Jenkins. I have various code bases that I would like to be able to test on different operating systems from Windows Server 2012 through 2003 and also Red Hat, etc.
I'm wondering if using Jenkins slaves would be an effective solution for this.
Specific questions are things like:
If a master executes a project, where is the project defined vs where does the job execute?
If I want to execute a job that tests a language I don't want to support on the masters operating system (think Ruby on Windows), do I still need to make the master aware of that language in order to define the job, say by installing the relevant plugin?
If I define a slave that's running inside a VM and I stop the VM, when the VM comes back up, am I going to have to run some sort of start up task on the slave, or pre-execute task on the master, to re register the slave before I can start a project running on the slave?
When the slave task completes and the results are reported back, are those results stored on the master such that I can shut down the slave and still have access to previous test run results and trending information?
Thanks in advance for any advice.
If a master executes a project, where is the project defined vs where does the job execute?
The jobs are defined and stored on the Master, they are executed on the Slave machines. You can define which jobs get executed on which slaves by using labels.
If I want to execute a job that tests a language I don't want to support on the masters operating system (think Ruby on Windows), do I still need to make the master aware of that language in order to define the job, say by installing the relevant plugin?
The Master doesn't need to know about the build environment. If you set up the Slave with the proper build environment, that should be fine. The master just delegates the jobs and such.
If I define a slave that's running inside a VM and I stop the VM, when the VM comes back up, am I going to have to run some sort of start up task on the slave, or pre-execute task on the master, to re register the slave before I can start a project running on the slave?
It depends on how you are connecting the Slave to the Master. For example, if you connect a Windows machine with the launch method: "Let Jenkins control this Windows slave as a Windows service". It should reconnect automatically when the Slave is back online. There is some setup involved in getting this to work however.
When the slave task completes and the results are reported back, are those results stored on the master such that I can shut down the slave and still have access to previous test run results and trending information?
Console log are kept on the Master. That's probably what you want.
Hope that helps :)
I've been reading about Jenkins master/slave configurations but I still have some questions:
Is it so that the slave Jenkins is not actually installed and started up the way master Jenkins is? I assumed I would install one master Jenkins and another slave Jenkins in the same way, and then master Jenkins would control the slave e.g. through SSH? So I cannot view the slave Jenkins through a GUI?
The reason why I have thought about adding a slave Jenkins on another VM is because the VM contains our application servers (many test environments). Deploying and starting/stopping application servers from master Jenkins is a pain because master Jenkins and application servers are on different machines. Therefore, if I would add a slave Jenkins to the machine where our application servers are, these would actually be deployed and started/stopped locally (by slave Jenkins). I wonder if I have missed something, of if my presumptions are still valid.
In a standard Jenkins master/slave setup, Jenkins is only installed on the master. That is where you see the user interface and start/configure build jobs.
The slaves execute the jobs. There is no Jenkins installation here other than a small Java app to have Jenkins communicate to/from the slave. Jenkins talks to these slaves through the slave.jar app over e.g. SSH via the SSH Slaves Plugin and can monitor if the slave is running, etc.
So in your case, you can start jobs from the master that will execute on the application servers.
The master/slave setup also allows you to host all whole bunch of different slaves, with different OSes, different hardware, etc. You can communicate job results (artifacts) from one slave to another via the Copy Artifacts Plugin.
There are also ways to duplicate the actual Jenkins master with load balancing in a heavy use scenario. That is not what you seem to be looking for.