We are using TFS RM 2015 Update 4.
Build Retention policy is working for most of builds. But, it is ignoring some builds. Existing documentation has only basic info, do you have more detailed rules for build retention policy
Please check if you have set the Release retention policy which conflicts/interact with the Build retention policy.
Interaction between build and release retention
The build linked to a release has its own retention policy, which may
be shorter than that of the release. If you want to retain the build
for the same period as the release, set the Retain build checkbox
for the appropriate environments. This overrides the retention policy
for the build, and ensures that the artifacts are available if you
need to redeploy that release.
Please see Build and release retention policies for details.
Related
When creating a release of a build, the release contains all of the variables as they were set up in the system when the build was made, this includes global variables like deployment credentials (users and passwords).
A deployment for a release of a build made a week ago that's now being promoted to production is failing because the deployment credentials have been changed since last week. When rolling back the deployment this also fails for the same reason, the credentials are not up-to-date.
Is there a way to update the variables of a build or have variables that should be used only for deployment projects?
you can define variables at Deployment project level, not plan
We've recently downloaded and are hosting an on-premises Visual Studio Team Services build agent for our source code and have noticed that it's doing an extra step in the build process compared to our hosted agent. This extra step is the 'Post Job Cleanup' as seen below:
When setting up this agent locally there was no options for setting this, and looking at our build steps this extra job isn't listed there:
I've checked online guides but there's been no hint as to where this extra step is coming from. Does anyone know where the option is to include/exclude this for builds is?
Setting process.clean to false in the variables of the release pipeline stops the "finalize job" step from killing all processes.
Setting variables in the release pipeline
https://developercommunity.visualstudio.com/solutions/498153/view.html
Gradle Daemon being killed in "Finalize Job" step
They are the built-in steps and there isn’t the way to remove them (Get source, Post Job Cleanup) in VSTS, you don’t need to worry it, it won’t affect your project or build.
Is there a native Spinnaker way to cleanup old AMIs after a successful deployment took place?
It's nice that the previous version of the newest deployment is available in AWS but the previous ones keep adding-up and thus incur not only cost but also confusion.
Thanks.
Nothing native in Spinnaker. Janitor Monkey will do this, however, and cleans up a bunch of other unused AWS artifacts.
It's very possible Spinnaker will support this natively in the future - just not right now.
I'm doing a proof of concept on continuous integration and whether our development team will benefit from automated builds and automated deployments to reduce human error.
I've already come quite far in the process but have some questions on how to configure our incremental builds to avoid rebuilding of dependencies that had no code changes.
In addition I’d like our deployment tool to identify and deploy only assemblies rebuilt as a result of a code change.
We already use Microsoft products like TFS for source control, Visual Studio for development and Team Foundation Build for continuous integration builds. We’re currently leaning toward InRelease for deployment as it seem to integrate well with Team Foundation Build.
But first, here is our current setup...
There are 200+ C# solution files, each containing one or more projects. It is not practical in the environment to combine these projects into less solutions, i.e. by design. Projects within a solution uses project references to resolve dependencies and file references to projects in other solutions. As far as I know, this is the recommended approach by Microsoft when dealing with a large amount of projects.
We use a "branch by feature" strategy e.g. isolated development on concurrent features branches which is merged up to a stable Main branch when complete. When it's time for a release, a release is branched from main and isolated for hotfixes and deployment. The feature branches and main branch have a CI build triggered by code check-ins. Releases will mostly like be manually executed from InRelease against a selected release branch. A release will be deployed through various environments including INTEGRATION/TEST, UAT and ultimately to all our clients. We're still fleshing out the details of branching strategy, but that's a question for another time.
The current problems to solve:
1. Avoid rebuilding of dependencies that have no code changes...
When we deploy new functionality or a patch to a client, we want to push the absolute minimum in files. Our company has a very large customer base (thousands of customers) with sometimes slow internet connections, so doing a full deployment of all assemblies (200+) to every customer is not an option. I've partially solved the problem by setting up incremental builds which correctly rebuilds only changed projects as expected but also rebuilds all the dependent projects even though NO CODE CHANGES were made to them. This results in both the changed assemblies and dependencies having new timestamps. If we use the change of timestamp to identify which assemblies to deploy, then this would result in deployment of functionally unchanged assemblies. The goal here is to deploy only assemblies where the code has changed and assemblies where breaking changes occur.
For example:
Solution B, has a project called Project B
Solution A, has a project called Project A
Project B -> Project A (where Project A has a file dependency on Project B)
When a non-breaking change is made in Project A, say to the interior of a method, then the expected result is: only A is built and therefore a candidate for deployment.
When a breaking change is made in Project A then that will break Project B, the expected result is: Both A and B is built and therefore a candidate for deployment.
Currently MSBuild rebuilds all dependents regardless, which is not what we want.
2. Automatically identify which assemblies should be deployed...
I have a partial solution to the problem.
When a build is performed, my build process template is configured to run a MSBuild script containing a list of solutions to build in a particular order.
This operation is performed in the build agent’s workspace. Every time a new build is performed the build process template creates an unique drop folder in the format and copies the binaries from the build agent workspace to the drop folder. This is out of the box functionality taken care of by the standard build process template. The build has been configured not to clear the build agent workspace, so the first time it runs it will build all projects within a solution but subsequent builds will only build projects that have code changes or is dependent on other projects (incremental build?). Therefore unchanged assemblies will have the original time stamps and changed assemblies will have new timestamps.
We have a tool that can do folder comparisons between drop folders and output the results to a txt file. This allows us to identify which binaries have been added/changed/removed since the last deployment. It also gives us the added benefit of comparing the list of actual artefacts to a manifest of expected artefacts as defined by the developer. This will ensure that no assemblies get deployed that has not been specified and proven to be unit tested.
The question is how can be we leverage InRelease to deploy only the required files as per the example above and not all files in the drop folder?
Install a TFS Proxy in before your build machine, this reduce the net traffic
You will start with a branch strategy like Service Pack, you can read a documentation about in ALM Rangers guidance... And adapt you process template to build just the part of code changed. I think in BRD Lite, another guidance by ALM Rangers, you will found more information.
I've been building my C# project from the MS Visual Studio IDE, and by invoking msbuild from Jenkins on Windows. Now I want to build the C# project on Atlassian OnDemand.
However, msbuild is not listed as a builder option in OnDemand and I can't find any documentation on how to build a C# project on OnDemand.
Update
Atlassian OnDemand Bamboo features a Windows stock image as of mid July 2012, see Azwandi Mohd Aris' comment:
Just an update that Bamboo OnDemand now ships with a Windows-based AMI - see release notes at https://confluence.atlassian.com/display/AOD/July+2012#July2012-Bambooupgrade
This image meanwhile also supports MSBuild as per James Dumay's answer from early November 2012.
Initial Answer
The configuration of builders is one of the Restricted Functions in Atlassian OnDemand for Bamboo:
Bamboo OnDemand only runs builds using elastic agents. Hence,
capabilities can only be configured by using a custom image.
So in principle you would need to either use one of the default Stock images provided by Atlassian or Create a custom elastic image of our own. While Atlassian provides a Windows stock image as of Bamboo 3.4, the version of Bamboo for OnDemand is most annoyingly still stuck at 3.0 (see Atlassian OnDemand Application Versions), with the long overdue update including DVCS support recently postponed again (see Lingbo Lu's comment: We are hoping that we can deliver it in July/August timeframe)
So for the time being I'm afraid you'll need to apply the Bamboo 3.0 version of Creating a Custom Elastic Image and create an appropriate custom image for the task at hand yourself.
Update
There are a couple of related threads on Atlassian Answers as well:
James Dumay's answer to How do I run .NET builds on JIRA Studio summarizes the state of affairs and recommends Grace Mollison's instructions for Setting up a windows AMI for use with Elastic Bamboo in turn. However, RodH's comment regarding How can I run Bamboo OnDemand with MSBuild? indicates unspecified issues with this approach/solution.
So be prepared for a rough ride eventually.