If I 'start' a process in a TeamCity build will it be removed when the build completes? - teamcity

If I have a TeamCity installation on Windows and I spawn a process with a windows start command (actually I am starting a Puma/Rack webserver) will the process created by that start command be automatically removed when the build job completes?
Does TeamCity provide an isolated process space for each build job on Windows?
Or should I clean up after myself?

Related

Visual studio code run another task in another terminal when launching the project with a background task

I have looked at the docs of how to setup tasks in VS code. But its not clear on how to run a second task in another terminal while launching the project which already runs a task in background
I currently have a build task defined in tasks.json, which runs on launching the project with F5
But I want to run another task which runs an npm script in opening another terminal. e.g
npm start
Opening in another terminal means, it can be killed seperately without affecting the original background task.

How to run script shell before building on Jenkins

(Jenkins newb-newb-newbie here)
Hi there.
I have a Maven project, deployed on Jenkins . In this project, I have an integration test, which depends on a .Net server in order to be run correctly.
The problem is, when I'm trying to build my project on Jenkins, the integration test fails, because the .Net isn't launched...
I need to execute a shell script (for launhing the .Net server) before building my project.
So my question is : how can I launch a script of my project before building from Jenkins?
Theres a build step Execute Windows batch command which you could use to start your server.
You might have to use START to have it launched in a separate process, so your build continues without waiting for the server process to finish, and you might need to put in some delay in case your server needs some time to settle before your tests can run.
You might also need to kill your server after your tests are done, you might be able to use tasklistand taskkill in another Execute Windows batch command build step, and some batch magic to do this.

Running Powershell Script after Build automatically

My question is that how can I trigger a powershell script when I check-in a code in VS2013 automatically.
see what I have done till now is that as soon as I check in a build is triggered. Separately I have a PS script that I run after the build succeeds, now what i want is that the script should run automatically as soon as the build succeeds, and i do not have to do anything to trigger the sript
If you are using XAML build in tfs, you can specify the path to a custom script in Build Definition--2.Build--5.Advanced--Post-build script path, which will run after the MSBuild activity successfully completes.
If you are using the windows build agent, then you can simply add a PowerShell build step after the build step. See: https://msdn.microsoft.com/en-us/Library/vs/alm/Build/scripts/index#env_vars

Single Team Foundation command exits build step after execution in Jenkins

When executing Team Foundation commands in a free-style Jenkins job on a Windows Slave (within a 'Execute Windows Batch command' section), the successful execution of a command will cause that build step of batch commands to exit regardless of whether there are other commands remaining after the tf.cmd call.
For example, to create a new workspace and then map that workspace, I need 2 individual instances of 'Execute Windows Batch command' build steps. Placing both these commands in the same build step will result in only the first being executed.
Does anyone know why this might be happening and how to resolve it (other than the current workaround of many build steps).
Thanks.
Note: The TF plugin does not fit my needs for this particular Jenkins job because the plugin does not allow gets from labels.
Since there isn't another answer for a while, I recently found a different workaround that resolves this issue a bit nicer.
When calling the tf.cmd, use call before the command. This allows multiple tf commands to be executed in the same Jenkins window.
Example:
call tf.cmd workspaces /format:brief /server:http://servername

Is it possible to make Jenkins run a script after a job is created?

I have a code management app that integrates with Jenkins via CLI, creating, deleting and building jobs. After I create a new Jenkins job, I need to run a shell script. This script depends on some directories created by Jenkins, namely the workspace.
Jenkins CLI is non blocking, thus I can't just wait for the command to terminate. Is it possible, maybe with a plugin (I couldn't find any...), to trigger the execution of a shell script post job creation?
jenkins CLI command build has the command option -s which will block the trigger action until is finished.
See YOUR_JENKINS_URL/cli

Resources