Can CruiseControl.NET be configured to have pre-build options set from a web page? - cruisecontrol.net

I'd like to create some tasks that will be triggered manually. These would include various installers being generated. I'd like to be able to set some options that will be passed to the installer build task before I manually trigger the build.
Can ccnet be configured in such a way as to allow me to do this? Preferably I'd just have a page that has a bunch of check boxes indicating to include this piece in the created installer. I can handle the installer part, I'm just looking for information on the ccnet side.

Yes parameters: http://cruisecontrolnet.org/projects/ccnet/wiki/Parameters
When you manually trigger the build a dialog pops up with controls to configure the parameters.

Related

Create separate assembly for each page in TFS Build 2012 defination

I am working on creating build from TFS 2012. I am able to generate build from TFS build templates but problem is that my website(ASPX pages), I am using after generating build is not creating separate dll for individual page.
But If I generate build from VS2012 I can generate build with separate assembly for individual pages.I can see this option when I click on publish and configure.
But how to have same option in Tfs Build templates ?? I have searched for MSbuild arguments and didn't find anything related to that
The best thing for us was... change to Jenkins and use make.
But seriously -> you can watch what changes in csproj/sln. Then most of options in this file are switches in MsBuild.
Check:
http://www.kunal-chowdhury.com/2013/05/how-to-auto-deploy-after-build-in-tfs.html
http://www.asp.net/web-forms/overview/deployment/configuring-team-foundation-server-for-web-deployment/configuring-team-foundation-server-for-web-deployment
The settings for "Create a separate assembly for each page and control" is saved in the publish profile with following format:
<PrecompileBeforePublish>True</PrecompileBeforePublish>
<WDPMergeOption>CreateSeparateAssembly</WDPMergeOption>
So you can create a publish profile with this setting and specify the publish profile in TFS Build Definition.

Specify which Publish script to use on build?

How do I have SSDT run my publish script when I build my solution file?
If you:
1) Right click on your solution
2) Click Configration Properties
3) Click Configuration
I can see the database project and where it is checked to deploy on build, it does not let me specify what publish script to use.
As far as I know this isn't possible out of the box.
Why? They are two very different things.
Building (if you were to think of it as code) compiles and checks, producing artefacts. For .NET code those artefacts are DLL's/.exe etc. For .sqlproj it's the .dacpac etc that turn up in /sql/[Build Configuration Name].
Publishing is akin to Deploying if you were talking .NET code. Building won't include Publishing as an action.
Ironically, a Publish action also Builds the solution, so my suggestion would instead be to consider one of the following:
Publish the project (right click Publish, or double click your chosen .publish.xml file) whenever you want to build.
Use the Post-Build command line in the project Properties to call sqlpackage.exe to deploy your newly compiled .dacpac with your specified .publish.xml profile - but note that this will also impact your use of the Publish action from within Visual Studio as a Publish builds and then publishes (so you'd end up publishing twice).
Depending on your comfort levels/if you are a command-line fan, then use the command line (bash file? Powershell?) to call msbuild followed by sqlpackage.exe. Whenever you want to build, run your command in cmd.exe.
Similar to #3, add a menu item to the Tools menu that would do exactly the same thing (msbuild followed by sqlpackage deployment) but from within Visual Studio itself.
Look at a Continuous Integration model (TFS/TeamCity/Bamboo/Jenkins and about 3000-others), which could build and deploy for you automatically with every change - either on another server, or running locally (I put this in without knowing your scenario, so may be very much unsuitable to solve your problem).

How to specify specific projects in build settings for web deploy

I have created a new release build in TFS 2013 and I want to configure it to perform a web deploy. I am not sure how to specify which project to deploy. Ideally I want to web deploy 2 web projects to IIS on the server (both projects will have a corresponding website in IIS), but if it not possible I can live with having 2 separate builds. I have added the following setings to MSBuild Arguments (in Advanced section of the process) in build definition:
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:Configuration=Release
/p:CreatePackageOnPublish=True
/p:DeployIisAppPath="<IISSIteName>"
/p:MsDeployServiceUrl=https://<my server IP>/MsDeploy.axd
/p:AllowUntrustedCertificate=True
/p:username=Administrator
/p:password=xxxxx
I can see it is conneting fine, but it doesn't publish anything. I also tried to specify my web project in Items to build section, but that didn't help. What am I missing? Must be some setting.
If I have understood correctly, you have 2 web projects in the solution and you want to create build definition to deploy them as two different web sites on IIS server.
There could be better ways of handling this but what I have done in my project is to have two separate build definitions for 2 web projects.
For each build definition, specify the csporj file of the project to build under “items to build” section of the process tab.
Even after doing this TFS may not publish the web site at desired location. It may show success but files won’t be copied to the destination location.
In this case, check the log messages of the build activity. If you find a warning similar to this:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets (484, 9): warning: The OutputPath property is not set for project ProjectName.csproj'.
Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Release' Platform='Any CPU'
Then it may be related to build configuration. If you are using “Any CPU” as build configuration then change it to “AnyCPU” (remove space).
Refer following link for the detailed explanation:
http://social.msdn.microsoft.com/Forums/vstudio/en-US/0bb277ec-a08c-4795-88f0-3207654e2560/the-outputpath-property-is-not-set-for-project-xxxxxbtproj-please-check-to-make-sure-that-you?forum=tfsbuild
Amey

Use TFS build server but don't deploy

I have a build definition set up that successfully builds on each check-in and deploys to the cloud (Azure). However, I'd like to know how to modify it if I wanted it to build, but not actually deploy to Azure. Just build after the check-in, make sure nothing breaks, and that's it. I've tried searching around and modifying MSBuild arguments, but to no avail. This should be easy. What am I missing?
These are the MSBuild arguments I have plugged in. The last two (DeployOnBuild and CreatePackageOnPublish) don't seem to matter at all...not sure /t:Publish is making any difference either
/t:Publish
/p:TargetProfile=Cloud
/p:DeployOnBuild=false
/p:CreatePackageOnPublish=false
Thanks!
The key is to use the correct build process template:
Right click the build definition -> Edit Build definition
Process tab
Up at the top there is a section for the Build Process Template
Show Details
Select "DefaultTemplate" from the dropdown
The options available in the process tab will be different than the AzureContinuousDeployment template I was using. I didn't need any MSBuild arguments (though you might depending on how you named your service configs).
I had never noticed the template before. Most people probably just assumed I was already using the default one!

Updating CCNET Last Build Label from an assembly version

I Have managed to create a CI project that uses GIT as it's source control, and an MSBuild extension to label the assemblies based on the CCNet build label, and commit that changed label
I have other projects that are manually triggered to publish this version to particular sites etc.
I would like the project status in the dashboard to display the build label (eg 2.1.345.0) from the assembly, or from a built dll, so that we can easily see which revision was published at the last manual trigger.
There's plentyof info on updating assembly info for a build, but nothing on using a assemby ifnfo version for the displayed 'last build label'
Any Ideas anybody ? Do I need to create a task to manually update the state file ? that sounds a bit dodgy.
Thanks in advance
None of the built-in labellers does what you need, but you should probably be able to write your own custom labeller to that.
You can find two custom labellers with source code here and here to get you started.

Resources