Thursday, 5 December 2019
Building Code from Multiple Repos with YAML Pipelines
Tuesday, 22 May 2018
Securing Build Definitions When Multiple Teams Work on a Single Team Project
Securing a build definition is quite straight forward when an organization uses multiple team projects in VSTS/TFS to handle different applications they develop. Each team project build administration can be assigned to different individuals easily. There are organizations using a single team project to manage all of their applications, dividing them into teams inside a single team project. Let's look at possibilities of securing each application teams' builds in single team project for organization scenario.
Monday, 8 January 2018
Deploying Two Deployment Group Targets on Same Machine
Deployment groups are the recommended approach to use with VSTS for setting up release management based automated deployments. Can two team projects of same VSTS account with two deployment groups, have same machine as the target? Was a question in a forum and below steps describe how to achieve it.
Saturday, 16 July 2016
VSTS Release Task – Download Artifacts – Filter for Given Artifact Name(s)
This extension “Chamindac.vsts.release.task.download-artifacts” for VSTS and TFS 2015.2.1 upwards, can be used to filter for build artifacts by name, and download only required artifact(s), to the release agent machine. The requirement for this extension is explained in post “Multiple Build Artifacts–TFS 2015/VSTS Builds”. Source code for this extension is available in Github.
Extension “Chamindac.vsts.release.task.download-artifacts” can be downloaded/installed from VSTS Marketplace. To install to VS Team Services click on install, or download for on-premise TFS 2015 (TFS 2015.2.1 upwards supported).
Once installed, in release definition tasks a new task will be available under Utilities.
Always add this task as first task of the release environment and make sure the environment is set to skip artifact download.
The tasks comes with default filled values to behave as normal Download artifacts.
Build artifact names should be specified in ; separated syntax. Or it can be a single artifact name. Or * for all Artifacts.
Artifact destination is set default to behave as similar to, out of the box, build artifact download.
This task will filter the build artifacts with given names and download only the specified ones.
Multiple Build Artifacts–TFS 2015/VSTS Builds
It is possible to create multiple drops in a new TFS 2015 build or in VS Team Services build. This is useful when you want to do a single build but want to have separate drops(artifacts), for different deployment purposes.
One such example is
- Artifact Drop for deployment of a website
- Artifact Drop to contain test automation dlls, and required scripts to run test automations, after successful deployment.
In this situation the deployment happens in a web hosting server and the release agent used there is not going to run the test automations. The agent running test automations will be a separate agent, configured in test client(s), administering machine.
Example 2
- Drop to deploy web server
- Artifact Drop to deploy to a CRM server or to a Database Server
Same as above it could be two different release agents configured in two different machines, which does not need others build artifact.
But with the above requirement in mind, it is always advisable to build all components, in a single build to make sure the version is properly built and in sync.
Is it possible to have multiple build artifacts in a single build?
Yes. Let’s look at how we can do that. It can be done by, adding more publish or copy publish tasks to your build definition.
One drop can be in File Share while other can be in Server (Can have both in File Share or both in Server as well).
When a build is done with the above settings, two build artifacts get created for the build.
Next Challenge: Download the only required artifact to the relevant release agent.
With the out of the box functionality in TFS 2015.3 or with VS Team Services currently this is not possible. It does not allow to filter for a given artifact when downloading. Only option is skip download (no artifacts download) or download all artifacts.
When the above skip download is unchecked all artifacts get downloaded to agent. No filtering possible.
How to download only required artifact?
A new extension with capability to filter for named build artifacts and download only them is created. The code is available in here. The extension “Chamindac.vsts.release.task.download-artifacts” is available in VSTS Marketplace. Usage of extension is explained in this post “VSTS Release Task – Download Artifacts – Filter for Given Artifact Name(s)”
Popular Posts
-
As we discusssed in " Setup Redis Cluster with JSON and Search Modules on AKS with Binami Redis Using Custom Image " the cluster...
-
Let’s look at how we can specify the artifact version to download based on the resource CI build linked to the CD pipeline and check on how ...
-
The hosts file in /etc/hosts is allowing the WSL distros to map IP addresses to domain names before going to domain name servers, similar...
-
Can a Coded UI test executed with a Console Application? Yes it is possible. I am going to explain how it can be done. I am going to exec...
-
Pull Request are the controlled way to bring in the changes to your stable branches in your Azure Git repos, or for that matter all Git prov...