Skip to content

Commit

Permalink
Merge 63f6df6 into a30eaa4
Browse files Browse the repository at this point in the history
  • Loading branch information
BruceHaley committed Jan 31, 2020
2 parents a30eaa4 + 63f6df6 commit 31e5cb0
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 98 deletions.
8 changes: 6 additions & 2 deletions build/yaml/botbuilder-dotnet-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variables:
BuildPlatform: any cpu
CoverallsToken: define this in Azure
GitHubCommentApiKey: define this in Azure
IsBuildServer: true # This is consumed by projects in Microsoft.Bot.Builder.sln.
IsBuildServer: true # This activates package versioning in the projects in Microsoft.Bot.Builder.sln.
MSBuildArguments: -p:SignAssembly=false -p:delaySign=false
Parameters.solution: Microsoft.Bot.Builder.sln
PreviewPackageVersion: 4.8.0-preview-$(Build.BuildNumber) # This is consumed by projects in Microsoft.Bot.Builder.sln.
Expand All @@ -22,7 +22,11 @@ pool:
- msbuild
- visualstudio

# The following 2 stages run multi-configuration, multi-agent parallel jobs
# The following 2 stages run multi-configuration, multi-agent parallel jobs.
# Debug-Windows/Release-Windows => Builds everything in Debug/Release + the ASP.NET Desktop.
# Debug/Release => would build all .NET Standard libs and test them.
# The .NET 4.X asp.net integrations libraries do not build and test on non-windows boxes.
# If we drop support for .NET 4.x then we can drop to just Debug/Release.
stages:
- stage: Build
jobs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- master
#
# Run functional tests on bot deployed to Azure Unix
#

# "name" here defines the build number format. Build number is accessed via $(Build.BuildNumber)
name: $(Build.BuildId)

trigger: none

Expand All @@ -18,6 +18,9 @@ variables:
BuildPlatform: 'any cpu'
BuildConfiguration: 'Release'
Parameters.solution: Microsoft.Bot.Builder.sln
# AzureSubscription: define this in Azure
# AzureDeploymentUser: define this in Azure
# AzureDeploymentPassword: define this in Azure

steps:
- template: ci-build-steps.yml
Expand All @@ -35,7 +38,7 @@ steps:
- task: AzureResourceGroupDeployment@2
displayName: 'Azure Deployment:Create Or Update Resource Group action on $(BotGroup)'
inputs:
azureSubscription: '$(AzureSubscription)'
azureSubscription: $(AzureSubscription)
resourceGroupName: '$(BotGroup)'
location: 'West US'
csmFile: FunctionalTests/ExportedTemplate/LinuxDotNet/template.json
Expand All @@ -44,7 +47,7 @@ steps:
- task: AzureCLI@1
displayName: 'Create Azure DirectLine channel for test bot'
inputs:
azureSubscription: '$(AzureSubscription)'
azureSubscription: $(AzureSubscription)
scriptLocation: inlineScript
inlineScript: 'call az bot directline create -n "$(BotName)" -g "$(BotGroup)" > "$(System.DefaultWorkingDirectory)\DirectLineCreate.json"'

Expand All @@ -65,31 +68,20 @@ steps:
$key = $json.properties.properties.sites.key
echo "##vso[task.setvariable variable=DIRECTLINE;]$key"
echo "##vso[task.setvariable variable=BOTID;]$(BotName)"
displayName: 'PowerShell Script'

- powershell: |
echo '##vso[task.setvariable variable=TESTAPPID]$(AppId)'
echo '##vso[task.setvariable variable=TESTPASSWORD]$(AppSecret)'
echo '##vso[task.setvariable variable=LUISAPPID]$(LUISAPPIDSECRET)'
echo '##vso[task.setvariable variable=LUISSUBSCRIPTIONKEY]$(LUISSUBSCRIPTIONKEYSECRET)'
displayName: 'Set Environment Variables'
displayName: 'Get Bot Keys'

- task: DotNetCoreCLI@2
displayName: 'dotnet test'
displayName: 'Run Functional tests'
inputs:
command: test
projects: |
**/**Tests.csproj
!**/Microsoft.Bot.Builder.Classic.Tests.csproj
!**/Microsoft.Bot.ApplicationInsights.WebApi.Tests.csproj
!**/Microsoft.Bot.Builder.Integration.AspNet.WebApi.Tests.csproj
arguments: '-v n --configuration $(BuildConfiguration) --no-build --no-restore --filter "TestCategory!=IgnoreInAutomatedBuild&TestCategory!=Adapters"'
workingDirectory: tests
projects: '$(System.DefaultWorkingDirectory)\FunctionalTests\**\*FunctionalTests.csproj'
arguments: '-v n --configuration $(BuildConfiguration) --no-build --no-restore --filter "TestCategory=FunctionalTests&TestCategory!=Adapters" --collect:"Code Coverage" --settings $(System.DefaultWorkingDirectory)\CodeCoverage.runsettings '
workingDirectory: '$(System.DefaultWorkingDirectory)\'

- task: AzureCLI@1
displayName: 'Delete Resources'
inputs:
azureSubscription: '$(AzureSubscription)'
azureSubscription: $(AzureSubscription)
scriptLocation: inlineScript
inlineScript: 'call az group delete -n "$(BotGroup)" --yes'
condition: always()
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- master
#
# Run functional tests on bot deployed to Azure Windows
#

# "name" here defines the build number format. Build number is accessed via $(Build.BuildNumber)
name: $(Build.BuildId)

trigger: none

Expand All @@ -18,6 +18,7 @@ variables:
BuildPlatform: 'any cpu'
BuildConfiguration: 'Release'
Parameters.solution: Microsoft.Bot.Builder.sln
AzureSubscription: define this in Azure

steps:
- template: ci-build-steps.yml
Expand All @@ -28,25 +29,24 @@ steps:
command: publish
publishWebProjects: false
projects: '$(System.DefaultWorkingDirectory)\tests\Microsoft.Bot.Builder.TestBot\Microsoft.Bot.Builder.TestBot.csproj'
arguments: '--output $(System.DefaultWorkingDirectory)\tests\Microsoft.Bot.Builder.TestBot\PublishedBot'
arguments: '--output $(System.DefaultWorkingDirectory)\tests\Microsoft.Bot.Builder.TestBot\publishedbot'
modifyOutputPath: false

- task: AzureCLI@1
displayName: 'Create Resources'
displayName: 'Create Resource Group, deploy bot, create DirectLine channel'
inputs:
azureSubscription: '$(AzureSubscription)'
azureSubscription: $(AzureSubscription)
scriptLocation: inlineScript
inlineScript: |
call az deployment create --name "$(BotGroup)" --template-file "$(System.DefaultWorkingDirectory)\FunctionalTests\ExportedTemplate\template.json" --location "westus" --parameters appId=$(AppId) appSecret="$(AppSecret)" botId="$(BotName)" botSku=F0 newAppServicePlanName="$(BotName)" newWebAppName="$(BotName)" groupName="$(BotGroup)" groupLocation="westus" newAppServicePlanLocation="westus"
call az webapp deployment source config-zip --resource-group "$(BotGroup)" --name "$(BotName)" --src "$(System.DefaultWorkingDirectory)\tests\Microsoft.Bot.Builder.TestBot\PublishedBot\PublishedBot.zip"
call az webapp deployment source config-zip --resource-group "$(BotGroup)" --name "$(BotName)" --src "$(System.DefaultWorkingDirectory)\tests\Microsoft.Bot.Builder.TestBot\publishedbot\PublishedBot.zip"
call az bot directline create -n "$(BotName)" -g "$(BotGroup)" > "$(System.DefaultWorkingDirectory)\DirectLineCreate.json"
- powershell: |
$json = Get-Content '$(System.DefaultWorkingDirectory)\DirectLineCreate.json' | Out-String | ConvertFrom-Json
$key = $json.properties.properties.sites.key
$botName = "$env:BotName"
echo "##vso[task.setvariable variable=DIRECTLINE;]$key"
echo "##vso[task.setvariable variable=BOTID;]$botName"
echo "##vso[task.setvariable variable=BOTID;]$(BotName)"
displayName: 'Get Bot Keys'

- powershell: |
Expand All @@ -71,7 +71,7 @@ steps:
- task: AzureCLI@1
displayName: 'Delete Resources'
inputs:
azureSubscription: '$(AzureSubscription)'
azureSubscription: $(AzureSubscription)
scriptLocation: inlineScript
inlineScript: 'call az group delete -n "$(BotGroup)" --yes'
condition: always()
35 changes: 35 additions & 0 deletions build/yaml/botbuilder-dotnet-simple-build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Build and run "simple" tests against Microsoft.Bot.Builder.sln
#

# "name" here defines the build number format. Build number is accessed via $(Build.BuildNumber)
name: $(Build.BuildId)

trigger: none

pr: none

pool:
vmImage: 'windows-2019'

variables:
BuildPlatform: 'any cpu'
BuildConfiguration: 'Debug'
Parameters.solution: Microsoft.Bot.Builder.sln
MSBuildArguments:
AzureSubscription: define this in Azure

steps:
- template: ci-build-steps.yml

- task: DotNetCoreCLI@2
displayName: 'dotnet test'
inputs:
command: test
projects: |
**/**Tests.csproj
!**/Microsoft.Bot.Builder.Classic.Tests.csproj
!**/Microsoft.Bot.ApplicationInsights.WebApi.Tests.csproj
!**/Microsoft.Bot.Builder.Integration.AspNet.WebApi.Tests.csproj
arguments: '-v n --configuration $(BuildConfiguration) --no-build --no-restore --filter TestCategory!=IgnoreInAutomatedBuild&TestCategory!=FunctionalTests"'
workingDirectory: tests
58 changes: 0 additions & 58 deletions build/yaml/nightly-simple-build-test.yml

This file was deleted.

0 comments on commit 31e5cb0

Please sign in to comment.