I am searching for a way to create a job in hudson that is a copy of another job, but deploys the installation on another machine (no problem until here). I need the second hudson build (= development environment) to start only in the night (no problem also) and ONLY if the first build (= check environment) is running properly.
The first build will be triggered by SVN checkins and due to a lot of checkins this build is started several times during the day. The second build must not start during our office time, because this would derail our development. At night this development environment should be reinstalled, if the last build of the check environment worked properly.
Does anyone have an idea how to solve this issue? At the moment I have to check the check environment and reinstall our development environment manually, if the check environment has no errors.
Thanks in advance.
Related
Hi I am Teamcity Developer.
Now i Have a task to move Teamcity instance to another server.
So far i moved the instance to another one but i am having a problem with running the builds.
You can see below the builds are in incompatible agents.
SNapshot of my builds in Build agent
Please can anyone suggest the way to get builds run on time.
Your JDK does not seems to be recognized.
You should ensure it has been properly installed on every targeted agent.
To visualize your environment settings, you can click on your agent, Agent Parameters and Environment Variable tab.
Inside the C:\BuildAgent\conf\buildAgent.properties file you can declare new variables, like :
env.JDK_18=C:\Program Files (x86)\Java\jdk1.8.xxx\
And, once it has been done, restart your TeamCity Agent Service.
beaker is a automation tool: https://beaker-project.org/. Does beaker support run job/task without re-install operating system in a machine?
In a scheduled job Beaker will always re-install the machine, there is currently no way to avoid that. (I would like to implement optionally skipping the installation for a recipe, one day.)
If you want to run Beaker tasks on some existing system without re-installing it, maybe because you are testing some changes to a task and you don't want to wait for Anaconda over and over again, you can use the restraint harness. It has a client mode command where you can give it a Beaker recipe XML file and it will run it.
Restraint can also fetch task source from git directly, which is particularly handy if you are testing your own patches for a task.
You can grab pre-built restraint packages from the Beaker harness yum repos.
I have configured TeamCity with Git to get my ASP.NET MVC project.
My solution contains the web app and the corresponding unit tests:
MY_SOLUTION.sln:
- WebAppProject
- SomeCoreLibrary
- SomeCoreLibraryTests
- OtherProjects...
The steps that I have configured in TeamCity are the following:
Get external packages using NuGet
Build the solution and deploy it
Run Unit Tests
Run Automated Tests (using Selenium)
I want to run the unit tests after building but before deployment and stop deployment if the unit tests failed. Currently the deployment is done after the build using the following Command Line Parameters:
/p:VisualStudioVersion=11.0
/p:DeployOnBuild=true I want this to be done only after SomeCoreLibraryTests.dll unit tests have passed
/p:PublishProfile=MyWebDeploy
/P:AllowUntrustedCertificate=True
/P:UserName=username_here
/P:Password=password_here
Thanks,
Ionut
What I've done in similar cases is to use RoboCopy to just mirror the new website into the deployment path. Doesn't that work for you?
P.S.: if you do get this working, I'd suggest doing a performance improvement change in TeamCity (which would allow you to run the unit tests in parallel to the automated tests):
I assume you are employing a single build configuration for all those steps. If that is the case, what I would recommend instead is using Dependent Build configurations to separate the different concerns. You can see an example here in an open source project of mine:
http://teamcity.codebetter.com/viewLog.html?buildId=112432&buildTypeId=bt1075&tab=dependencies
Log in as Guest and expand the Testeroids :: Publish to NuGet tree node to visualize the build flow.
To achieve this, basically you pass around the result of your build step in the artifacts (e.g. you pass the resulting binaries from Compile into Unit Test). You gain several things by using dependent builds: several independent build steps can run in parallel on different agents, plus if one of your build steps fails because of external factors (e.g. let's say Publish failed because the network went down), you can trigger again the build and it will only rebuild the failed steps.
I am not familiar with the tools that you use. However, I would, in general, use a few build configurations for a project:
build configuration, triggered on change, containing these steps: get the latest source code and packages, build/compile and unit test. Then create an artifact for deployment task.
build configuration to deploy to a development server, triggered by successful completion of and using artifact (via dependency) from (1).
build configuration for long running (eg integration/functional) testing that is scheduled to run less frequently.
An advantage of (2) is that you can, if necessary, re-deploy a build/artifact without having to rebuild the artifact first. Also, if you have multiple agents, (2) and (3) can run independently of each other.
Furthermore, you can also tag build in (2) that have passed development checks and then use its artifact in another build configuration to deploy it to test server, etc.
I have created a new team build definition. On every checkin, the build happens on a TFS server (another build controller). After the build completes, I want to publish the files. The MSBuild input arguments used are /p:DeployOnBuild=true;PublishProfile=QADeploy. QADeploy is the publishing profile created.
I expect the team build to succeed which happens. But the successful build does not publish or attempt to publish the files to the destination folder. Any ideas why, the publish via publish profile is not triggered?
Weird, but adding the Visual Studio Version resolved the problem:
/p:DeployOnBuild=true /p:PublishProfile=QADeploy /p:VisualStudioVersion=11.0
I had the same issue and was pulling my hair out. Check out this Similar Problem, it helped me.
I fixed it via copying both WEB and WEB APPLICATION web build targets from this path on a PC with VS installed into the matching path on the build server:
C:\Program Files\MSBuild\Microsoft\VisualStudio\v11.0
(path for VS 2012)
I am not sure if their suggestion of using the full installer for web deploy helps. I tried both suggestions at the same time and it worked there after.
Also it only works on a Web Project
I am new to Jenkins. Please help me with my requirement.
I'm running Jenkins in Windows environment. I have a development box where Jenkins is running successfully. Now, I have to do a build in another windows machine (say QA box) from the dev box. Can anyone suggest me please how to do this?
Solution is quite simple.
Step 1: Create and configure the slave node (QA BOX) with Jenkins.
Goto Manage Jenkins
Click on Manage Nodes
New Node Configuration
Step 2: There may be several ways to complete this task.
Configure the jobs according to the new machine (IP, Ports or any other dependencies). A good practice is keeping the build scripts separate for machine or keeping the separate properties files for different machines.
Configuer Jobs According to the new slave configuration.
Keep in mind any dependency over File Structure, IPs and Ports.
Step 3: Run the jobs and debug for any dependencies regarding the machine.
If you encounter any trouble. Go through the logs and find the related problem.
Create a test node for your QA BOX
Configure a Job to:
Update the latest code to the remote test node, example SVN
Configure the build setting for the remote test node build, example using ANT
Done