<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>aseemb's blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/aseemb/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/aseemb/feed.xml</link>
    <description />
    <lastBuildDate>Wed, 27 Feb 2019 08:15:44 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>How can I view the release history records programmatically?</title>
      <link>https://docs.microsoft.com/archive/blogs/aseemb/how-can-i-view-the-release-history-records-programmatically</link>
      <pubDate>Wed, 27 Feb 2019 08:14:15 GMT</pubDate>
      <dc:creator><![CDATA[Aseem Bansal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aseemb/?p=2795</guid>
      <description><![CDATA[One of the user asked how he can access the comment that he entered while starting the environment...]]></description>
      <content:encoded><![CDATA[One of the user asked how he can access the comment that he entered while starting the environment programmatically. These comment can be seen in the history records of the Release UI as shown below. 

<a href="https://msdnshared.blob.core.windows.net/media/2019/02/history1.png"><img src="https://msdnshared.blob.core.windows.net/media/2019/02/history1.png" alt="" width="1767" height="476" class="aligncenter size-full wp-image-2815" /></a>

But to access them via APIs, we have not documented our release revision APIs publicly but will do so shortly. Till then you can use the below API to get the same history records.

<code>
https://vsrm.dev.azure.com/{organization}/{project}/_apis/release/releases/{releaseId}/history?api-version=5.0-preview
</code>

For the above release image, the equivalent request/response are: - 

<strong>Request </strong>
<code>
  https://vsrm.dev.azure.com/mseng/AzureDevops/_apis/release/releases/8409800/history?api-version=5.0-preview 
</code>  
<strong>Response</strong>
<code>
{
  "count": 8,
  "value": [
    {
      "releaseId": 8409800,
      "changedDate": "2019-02-26T23:13:22.893Z",
      "changeType": "Start",
      "changeDetails": "Started 'TFS - Prod Config Change 8726'",
      "comment": "Set up tfs-uks-1 for AX Everywhere &amp; shadow testing"
    },
    {
      "releaseId": 8409800,
      "changedDate": "2019-02-26T23:13:27.027Z",
      "changeType": "Deploy",
      "changeDetails": "Queued deployment on 'Single ScaleUnit'",
      "comment": ""
    },
    {
      "releaseId": 8409800,
      "changedDate": "2019-02-26T23:13:27.577Z",
      "changeType": "Deploy",
      "changeDetails": "Triggered deployment on 'Single ScaleUnit'"
    },
    {
      "releaseId": 8409800,
      "changedDate": "2019-02-26T23:48:06.163Z",
      "changeType": "Approve",
      "changeDetails": "Approved pre-deployment approval on 'Single ScaleUnit'",
      "comment": ""
    },
    {
      "releaseId": 8409800,
      "changedDate": "2019-02-26T23:55:55.393Z",
      "changeType": "Deploy",
      "changeDetails": "Succeeded deployment on 'Single ScaleUnit'"
    },
    {
      "releaseId": 8409800,
      "definitionSnapshotRevision": 1,
      "changedDate": "2019-02-26T23:11:21.67Z",
      "changeType": "Create",
      "changeDetails": "Created 'Draft-8510'"
    },
    {
      "releaseId": 8409800,
      "definitionSnapshotRevision": 2,
      "changedDate": "2019-02-26T23:11:50.72Z",
      "changeType": "Update",
      "changeDetails": "Updated 'Draft-8510'"
    },
    {
      "releaseId": 8409800,
      "definitionSnapshotRevision": 3,
      "changedDate": "2019-02-26T23:13:22.72Z",
      "changeType": "Update",
      "changeDetails": "Updated 'Draft-8510'"
    }
  ]
}
</code> 

Enjoy !!]]></content:encoded>
    </item>
    <item>
      <title>Manage release permissions</title>
      <link>https://docs.microsoft.com/archive/blogs/aseemb/manage-release-permissions</link>
      <pubDate>Mon, 07 Jan 2019 10:30:13 GMT</pubDate>
      <dc:creator><![CDATA[Aseem Bansal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aseemb/?p=2745</guid>
      <description><![CDATA[Last week one of the customer reported that they are not able to manage the folder permissions of...]]></description>
      <content:encoded><![CDATA[Last week one of the customer reported that they are not able to manage the folder permissions of release definitions because they denied permissions to manage permissions and due to which the UI to manage security is not showing up even for project collection administrators. We fixed the UI bug in our latest code so that it always show up the security dialogue and <strong>Nishu Bansal </strong>wrote a powershell script which uses the security rest APIs to manage the security. I am pasting the script for you so that you can learn how to programmatically manage RM security.
<div><span>
<em>$accountName = "&lt;myaccount&gt;"</em>
<em>$projectName = "myproject"</em>
<em>$personalAccessToken = "&lt;my token&gt;"</em>
<em>$user = "aseemb"</em>
<em>$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user,$personalAccessToken)))</em></span></div>
<div><em>function getProjectId() {
$projects=((Invoke-RestMethod -Method Get -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -ContentType "application/json" -Uri https://$accountName.visualstudio.com/_apis/projects?api-version=4.1).value | Select-Object id, name)
$projects | % {
if ($_.name -ieq $projectName) {
return $_.id
}
}
}</em></div>
<div><em>function getACEObject([string] $descriptor,[int] $allow, [int] $deny) {
$aceObject = New-Object PSObject
$aceObject | Add-Member -type  NoteProperty -name descriptor -Value $descriptor
$aceObject | Add-Member -type  NoteProperty -name allow -Value $allow
$aceObject | Add-Member -type  NoteProperty -name deny -Value $deny
return $aceObject
}</em></div>
<div><em>
function Set-ACE([string] $folderPath) {
$projectId=getProjectId
$token=("{0}/{1}" -f $projectId, $folderPath)
$result=((Invoke-RestMethod -Method Get -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -ContentType "application/json" -Uri "https://$accountName.vsrm.visualstudio.com/_apis/AccessControlLists/c788c23e-1b46-4162-8f5e-d7585343b5de?token=$token&amp;api-version=4.1&amp;includeExtendedInfo=true").value)
$ace=($result | Select-Object acesDictionary).acesDictionary

Write-Output ("Existing ACLs")
foreach($info in $ace.PSObject.Properties) {
$aceObject = getACEObject -descriptor $info.Value.descriptor -allow $info.Value.allow -deny $info.Value.deny
Write-Output ($aceObject)
}
$aces = @()
foreach($info in $ace.PSObject.Properties) {
$descriptor=$info.Value.descriptor
#             if ($descriptor -match '-0-0-0-0-1') {
#$allowValue = $info.Value.allow -bor 512 # Enabling Allow bit for Release Administer permissions
$allowValue = $info.Value.allow
$denyValue = ($info.Value.deny -band (-bnot (1 -shl 9)))  #  Disabling Deny bit for Release Administer permissions
$aceObject = getACEObject -descriptor $descriptor -allow $allowValue -deny $denyValue
Write-Output ("Setting new ACE")
Write-Output ($aceObject)
$aces += $aceObject
#             }
}

if ($aces.count -gt 0 ) {
Write-Output ("Setting new ACLs")
Write-Output ($token)
$aclObject = New-Object PSObject
$aclObject | Add-Member -type  NoteProperty -name accessControlEntries -Value $aces
$aclObject | Add-Member -type  NoteProperty -name merge -Value false
$aclObject | Add-Member -type  NoteProperty -name token -Value $token

$request = $aclObject | ConvertTo-Json
$result=((Invoke-RestMethod -Method POST -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -ContentType "application/json" -Uri "https://dev.azure.com/$accountname/_apis/accesscontrolentries/c788c23e-1b46-4162-8f5e-d7585343b5de?api-version=5.0-preview.1" -Body $request).value)
Write-Output ("Output")
Write-Output ($result | ConvertTo-Json)
}
}</em></div>
<div><span><em>Set-ACE -folderPath "/"</em>
</span></div>
<div></div>
<div>Enjoy !!</div>]]></content:encoded>
    </item>
    <item>
      <title>Release pipeline review of an internal team</title>
      <link>https://docs.microsoft.com/archive/blogs/aseemb/release-pipeline-review-of-an-internal-team</link>
      <pubDate>Tue, 11 Dec 2018 09:37:34 GMT</pubDate>
      <dc:creator><![CDATA[Aseem Bansal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aseemb/?p=2715</guid>
      <description><![CDATA[Couple of months back, one of my colleague in IDC mentioned that his team faces frequent issues in...]]></description>
      <content:encoded><![CDATA[Couple of months back, one of my colleague in IDC mentioned that his team faces frequent issues in their release pipeline &amp; asked about known issues. Since there were no known issues, we scheduled a review where his team talked about the issues that they were facing and Divyansh from my team &amp; me gave recommendations on how to come out of it. In this post, I am pasting the list of issues with their recommendations so that you can also benefit from it.
<table>
<tbody>
<tr>
<td width="311">Issue</td>
<td width="311">Recommendation</td>
</tr>
<tr>
<td width="311">At times Azure Devops build agents fail to initialize and it happens primarily because of unavailability of disk space on agent.</td>
<td width="311">Enable <a href="https://www.codewrecks.com/blog/index.php/2017/05/06/maintenance-for-build-agent-in-tfs-build/">maintenance jobs</a> to cleanup the agents periodically.

&nbsp;

&nbsp;</td>
</tr>
<tr>
<td width="311">In release pipeline, we use manual steps for process reasons. These steps take lot of time during deployment.</td>
<td width="311">Use <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/manual-intervention?view=vsts">manual intervention task</a> in agentless phase in release pipeline</td>
</tr>
<tr>
<td width="311">If during deployment a step fails for whatever reason, we need to start all over again starting from build generation.</td>
<td width="311">Fix the <a href="https://docs.microsoft.com/en-us/azure/devops/pipelines/release/?view=vsts#numbering">release name pattern</a> so that release names can be different for same builds.</td>
</tr>
<tr>
<td width="311">Many times especially during weekends DFS store is not available for build</td>
<td width="311">The internal team was using on-prem storage to store the Build output, and this had lower availability, especially over the weekend, thus making the build system less reliable.

&nbsp;

The recommendation was to use cloud storage to store their build, and expose that as an <a href="https://apac01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FMicrosoft%2Fvsts-rm-extensions%2Fblob%2Fmaster%2Fdocs%2Fauthoring%2Fartifactextension.md&amp;data=02%7C01%7C%7Cc1ef88291226424dab5108d635ab07a6%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636755406003927229&amp;sdata=yhCOiDLYICdJX49WNkuOycyt5lLIvvku%2F7naygbsyQs%3D&amp;reserved=0">custom artifact</a> for RM.</td>
</tr>
<tr>
<td width="311">Enlistment initialization takes lots of time(&gt;30mins)</td>
<td width="311">The internal team decided to split the gigantic build package into smaller ones, only one of which was required by them.</td>
</tr>
<tr>
<td width="311">Package management</td>
<td width="311">The internal team abandoned their homegrown packaging system in favor of <a href="https://azure.microsoft.com/en-us/services/devops/artifacts/">Azure Devops Package Management</a>, which was far more reliable.</td>
</tr>
<tr>
<td width="311">Internal build is not so quick or reliable</td>
<td width="311">The internal team decided to abandon their homegrown build system in favor of Azure Devops Build pipelines.</td>
</tr>
</tbody>
</table>
Enjoy !!]]></content:encoded>
    </item>
    <item>
      <title>New releases hub - Common questions</title>
      <link>https://docs.microsoft.com/archive/blogs/aseemb/new-releases-hub</link>
      <pubDate>Tue, 11 Dec 2018 08:57:38 GMT</pubDate>
      <dc:creator><![CDATA[Aseem Bansal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aseemb/?p=2665</guid>
      <description><![CDATA[We recently made the new releases hub the default hub on Azure Devops and here are the common...]]></description>
      <content:encoded><![CDATA[We recently made the new releases hub the default hub on Azure Devops and here are the common questions that customers have asked.

<strong>1. Where can I find deleted releases hub?</strong>

<a href="https://msdnshared.blob.core.windows.net/media/2018/12/DeletedReleases.png"><img width="1275" height="519" class="aligncenter size-full wp-image-2675" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/12/DeletedReleases.png" /></a>

<strong>2. Where is the overview tab ?</strong>

It is replaced with "Currently deployed" option on the releases page.

<a href="https://msdnshared.blob.core.windows.net/media/2018/12/currentlyDeployed1.png"><img width="1366" height="461" class="aligncenter size-full wp-image-2695" alt="" src="https://msdnshared.blob.core.windows.net/media/2018/12/currentlyDeployed1.png" /></a>

<strong>3. Earlier I used to see all releases that happened yesterday by clicking on "All Release Pipelines". What should I do now?</strong>

We dont have this feature but we have started working on it and it should be available on Azure Devops in next couple of months.

<strong>4. Earlier I used to view the overview of all definitions by clicking on "All Release Pipelines". What should I do now?</strong>

We dont have this feature but have added it to our backlog and should be able to get to it soon.

In case you have any feedback which is not captured above, please feel free to leave comments.]]></content:encoded>
    </item>
    <item>
      <title>Liveness in Release Management UI</title>
      <link>https://docs.microsoft.com/archive/blogs/aseemb/liveness-in-release-management-ui</link>
      <pubDate>Thu, 27 Sep 2018 14:37:19 GMT</pubDate>
      <dc:creator><![CDATA[Aseem Bansal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aseemb/?p=2655</guid>
      <description><![CDATA[Over last few weeks, we had some Azure Devops (formerly VSTS) customers who reported that the...]]></description>
      <content:encoded><![CDATA[Over last few weeks, we had some Azure Devops (formerly VSTS) customers who reported that the liveness in release management UI does not always work well. They mentioned that there are few times when the UI show stale status and they have to manually refresh to view the latest status. In this post, I want to share a simple way of how you can get away with this problem.

We have recently made Azure Devops accounts accessible via following URL (more details <a href="https://docs.microsoft.com/en-us/azure/devops/user-guide/what-happened-vsts?view=vsts">here</a>). 

<code>https://dev.azure.com/{your organization}/{your project}</code>. 

If you use this URL to access your releases, then the live updates will always work well for you. 

Enjoy !!]]></content:encoded>
    </item>
    <item>
      <title>Are you not receiving release notifications for a group?</title>
      <link>https://docs.microsoft.com/archive/blogs/aseemb/are-you-not-receiving-release-notifications-for-your-group</link>
      <pubDate>Mon, 16 Jul 2018 10:48:18 GMT</pubDate>
      <dc:creator><![CDATA[Aseem Bansal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aseemb/?p=2615</guid>
      <description><![CDATA[Today a customer reported that VSTS is not sending approval pending email if the approver is a VSTS...]]></description>
      <content:encoded><![CDATA[Today a customer reported that VSTS is not sending approval pending email if the approver is a VSTS group. Customer also mentioned that the approval email is sent if the approver is an individual user. 

I was able to reproduce the problem on my test account and here are the steps that I did to come out of it.  

1. Saw the account level notification admin settings and observed that the default delivery option for all groups is set to "Do not deliver". 

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/defaultDeliveryOptions.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/07/defaultDeliveryOptions.png" alt="" width="1248" height="362" class="aligncenter size-full wp-image-2625" /></a>

2. Saw the notification admin settings for my test group and observed that the default delivery option is set to "Do not deliver". 

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/GroupDeliveryOptions.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/07/GroupDeliveryOptions.png" alt="" width="1843" height="969" class="aligncenter size-full wp-image-2635" /></a>

3. Changed the default setting for my test group to "Deliver to individual member" and it worked. 

Enjoy !!

]]></content:encoded>
    </item>
    <item>
      <title>Work items between 2 releases</title>
      <link>https://docs.microsoft.com/archive/blogs/aseemb/work-items-between-2-releases</link>
      <pubDate>Wed, 11 Jul 2018 07:22:54 GMT</pubDate>
      <dc:creator><![CDATA[Aseem Bansal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aseemb/?p=2585</guid>
      <description><![CDATA[In Release Management UI, we show a nice list of work items that are getting deployed as part of a...]]></description>
      <content:encoded><![CDATA[In Release Management UI, we show a nice list of work items that are getting deployed as part of a deployment on an environment. In this post, I will talk about how you can get the equivalent list of work items programmatically. 

Let us take an example where I have a release (with name RM_M136.9 ) that I want to deploy on my environment (with name R2_WEU1). For this release, here are the work items that you see in the UI. 

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/WorkItemsBetween2Releases.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/07/WorkItemsBetween2Releases.png" alt="" width="1857" height="888" class="aligncenter size-full wp-image-2595" /></a>

Before we try to find out the same list using RM APIs, let us get the releaseId for release RM_M136.9 and environmentId for environment R2_WEU1. 

- To get the release id, open the release and take the releaseId from the URL https://mseng.visualstudio.com/VSOnline/_releaseProgress?releaseId=<strong>4630482</strong>&amp;_a=release-pipeline-progress”. 
- To get the environment id, open the release definition, click on the environment and take the environmentId from the URL. https://mseng.visualstudio.com/VSOnline/_releaseDefinition?definitionId=17&amp;_a=definition-tasks&amp;environmentId=<strong>2461</strong>.

Now that we have both these Ids, let us use RM APIs to get the same work item list. 

1. First of all, get the last deployed release on an environment. To do that, you can do that using this rest API and the response will contain the last deployed releaseId. 

  <code> https://myaccountName.vsrm.visualstudio.com/myProjectName/_apis/Release/deployments?definitionId=mydefinitionId&amp;definitionEnvironmentId=myDefinitionEnvironmentId&amp;deploymentStatus=30&amp;operationStatus=7960&amp;$top=1</code>

   Example: - The response had releaseId <strong>4580686</strong> when following call was made.

<code>   https://mseng.vsrm.visualstudio.com/VSOnline/_apis/Release/deployments?definitionId=17&amp;definitionEnvironmentId=532&amp;deploymentStatus=30&amp;operationStatus=7960&amp;$top=1
</code>
2. Now get the work items between the release that you are about to deploy and the above found base release. To do that, use the following rest API which will return you the list of work items. 
<code>
   https://myaccountName.vsrm.visualstudio.com/myProjectName/_apis/Release/releases/myReleaseId/workitems?baseReleaseId=myBaseReleaseId&amp;$top=250
</code>
   Example: - The response had following workItem Ids when this call was made.

<code>
 Request:  
      https://mseng.vsrm.visualstudio.com/VSOnline/_apis/Release/releases/4630482/workitems?baseReleaseId=4580686&amp;$top=250
 Response:
 {
  "count": 47,
  "value": [
    {
      "id": "1298228",
      "url": "https://mseng.visualstudio.com/_apis/wit/workItems/1298228"
    },
    {
      "id": "1292030",
      "url": "https://mseng.visualstudio.com/_apis/wit/workItems/1292030"
    },

   ….
  ]
}
</code>
Please try this out and do let us know in case it does not work for you. 

Enjoy !!]]></content:encoded>
    </item>
    <item>
      <title>How to create a new kubernetes service endpoint for AKS?</title>
      <link>https://docs.microsoft.com/archive/blogs/aseemb/how-to-create-a-new-kubernetes-service-endpoint-for-aks</link>
      <pubDate>Tue, 03 Jul 2018 09:04:03 GMT</pubDate>
      <dc:creator><![CDATA[Aseem Bansal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aseemb/?p=2505</guid>
      <description><![CDATA[In this post, I will talk about the steps that you should perform to create the kubernetes endpoint...]]></description>
      <content:encoded><![CDATA[In this post, I will talk about the steps that you should perform to create the kubernetes endpoint for an existing <a href="https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough-portal">AKS cluster</a>.

1. Go to the endpoints UI -&gt; New Service endpoint -&gt; Kubernetes.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/newEndpoint.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/07/newEndpoint.png" alt="" width="806" height="411" class="aligncenter size-full wp-image-2515" /></a>

2. This dialog should open where you need to fill the cluster URL, KubeConfig file etc. 

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/emptyKubDialog.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/07/emptyKubDialog.png" alt="" width="595" height="480" class="aligncenter size-full wp-image-2525" /></a>

3. Since the cluster is in AKS, you can use the azure CLI to get the KubeConfig file and since KubeConfig file contains the URL to cluster as well, we will also get that. 

4. Use get-credentials command in az cli to get the KubeConfig file. The exact syntax is as follows: - 

<em>az aks get-credentials --resource-group  --name </em>

  The above command will output the path to KubeConfig file as shown below.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/outputOfCredentialCommand.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/07/outputOfCredentialCommand.png" alt="" width="719" height="53" class="aligncenter size-full wp-image-2535" /></a>

3. Open the KubeConfig file from this path and get the cluster URL. 

 <a href="https://msdnshared.blob.core.windows.net/media/2018/07/clusterUrl.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/07/clusterUrl.png" alt="" width="600" height="133" class="aligncenter size-full wp-image-2545" /></a>

4. Copy paste the complete content of the KubeConfig file in the KubeConfig file parameter in the endpoint UI.

5. Enable "Accept Untrusted Certificates", verify connection and press OK. The dialog should look similar to this.

<a href="https://msdnshared.blob.core.windows.net/media/2018/07/filledEndpoint.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/07/filledEndpoint.png" alt="" width="594" height="477" class="aligncenter size-full wp-image-2555" /></a>

Enjoy !!


]]></content:encoded>
    </item>
    <item>
      <title>Ability to sign the service bus message in task</title>
      <link>https://docs.microsoft.com/archive/blogs/aseemb/task-enhancement-ability-to-sign-the-service-bus-message</link>
      <pubDate>Wed, 27 Jun 2018 13:57:39 GMT</pubDate>
      <dc:creator><![CDATA[Aseem Bansal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aseemb/?p=2445</guid>
      <description><![CDATA[Recently we (Rohit Batra) added capability to sign the service bus message in "Publish to azure...]]></description>
      <content:encoded><![CDATA[Recently we (<strong>Rohit Batra</strong>) added capability to sign the service bus message in "<a href="https://github.com/Microsoft/vsts-tasks/tree/master/Tasks/PublishToAzureServiceBus">Publish to azure service bus</a>" task. In this post, we will walk-through how you can use it in your release/build workflows.

1. Get the pfx certificate that you want to use for signing. In case you want to try out, you can create a self-signed certificate using this code.

<code>
# create a new certificate
New-SelfSignedCertificate -certstorelocation cert:\localmachine\my -dnsname mydomain.fqdn -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider"

# export the above as a pfx file
$pwd = ConvertTo-SecureString -String "mypassword" -Force -AsPlainText
Export-PfxCertificate -cert cert:\localMachine\my\ -FilePath c:\temp\mycert.pfx -Password $pwd 
</code>

2. If you want to use azure key-vault to manage this, you can import the certificate to key-vault as shown below and then link the key-vault backed variable group to your definition environment as mentioned <a href="https://docs.microsoft.com/en-us/vsts/pipelines/library/variable-groups?view=vsts#link-secrets-from-an-azure-key-vault-as-variables">here</a>.

<a href="https://msdnshared.blob.core.windows.net/media/2018/06/keyvault-import.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/06/keyvault-import.png" alt="" width="857" height="469" class="aligncenter size-full wp-image-2455" /></a>

3. But if you dont want to use key-vault, then convert the above pfx certificate to a string using this code.

<code>
$pfxcert = New-Object System.Security.Cryptography.X509certificates.X509certificate2("C:\temp\mycert.pfx", "mypassword", [System.Security.Cryptography.X509Certificates.X509KeyStorageFlags]::Exportable);
$certBytes = $pfxcert.Export([System.Security.Cryptography.X509certificates.X509ContentType]::Pkcs12);
$certString = [Convert]::ToBase64String($certBytes);
Write-Output $certString 
</code>

4. Define a new secret variable with value as the above string in your definition environment.

<a href="https://msdnshared.blob.core.windows.net/media/2018/06/myCertVariable.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/06/myCertVariable.png" alt="" width="785" height="286" class="aligncenter size-full wp-image-2465" /></a>

5. Use the above secret variable in the signing properties.

<a href="https://msdnshared.blob.core.windows.net/media/2018/06/signing.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/06/signing.png" alt="" width="754" height="434" class="aligncenter size-full wp-image-2475" /></a>

6. Run a release and you will see the payload is signed. 

<a href="https://msdnshared.blob.core.windows.net/media/2018/06/serviceBusExplorer.png"><img src="https://msdnshared.blob.core.windows.net/media/2018/06/serviceBusExplorer.png" alt="" width="1307" height="816" class="aligncenter size-full wp-image-2485" /></a>


Enjoy !!
]]></content:encoded>
    </item>
    <item>
      <title>Approve a deployment for a pre-configured time</title>
      <link>https://docs.microsoft.com/archive/blogs/aseemb/approve-a-deployment-for-a-pre-configured-time</link>
      <pubDate>Mon, 22 Jan 2018 05:05:40 GMT</pubDate>
      <dc:creator><![CDATA[Aseem Bansal [MSFT]]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/aseemb/?p=2386</guid>
      <description><![CDATA[Recently one of the customer asked whether release management offers a way by which they can approve...]]></description>
      <content:encoded><![CDATA[Recently one of the customer asked whether release management offers a way by which they can approve a deployment for a pre-configured time. This means that customer should be able to approve the deployment now but should be able to specify the time at which deployment should start. 

We have a feature called "deferred approval" for exactly the same problem and a lot of customers (including me in our dogfooding) use that pretty often. This feature enables you to specify the time (along with the time-zone) at which the deployment should start while you are approving a deployment.  See the below image for more details. 

<a href="https://msdnshared.blob.core.windows.net/media/2018/01/deferredDeployment.jpg"><img src="https://msdnshared.blob.core.windows.net/media/2018/01/deferredDeployment.jpg" alt="" width="868" height="392" class="alignnone size-full wp-image-2395" /></a>

Enjoy !!
]]></content:encoded>
    </item>
  </channel>
</rss>