Jenkins: prevent Deploy from running with Selenium Tests - deployment

we have about 20 selenium builds and 1 deployment build (for every of 4 environments)
what is the best way to prevent deployments and selenium tests from running simultaneously?
to use ThrottleConcurrentBuilds plugin i'll need to create 20 categories of 2 builds in each - Deployment+SeleniumJob1, Deployment+SeleniumJob2, Deployment+SeleniumJob3 etc.
and when I'll do it for every environment, i'll get 80 categories in total
is there any better way to do it?

Related

How to run junit system integration tests in kubernetes/service mesh?

We have a service mesh/kubernetes working via the terminal, showing all the different pods with their different name spaces. Inside of each pod, you can console in and see the app.jar.
Recently, boss/client asked how we can run the various SYSTEM INTEGRATION tests for any particular JAR from the service mesh/kubernetes command line. Google says to use 'mvn clean install', 'javac' or 'java -jar junit-platform-console-standalone-1.7.2.jar --class-path target --select-class '. These all fail for various reasons (mvn not present, javac not present, jar says that port is in use. Of course the port is in use, the same aforementioned jar is using it).
When I look at a pod in Gitlab (or Intellij) I see all the tests it has. But how I can run these SYSTEM INTEGRATION tests from the pod console? Ideally a command to run all tests, that would make things a lot easier.
edit:
lol at the heat in the comments. I clarified with the boss, she said that we want to run system integration tests from the service mesh, not unit tests. These pods are not isolated, some of them depend on each other.
Generally the comment from the user jonrsharpe could be an answer to the question:
That makes no sense as a request - you run the unit tests on the source code, then build and deploy the container if they pass. They shouldn't even be included in what's in the deployed jar.
If you need to test an application, do so before deploying it. You should have a separate environment where you will test your application, and only use Kubernetes when the application is working properly. You can of course use some CI type solution. Look at this page - Running JUnit tests with GitLab CI for Kubernetes-hosted apps.
EDIT
If you are looking for a solution to make integration testing with Kubernetes you can read a couple of docs. It all depends on what specifically you want to test. I present several possibilities:
Overcome Kubernetes Application Integration Testing Challenges with Telepresence
How we approached integration testing in Kubernetes, and why we stopped using Helm tests
Testing Kubernetes deployments within CI Pipelines

Running UI test in Jenkins Docker-Slave

With the use of Jenkins Docker Plugin we can provision the slaves dynamically.
My need is to run UI tests on the automatically created slaves. Is that feasible? If yes, how can we achieve that?
UI tests are WindowTester test cases for eclipse based tool.
I am doing same kind of stuff, On successful build we are running all automated test cases on windows machine.
In your Jenkins, you need to add Windows machine as a Slave machine.
Try below tutorial -
https://wiki.jenkins.io/display/JENKINS/Step+by+step+guide+to+set+up+master+and+slave+machines+on+Windows
Once node is up and running then in your Job make sure you selected windows slave node.

Deploy UWP automatically on debug but not on build

UWP applications under Windows 10 must be deployed before they can be run/debugged.
Visual Studio 2017 offers an option to disable deployment of a project on build:
This allows one to build a solution and check for compilation errors (e.g. ctrl+shift+b) without needing to wait several seconds (even on a machine with 64GB of RAM and an MLC or 3D XPoint SSD) for the deploy to go through.
However, the problem here is that attempting to debug the application (e.g. F5) will run the last-deployed version of the project, which is undesirable.
Is there an easy way to set the debug target for the project such that it is deployed on first debug (as is currently the case), subsequent debugs without changes to the build do not trigger an unnecessary deploy (which is the default, out-of-the-box behavior), but builds do not directly trigger a deploy?

TFS Release Magament multiple deployments of same application

I currently have a VS2015 solution that comprises of 6 applications, Web site, DB, Web Service, Console Apps.
This solution is deployed multiple times to different servers internally. At the moment i have only 5 working instances. Potentially i could end up with 10 - 20 50 etc.
I'm struggling to understand how Release Management could help me deploy this solution n number of times. Is there something else that i could perhaps use to orchestrate the deployment?
A release definition is a collection of environments. An environment is a logical entity that represents where you want to deploy a release. You can add environment in build definition to achieve multiple deployments.
More information, check https://msdn.microsoft.com/en-us/library/vs/alm/release/overview

Splitting build cross the network?

Is there a known solution for splitting build process cross the network machines?
Use case:
We are an average software development company. We own around 50 development workstations (Quad Core 2.66Ghz, 4 GB ram, 200 GB raid). No need to tell that at any single moment not every machine is loaded to the max.
There are 5 to 15 projects running simultaneously at any single moment. Obviously all of them are continuously build on server, than deployed to proper environment. Single project build is taking from 3 to 15 minutes.
The problem: Whenever we build 5 projects in a row the last project is going to be ready after around 25 - 50 minutes. Building in parallel does not solve the problem (build is only a part of the game, than you need to deploy, run tests etc.)
YES the correct solution is to add another build server, but "That involves buying new Expensive hardware, and we already spent a lot!". Yea, right(damn them)!
Anyway. What about splitting build among developers workstation? Lets say whenever we need to build project "A" we check 5 workstations and start build on all that are not overloaded. The build can be canceled by a developer if he really needs all the power of his machine as long as there is at least 1 machine that is still building. After build is finished deployment can be performed to a proper environment (hosted on some server, not on workstation :) ). The bigger the company the more this makes sense to me.
Anyone tried something like this? Are there any good practices? Any helpful software?
(90% of the projects are .net C#, platform - Windows)
You can also check our Parabuild at http://www.viewtier.com - it allows to designate a set of machines as a build farm. Works practically on any platform. It looks like that's what you are looking for.