Skip to content

Conversation

@matiasroldan6
Copy link

@matiasroldan6 matiasroldan6 commented May 15, 2019

Based off PR #97 so it must be merged with it

Description

Changes in the project and code to get them running on a Linux pipeline in Azure DevOps

Changes

  • Several instances of changing backslashes by forward slashes
  • Capitalization disparities fixed

Details

We got a pipeline deploying a TestBot to Linux running in Azure DevOps.
image

For this, we took as a starting base the TestBot pipeline Nightly-Build-Test which is deploying a bot on Windows, but made some modifications to get it running under Linux.

Changes done to the pipeline

New tasks:
• We had to remove the Visual Studio Build solution step because It wasn't compatible with the Linux platform and replace it by the MSBuild Build solution step. Due to this change, we had to…
• Replace both the Use NuGet 4.9.1 and the NuGet restore by a dotnet restore step.
• We added a PowerShell step to add the section RuntimeIdentifiers to three projects that required it

Existing tasks:
• We had to change the zip filename in the az webapp deployment command at the Create Resources step, leaving the line as:

az webapp deployment source config-zip --resource-group "$(BotGroup)" --name "$(BotName)" --src "$(System.DefaultWorkingDirectory)/tests/Microsoft.Bot.Builder.TestBot/PublishedBot/Microsoft.Bot.Builder.TestBot.zip"

• We had to change the PowerShell script that was running on the task Get Bot Keys to the following:

$json = Get-Content '$(System.DefaultWorkingDirectory)/DirectLineCreate.json' | Out-String | ConvertFrom-Json
 
$key = $json.properties.properties.sites.key
 
echo "##vso[task.setvariable variable=DIRECTLINE;]$key"
echo "##vso[task.setvariable variable=BOTID;]$(BotName)"

Changes done to the code

• We had to change backslashes hardcoded in several parts of the code since they need to be forward slashes in Unix. For this, we will use System.IO.Path.Combine in the final PR.
• We had to change some oversighted capitalization in filenames and paths that was running well on Windows but didn't on Unix, due to the latter being case-sensitive.

Copy link

@gasper-az gasper-az left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@matiasroldan6 matiasroldan6 force-pushed the feature/test-bot-linux branch from 6797cf1 to 50a00d4 Compare May 15, 2019 14:43
@matiasroldan6 matiasroldan6 force-pushed the feature/test-bot-linux branch from 50a00d4 to 02047f3 Compare May 15, 2019 15:09
@gasper-az gasper-az merged commit 02047f3 into master May 16, 2019
@gasper-az gasper-az deleted the feature/test-bot-linux branch September 13, 2019 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants