diff --git a/build/yaml/botbuilder-dotnet-ci-webex-test.yml b/build/yaml/botbuilder-dotnet-ci-webex-test.yml index 55f187753..a64f827b5 100644 --- a/build/yaml/botbuilder-dotnet-ci-webex-test.yml +++ b/build/yaml/botbuilder-dotnet-ci-webex-test.yml @@ -27,12 +27,16 @@ trigger: # ci trigger pr: none # no pr trigger variables: + AppId: $(WebexTestBotAppId) + AppSecret: $(WebexTestBotAppSecret) + BotGroup: $(WebexTestBotBotGroup) + BotName: $(WebexTestBotBotName) ReleasePackageVersion: 4.8.0-preview-$(Build.BuildNumber) MSBuildArguments: -p:SignAssembly=false -p:delaySign=false -p:RunAnalyzersDuringBuild=false BuildPlatform: 'any cpu' BuildConfiguration: 'debug' Parameters.solution: Microsoft.Bot.Builder.sln - WebexPublicAddress: 'https://$(WebexTestBotBotName).azurewebsites.net/api/messages' + WebexPublicAddress: 'https://$(BotName).azurewebsites.net/api/messages' SolutionDir: $(System.DefaultWorkingDirectory) # Consumed in dotnet publish by Directory.Build.props and a few test projects. # AzureSubscription: define this in Azure # DeleteResourceGroup: (optional) define this in Azure. Default = true. @@ -67,16 +71,16 @@ steps: azureSubscription: '$(AzureSubscription)' scriptLocation: inlineScript inlineScript: | - call az group create --location westus --name $(WebexTestBotBotGroup) - call az deployment group create --resource-group "$(WebexTestBotBotGroup)" --template-file "$(System.DefaultWorkingDirectory)\tests\Adapters\Microsoft.Bot.Builder.Adapters.Webex.TestBot\DeploymentTemplates\template-with-preexisting-rg.json" --parameters appId="$(WebexTestBotAppId)" appSecret="$(WebexTestBotAppSecret)" botId="$(WebexTestBotBotName)" botSku=F0 newAppServicePlanName="$(WebexTestBotBotName)" newWebAppName="$(WebexTestBotBotName)" appServicePlanLocation="westus" webexPublicAddress="$(WebexPublicAddress)" webexAccessToken="$(WebexTestBotWebexBotAccessToken)" webexSecret="$(WebexTestBotWebexWebhookSecret)" webexWebhookName="$(WebexTestBotWebexWebhookName)" --name "$(WebexTestBotBotName)" - call az webapp deployment source config-zip --resource-group "$(WebexTestBotBotGroup)" --name "$(WebexTestBotBotName)" --src "$(System.DefaultWorkingDirectory)\tests\Adapters\Microsoft.Bot.Builder.Adapters.Webex.TestBot\PublishedBot\PublishedBot.zip" + call az group create --location westus --name $(BotGroup) + call az deployment group create --resource-group "$(BotGroup)" --template-file "$(System.DefaultWorkingDirectory)\tests\Adapters\Microsoft.Bot.Builder.Adapters.Webex.TestBot\DeploymentTemplates\template-with-preexisting-rg.json" --parameters appId="$(AppId)" appSecret="$(AppSecret)" botId="$(BotName)" botSku=F0 newAppServicePlanName="$(BotName)" newWebAppName="$(BotName)" appServicePlanLocation="westus" webexPublicAddress="$(WebexPublicAddress)" webexAccessToken="$(WebexTestBotWebexBotAccessToken)" webexSecret="$(WebexTestBotWebexWebhookSecret)" webexWebhookName="$(WebexTestBotWebexWebhookName)" --name "$(BotName)" + call az webapp deployment source config-zip --resource-group "$(BotGroup)" --name "$(BotName)" --src "$(System.DefaultWorkingDirectory)\tests\Adapters\Microsoft.Bot.Builder.Adapters.Webex.TestBot\PublishedBot\PublishedBot.zip" - task: AzureCLI@1 displayName: 'Zip Deploy Bot' inputs: azureSubscription: '$(AzureSubscription)' scriptLocation: inlineScript - inlineScript: 'call az webapp deployment source config-zip --resource-group "$(WebexTestBotBotGroup)" --name "$(WebexTestBotBotName)" --src "$(System.DefaultWorkingDirectory)\tests\Adapters\Microsoft.Bot.Builder.Adapters.Webex.TestBot\PublishedBot\PublishedBot.zip"' + inlineScript: 'call az webapp deployment source config-zip --resource-group "$(BotGroup)" --name "$(BotName)" --src "$(System.DefaultWorkingDirectory)\tests\Adapters\Microsoft.Bot.Builder.Adapters.Webex.TestBot\PublishedBot\PublishedBot.zip"' - task: DotNetCoreCLI@2 displayName: 'dotnet test' @@ -90,5 +94,5 @@ steps: inputs: azureSubscription: '$(AzureSubscription)' scriptLocation: inlineScript - inlineScript: 'call az group delete -n "$(WebexTestBotBotGroup)" --yes' + inlineScript: 'call az group delete -n "$(BotGroup)" --yes' condition: and(always(), ne(variables['DeleteResourceGroup'], 'false'))