Cancelling all InProgress/Queued environment between two days

Recently one of our internal customer ‘OneDrive’ reported as they have many InProgress/Queued environments. And they wanted to cancel all such environments and asked us to help. So I have written a program which would take account url, project name, definition id, NumberOfDaysBefore and NumberOfDaysAfter and Cancel the environment. How to do:- GetReleases2Async() takes parameter…

0

Compute changeset difference between two releases using API’s

Below are the steps which can be followed to compute changeset difference between two releases for TFVC project  =========================================================================================== Step1: Get details of the primary build artifact for the current release  using build API. Store ‘sourceVersion’ say as ‘currentReleaseBuildVersion’ https://{account}.visualstudio.com/{project}/_apis/build/builds/{buildId} e.g. https://testking123.visualstudio.com/3a607d2a-d6c9-4274-9d13-d83c544d5063/_apis/build/builds/2348 Step2: Get details of the primary build artifact for the older release. Store ‘sourceVersion’ say as ‘baseReleaseBuildVersion’…

0

Utilities methods to use ReleaseManagement REST API’s

Refer post https://blogs.msdn.microsoft.com/chandananjani/2016/04/27/using-releasehttpclient-for-interacting-with-releasemanagement-service/ to know as which nuget package is required to be installed. How to add secret variable in release definition? public static ReleaseDefinition AddSecretVariableInReleaseDefinition(ReleaseHttpClient rmClient, string projectName, ReleaseDefinition definition) { var secretVariableKey = “secretVariableKey”; var secretVariableValue = new ConfigurationVariableValue { Value = “secretVariableValue”, IsSecret = true }; definition.Variables.Add(secretVariableKey, secretVariableValue); var updatedDefinition = rmClient.UpdateReleaseDefinitionAsync(definition, projectName).Result;…

0