diff --git a/libraries/functional-tests/slacktestbot/README.md b/libraries/functional-tests/slacktestbot/README.md deleted file mode 100644 index e27305746..000000000 --- a/libraries/functional-tests/slacktestbot/README.md +++ /dev/null @@ -1,131 +0,0 @@ -# Slack functional test pipeline setup - -This is a step by step guide to setup the Slack functional test pipeline. - -## Slack Application setup - -We'll need to create a Slack application to connect with the bot. - -1. Create App - - Create a Slack App from [here](https://api.slack.com/apps), associate it to a workspace. - - ![Create Slack App](./media/SlackCreateSlackApp.png) - -2. Get the Signing Secret and the Verification Token - - Keep the Signing Secret and the Verification Token from the Basic Information tab. - - These tokens will be needed to configure the pipeline. - - - Signing Secret will become *SlackTestBotSlackClientSigningSecret*. - - Verification Token will become *SlackTestBotSlackVerificationToken*. - - ![App Credentials](./media/SlackAppCredentials.png) - -3. Grant Scopes - - Go to the OAuth & Permissions tab and scroll to the Scopes section. - - In the Bot Token Scopes, add chat:write, im:history, and im:read using the Add an Oauth Scope button. - - ![Grant Scopes](./media/SlackGrantScopes.png) - -4. Install App - - On the same OAuth & Permissions tab, scroll up to the OAuth Tokens & Redirect URLs section and click on Install to Workspace. - - A new window will be prompted, click on Allow. - - ![Install App](./media/SlackInstallApp.png) - -5. Get the Bot User OAuth Access Token - - You will be redirected back to OAuth & Permissions tab, keep the Bot User OAuth Access Token. - - - Bot User OAuth Access Token will become *SlackTestBotSlackBotToken* later in the pipeline variables. - - ![OAuthToken](./media/SlackOAuthToken.png) - -6. Get the Channel ID - - Go to the Slack workspace you associated the app to. The new App should have appeared; if not, add it using the plus sign that shows up while hovering the mouse over the Apps tab. - - Right click on it and then on Copy link. - - ![ChannelID](./media/SlackChannelID.png) - - The link will look something like https://workspace.slack.com/archives/N074R34L1D. - - The last segment of the URL represents the channel ID, in this case, **N074R34L1D**. - - - Keep this ID as it will later become the *SlackTestBotSlackChannel* pipeline variable. - -## Azure setup - -We will need to create an Azure App Registration and setup a pipeline. - -### App Registration - -1. Create an App Registration - - Go [here](https://portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) and click on New Registration. - - Set a name and change the supported account type to Multitenant, then Register. - - ![Azure App Registration 1](./media/AzureAppRegistration1.png) - - 1. Get the Application ID and client secret values - - You will be redirected to the Overview tab. - - Copy the Application ID then go to the Certificates and secrets tab. - - Create a secret and copy its value. - - - The Azure App Registration ID will be the *SlackTestBotAppId* for the pipeline. - - The Azure App Registration Secret value will be the *SlackTestBotAppSecret* for the pipeline. - -![Azure App Registration 2](./media/AzureAppRegistration2.png) - -### Pipeline Setup - -1. Create the pipeline - - From an Azure DevOps project, go to the Pipelines view and create a new one. - - Using the classic editor, select GitHub, then set the repository and branch. - - ![Azure Pipeline Setup 1](./media/AzurePipelineSetup1.png) - -2. Set the YAML - - On the following view, click on the Apply button of the YAML configuration. - - Set the pipeline name and point to the YAML file clicking on the three highlighted dots. - -![Azure Pipeline Setup 2](./media/AzurePipelineSetup2.png) - -3. Set the pipeline variables - - Finally, click on the variables tab. - - You will need to set up the variables using the values you got throughout this guide: - - |Variable|Value| - |---|---| - | AzureSubscription | Azure Resource Manager name, click [here](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/overview) for more information. | - | SlackTestBotAppId | Azure App Registration ID. | - | SlackTestBotAppSecret | Azure App Registration Secret value. | - | SlackTestBotBotGroup | Name of the Azure resource group to be created. | - | SlackTestBotBotName | Name of the Bot to be created. | - | SlackTestBotSlackBotToken | Slack Bot User OAuth Access Token. | - | SlackTestBotSlackChannel | Slack Channel ID. | - | SlackTestBotSlackClientSigningSecret | Slack Signing Secret. | - | SlackTestBotSlackVerificationToken | Slack Verification Token. | - - Once the variables are set up your panel should look something like this: - - ![Azure Pipeline Variables](./media/AzurePipelineVariables.png) - - Click Save and the pipeline is ready to run. diff --git a/libraries/functional-tests/slacktestbot/app.py b/libraries/functional-tests/slacktestbot/app.py deleted file mode 100644 index e8fb9b63c..000000000 --- a/libraries/functional-tests/slacktestbot/app.py +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -import sys -import traceback -from datetime import datetime - -from aiohttp import web -from aiohttp.web import Request, Response -from botbuilder.adapters.slack import SlackAdapterOptions -from botbuilder.adapters.slack import SlackAdapter -from botbuilder.adapters.slack import SlackClient -from botbuilder.core import TurnContext -from botbuilder.core.integration import aiohttp_error_middleware -from botbuilder.schema import Activity, ActivityTypes - -from bots import EchoBot -from config import DefaultConfig - -CONFIG = DefaultConfig() - -# Create adapter. -SLACK_OPTIONS = SlackAdapterOptions( - CONFIG.SLACK_VERIFICATION_TOKEN, - CONFIG.SLACK_BOT_TOKEN, - CONFIG.SLACK_CLIENT_SIGNING_SECRET, -) -SLACK_CLIENT = SlackClient(SLACK_OPTIONS) -ADAPTER = SlackAdapter(SLACK_CLIENT) - - -# Catch-all for errors. -async def on_error(context: TurnContext, error: Exception): - # This check writes out errors to console log .vs. app insights. - # NOTE: In production environment, you should consider logging this to Azure - # application insights. - print(f"\n [on_turn_error] unhandled error: {error}", file=sys.stderr) - traceback.print_exc() - - # Send a message to the user - await context.send_activity("The bot encountered an error or bug.") - await context.send_activity( - "To continue to run this bot, please fix the bot source code." - ) - # Send a trace activity if we're talking to the Bot Framework Emulator - if context.activity.channel_id == "emulator": - # Create a trace activity that contains the error object - trace_activity = Activity( - label="TurnError", - name="on_turn_error Trace", - timestamp=datetime.utcnow(), - type=ActivityTypes.trace, - value=f"{error}", - value_type="https://www.botframework.com/schemas/error", - ) - # Send a trace activity, which will be displayed in Bot Framework Emulator - await context.send_activity(trace_activity) - - -ADAPTER.on_turn_error = on_error - -# Create the Bot -BOT = EchoBot() - - -# Listen for incoming requests on /api/messages -async def messages(req: Request) -> Response: - return await ADAPTER.process(req, BOT.on_turn) - - -APP = web.Application(middlewares=[aiohttp_error_middleware]) -APP.router.add_post("/api/messages", messages) - -if __name__ == "__main__": - try: - web.run_app(APP, host="localhost", port=CONFIG.PORT) - except Exception as error: - raise error diff --git a/libraries/functional-tests/slacktestbot/bots/__init__.py b/libraries/functional-tests/slacktestbot/bots/__init__.py deleted file mode 100644 index f95fbbbad..000000000 --- a/libraries/functional-tests/slacktestbot/bots/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -from .echo_bot import EchoBot - -__all__ = ["EchoBot"] diff --git a/libraries/functional-tests/slacktestbot/bots/echo_bot.py b/libraries/functional-tests/slacktestbot/bots/echo_bot.py deleted file mode 100644 index c396a42f5..000000000 --- a/libraries/functional-tests/slacktestbot/bots/echo_bot.py +++ /dev/null @@ -1,52 +0,0 @@ -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -import json -import os - -from botbuilder.adapters.slack import SlackRequestBody, SlackEvent -from botbuilder.core import ActivityHandler, MessageFactory, TurnContext -from botbuilder.schema import ChannelAccount, Attachment - - -class EchoBot(ActivityHandler): - async def on_members_added_activity( - self, members_added: [ChannelAccount], turn_context: TurnContext - ): - for member in members_added: - if member.id != turn_context.activity.recipient.id: - await turn_context.send_activity("Hello and welcome!") - - async def on_message_activity(self, turn_context: TurnContext): - return await turn_context.send_activity( - MessageFactory.text(f"Echo: {turn_context.activity.text}") - ) - - async def on_event_activity(self, turn_context: TurnContext): - body = turn_context.activity.channel_data - if not body: - return - - if isinstance(body, SlackRequestBody) and body.command == "/test": - interactive_message = MessageFactory.attachment( - self.__create_interactive_message( - os.path.join(os.getcwd(), "./resources/InteractiveMessage.json") - ) - ) - await turn_context.send_activity(interactive_message) - - if isinstance(body, SlackEvent): - if body.subtype == "file_share": - await turn_context.send_activity("Echo: I received and attachment") - elif body.message and body.message.attachments: - await turn_context.send_activity("Echo: I received a link share") - - def __create_interactive_message(self, file_path: str) -> Attachment: - with open(file_path, "rb") as in_file: - adaptive_card_attachment = json.load(in_file) - - return Attachment( - content=adaptive_card_attachment, - content_type="application/json", - name="blocks", - ) diff --git a/libraries/functional-tests/slacktestbot/config.py b/libraries/functional-tests/slacktestbot/config.py deleted file mode 100644 index 9271d8422..000000000 --- a/libraries/functional-tests/slacktestbot/config.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python3 -# Copyright (c) Microsoft Corporation. All rights reserved. -# Licensed under the MIT License. - -import os - - -class DefaultConfig: - """Bot Configuration""" - - PORT = 3978 - - SLACK_VERIFICATION_TOKEN = os.environ.get("SlackVerificationToken", "") - SLACK_BOT_TOKEN = os.environ.get("SlackBotToken", "") - SLACK_CLIENT_SIGNING_SECRET = os.environ.get("SlackClientSigningSecret", "") diff --git a/libraries/functional-tests/slacktestbot/deploymentTemplates/template-with-new-rg.json b/libraries/functional-tests/slacktestbot/deploymentTemplates/template-with-new-rg.json deleted file mode 100644 index 456508b2d..000000000 --- a/libraries/functional-tests/slacktestbot/deploymentTemplates/template-with-new-rg.json +++ /dev/null @@ -1,297 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "groupLocation": { - "type": "string", - "metadata": { - "description": "Specifies the location of the Resource Group." - } - }, - "groupName": { - "type": "string", - "metadata": { - "description": "Specifies the name of the Resource Group." - } - }, - "appId": { - "type": "string", - "metadata": { - "description": "Active Directory App ID, set as MicrosoftAppId in the Web App's Application Settings." - } - }, - "appSecret": { - "type": "string", - "metadata": { - "description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings." - } - }, - "botId": { - "type": "string", - "metadata": { - "description": "The globally unique and immutable bot ID. Also used to configure the displayName of the bot, which is mutable." - } - }, - "botSku": { - "type": "string", - "metadata": { - "description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1." - } - }, - "newAppServicePlanName": { - "type": "string", - "metadata": { - "description": "The name of the App Service Plan." - } - }, - "newAppServicePlanSku": { - "type": "object", - "defaultValue": { - "name": "S1", - "tier": "Standard", - "size": "S1", - "family": "S", - "capacity": 1 - }, - "metadata": { - "description": "The SKU of the App Service Plan. Defaults to Standard values." - } - }, - "newAppServicePlanLocation": { - "type": "string", - "metadata": { - "description": "The location of the App Service Plan. Defaults to \"westus\"." - } - }, - "newWebAppName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The globally unique name of the Web App. Defaults to the value passed in for \"botId\"." - } - }, - "slackVerificationToken": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The slack verification token, taken from the Slack page after create an app." - } - }, - "slackBotToken": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The slack bot token, taken from the Slack page after create an app." - } - }, - "slackClientSigningSecret": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The slack client signing secret, taken from the Slack page after create an app." - } - } - }, - "variables": { - "appServicePlanName": "[parameters('newAppServicePlanName')]", - "resourcesLocation": "[parameters('newAppServicePlanLocation')]", - "webAppName": "[if(empty(parameters('newWebAppName')), parameters('botId'), parameters('newWebAppName'))]", - "siteHost": "[concat(variables('webAppName'), '.azurewebsites.net')]", - "botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]", - "publishingUsername": "[concat('$', parameters('newWebAppName'))]", - "resourceGroupId": "[concat(subscription().id, '/resourceGroups/', parameters('groupName'))]" - }, - "resources": [ - { - "name": "[parameters('groupName')]", - "type": "Microsoft.Resources/resourceGroups", - "apiVersion": "2018-05-01", - "location": "[parameters('groupLocation')]", - "properties": {} - }, - { - "type": "Microsoft.Resources/deployments", - "apiVersion": "2018-05-01", - "name": "storageDeployment", - "resourceGroup": "[parameters('groupName')]", - "dependsOn": [ - "[resourceId('Microsoft.Resources/resourceGroups/', parameters('groupName'))]" - ], - "properties": { - "mode": "Incremental", - "template": { - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": {}, - "variables": {}, - "resources": [ - { - "comments": "Create a new Linux App Service Plan if no existing App Service Plan name was passed in.", - "type": "Microsoft.Web/serverfarms", - "name": "[variables('appServicePlanName')]", - "apiVersion": "2018-02-01", - "location": "[variables('resourcesLocation')]", - "sku": "[parameters('newAppServicePlanSku')]", - "kind": "linux", - "properties": { - "name": "[variables('appServicePlanName')]", - "perSiteScaling": false, - "reserved": true, - "targetWorkerCount": 0, - "targetWorkerSizeId": 0 - } - }, - { - "comments": "Create a Web App using a Linux App Service Plan", - "type": "Microsoft.Web/sites", - "apiVersion": "2015-08-01", - "location": "[variables('resourcesLocation')]", - "kind": "app,linux", - "dependsOn": [ - "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/serverfarms/', variables('appServicePlanName'))]" - ], - "name": "[variables('webAppName')]", - "properties": { - "name": "[variables('webAppName')]", - "hostNameSslStates": [ - { - "name": "[concat(parameters('newWebAppName'), '.azurewebsites.net')]", - "sslState": "Disabled", - "hostType": "Standard" - }, - { - "name": "[concat(parameters('newWebAppName'), '.scm.azurewebsites.net')]", - "sslState": "Disabled", - "hostType": "Repository" - } - ], - "serverFarmId": "[variables('appServicePlanName')]", - "siteConfig": { - "appSettings": [ - { - "name": "SCM_DO_BUILD_DURING_DEPLOYMENT", - "value": "true" - }, - { - "name": "MicrosoftAppId", - "value": "[parameters('appId')]" - }, - { - "name": "MicrosoftAppPassword", - "value": "[parameters('appSecret')]" - }, - { - "name": "SlackVerificationToken", - "value": "[parameters('slackVerificationToken')]" - }, - { - "name": "SlackBotToken", - "value": "[parameters('slackBotToken')]" - }, - { - "name": "SlackClientSigningSecret", - "value": "[parameters('slackClientSigningSecret')]" - } - ], - "cors": { - "allowedOrigins": [ - "https://botservice.hosting.portal.azure.net", - "https://hosting.onecloud.azure-test.net/" - ] - } - } - } - }, - { - "type": "Microsoft.Web/sites/config", - "apiVersion": "2016-08-01", - "name": "[concat(variables('webAppName'), '/web')]", - "location": "[variables('resourcesLocation')]", - "dependsOn": [ - "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/sites/', variables('webAppName'))]" - ], - "properties": { - "numberOfWorkers": 1, - "defaultDocuments": [ - "Default.htm", - "Default.html", - "Default.asp", - "index.htm", - "index.html", - "iisstart.htm", - "default.aspx", - "index.php", - "hostingstart.html" - ], - "netFrameworkVersion": "v4.0", - "phpVersion": "", - "pythonVersion": "", - "nodeVersion": "", - "linuxFxVersion": "PYTHON|3.7", - "requestTracingEnabled": false, - "remoteDebuggingEnabled": false, - "remoteDebuggingVersion": "VS2017", - "httpLoggingEnabled": true, - "logsDirectorySizeLimit": 35, - "detailedErrorLoggingEnabled": false, - "publishingUsername": "[variables('publishingUsername')]", - "scmType": "None", - "use32BitWorkerProcess": true, - "webSocketsEnabled": false, - "alwaysOn": false, - "appCommandLine": "gunicorn --bind 0.0.0.0 --worker-class aiohttp.worker.GunicornWebWorker --timeout 600 app:APP", - "managedPipelineMode": "Integrated", - "virtualApplications": [ - { - "virtualPath": "/", - "physicalPath": "site\\wwwroot", - "preloadEnabled": false, - "virtualDirectories": null - } - ], - "winAuthAdminState": 0, - "winAuthTenantState": 0, - "customAppPoolIdentityAdminState": false, - "customAppPoolIdentityTenantState": false, - "loadBalancing": "LeastRequests", - "routingRules": [], - "experiments": { - "rampUpRules": [] - }, - "autoHealEnabled": false, - "vnetName": "", - "minTlsVersion": "1.2", - "ftpsState": "AllAllowed", - "reservedInstanceCount": 0 - } - }, - { - "apiVersion": "2017-12-01", - "type": "Microsoft.BotService/botServices", - "name": "[parameters('botId')]", - "location": "global", - "kind": "bot", - "sku": { - "name": "[parameters('botSku')]" - }, - "properties": { - "name": "[parameters('botId')]", - "displayName": "[parameters('botId')]", - "endpoint": "[variables('botEndpoint')]", - "msaAppId": "[parameters('appId')]", - "developerAppInsightsApplicationId": null, - "developerAppInsightKey": null, - "publishingCredentials": null, - "storageResourceId": null - }, - "dependsOn": [ - "[concat(variables('resourceGroupId'), '/providers/Microsoft.Web/sites/', variables('webAppName'))]" - ] - } - ], - "outputs": {} - } - } - } - ] -} diff --git a/libraries/functional-tests/slacktestbot/deploymentTemplates/template-with-preexisting-rg.json b/libraries/functional-tests/slacktestbot/deploymentTemplates/template-with-preexisting-rg.json deleted file mode 100644 index 0a393754c..000000000 --- a/libraries/functional-tests/slacktestbot/deploymentTemplates/template-with-preexisting-rg.json +++ /dev/null @@ -1,275 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "appId": { - "type": "string", - "metadata": { - "description": "Active Directory App ID, set as MicrosoftAppId in the Web App's Application Settings." - } - }, - "appSecret": { - "type": "string", - "metadata": { - "description": "Active Directory App Password, set as MicrosoftAppPassword in the Web App's Application Settings." - } - }, - "botId": { - "type": "string", - "metadata": { - "description": "The globally unique and immutable bot ID. Also used to configure the displayName of the bot, which is mutable." - } - }, - "botSku": { - "defaultValue": "F0", - "type": "string", - "metadata": { - "description": "The pricing tier of the Bot Service Registration. Acceptable values are F0 and S1." - } - }, - "newAppServicePlanName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The name of the new App Service Plan." - } - }, - "newAppServicePlanSku": { - "type": "object", - "defaultValue": { - "name": "S1", - "tier": "Standard", - "size": "S1", - "family": "S", - "capacity": 1 - }, - "metadata": { - "description": "The SKU of the App Service Plan. Defaults to Standard values." - } - }, - "appServicePlanLocation": { - "type": "string", - "metadata": { - "description": "The location of the App Service Plan." - } - }, - "existingAppServicePlan": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "Name of the existing App Service Plan used to create the Web App for the bot." - } - }, - "newWebAppName": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The globally unique name of the Web App. Defaults to the value passed in for \"botId\"." - } - }, - "slackVerificationToken": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The slack verification token, taken from the Slack page after create an app." - } - }, - "slackBotToken": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The slack bot token, taken from the Slack page after create an app." - } - }, - "slackClientSigningSecret": { - "type": "string", - "defaultValue": "", - "metadata": { - "description": "The slack client signing secret, taken from the Slack page after create an app." - } - } - }, - "variables": { - "defaultAppServicePlanName": "[if(empty(parameters('existingAppServicePlan')), 'createNewAppServicePlan', parameters('existingAppServicePlan'))]", - "useExistingAppServicePlan": "[not(equals(variables('defaultAppServicePlanName'), 'createNewAppServicePlan'))]", - "servicePlanName": "[if(variables('useExistingAppServicePlan'), parameters('existingAppServicePlan'), parameters('newAppServicePlanName'))]", - "publishingUsername": "[concat('$', parameters('newWebAppName'))]", - "resourcesLocation": "[parameters('appServicePlanLocation')]", - "webAppName": "[if(empty(parameters('newWebAppName')), parameters('botId'), parameters('newWebAppName'))]", - "siteHost": "[concat(variables('webAppName'), '.azurewebsites.net')]", - "botEndpoint": "[concat('https://', variables('siteHost'), '/api/messages')]" - }, - "resources": [ - { - "comments": "Create a new Linux App Service Plan if no existing App Service Plan name was passed in.", - "type": "Microsoft.Web/serverfarms", - "apiVersion": "2016-09-01", - "name": "[variables('servicePlanName')]", - "location": "[variables('resourcesLocation')]", - "sku": "[parameters('newAppServicePlanSku')]", - "kind": "linux", - "properties": { - "name": "[variables('servicePlanName')]", - "perSiteScaling": false, - "reserved": true, - "targetWorkerCount": 0, - "targetWorkerSizeId": 0 - } - }, - { - "comments": "Create a Web App using a Linux App Service Plan", - "type": "Microsoft.Web/sites", - "apiVersion": "2016-08-01", - "name": "[variables('webAppName')]", - "location": "[variables('resourcesLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.Web/serverfarms', variables('servicePlanName'))]" - ], - "kind": "app,linux", - "properties": { - "enabled": true, - "hostNameSslStates": [ - { - "name": "[concat(parameters('newWebAppName'), '.azurewebsites.net')]", - "sslState": "Disabled", - "hostType": "Standard" - }, - { - "name": "[concat(parameters('newWebAppName'), '.scm.azurewebsites.net')]", - "sslState": "Disabled", - "hostType": "Repository" - } - ], - "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('servicePlanName'))]", - "reserved": true, - "scmSiteAlsoStopped": false, - "clientAffinityEnabled": false, - "clientCertEnabled": false, - "hostNamesDisabled": false, - "containerSize": 0, - "dailyMemoryTimeQuota": 0, - "httpsOnly": false, - "siteConfig": { - "appSettings": [ - { - "name": "MicrosoftAppId", - "value": "[parameters('appId')]" - }, - { - "name": "MicrosoftAppPassword", - "value": "[parameters('appSecret')]" - }, - { - "name": "SlackVerificationToken", - "value": "[parameters('slackVerificationToken')]" - }, - { - "name": "SlackBotToken", - "value": "[parameters('slackBotToken')]" - }, - { - "name": "SlackClientSigningSecret", - "value": "[parameters('slackClientSigningSecret')]" - }, - { - "name": "SCM_DO_BUILD_DURING_DEPLOYMENT", - "value": "true" - } - ], - "cors": { - "allowedOrigins": [ - "https://botservice.hosting.portal.azure.net", - "https://hosting.onecloud.azure-test.net/" - ] - } - } - } - }, - { - "type": "Microsoft.Web/sites/config", - "apiVersion": "2016-08-01", - "name": "[concat(variables('webAppName'), '/web')]", - "location": "[variables('resourcesLocation')]", - "dependsOn": [ - "[resourceId('Microsoft.Web/sites', variables('webAppName'))]" - ], - "properties": { - "numberOfWorkers": 1, - "defaultDocuments": [ - "Default.htm", - "Default.html", - "Default.asp", - "index.htm", - "index.html", - "iisstart.htm", - "default.aspx", - "index.php", - "hostingstart.html" - ], - "netFrameworkVersion": "v4.0", - "phpVersion": "", - "pythonVersion": "", - "nodeVersion": "", - "linuxFxVersion": "PYTHON|3.7", - "requestTracingEnabled": false, - "remoteDebuggingEnabled": false, - "remoteDebuggingVersion": "VS2017", - "httpLoggingEnabled": true, - "logsDirectorySizeLimit": 35, - "detailedErrorLoggingEnabled": false, - "publishingUsername": "[variables('publishingUsername')]", - "scmType": "None", - "use32BitWorkerProcess": true, - "webSocketsEnabled": false, - "alwaysOn": false, - "appCommandLine": "gunicorn --bind 0.0.0.0 --worker-class aiohttp.worker.GunicornWebWorker --timeout 600 app:APP", - "managedPipelineMode": "Integrated", - "virtualApplications": [ - { - "virtualPath": "/", - "physicalPath": "site\\wwwroot", - "preloadEnabled": false, - "virtualDirectories": null - } - ], - "winAuthAdminState": 0, - "winAuthTenantState": 0, - "customAppPoolIdentityAdminState": false, - "customAppPoolIdentityTenantState": false, - "loadBalancing": "LeastRequests", - "routingRules": [], - "experiments": { - "rampUpRules": [] - }, - "autoHealEnabled": false, - "vnetName": "", - "minTlsVersion": "1.2", - "ftpsState": "AllAllowed", - "reservedInstanceCount": 0 - } - }, - { - "apiVersion": "2017-12-01", - "type": "Microsoft.BotService/botServices", - "name": "[parameters('botId')]", - "location": "global", - "kind": "bot", - "sku": { - "name": "[parameters('botSku')]" - }, - "properties": { - "name": "[parameters('botId')]", - "displayName": "[parameters('botId')]", - "endpoint": "[variables('botEndpoint')]", - "msaAppId": "[parameters('appId')]", - "developerAppInsightsApplicationId": null, - "developerAppInsightKey": null, - "publishingCredentials": null, - "storageResourceId": null - }, - "dependsOn": [ - "[resourceId('Microsoft.Web/sites/', variables('webAppName'))]" - ] - } - ] -} diff --git a/libraries/functional-tests/slacktestbot/media/AzureAppRegistration1.png b/libraries/functional-tests/slacktestbot/media/AzureAppRegistration1.png deleted file mode 100644 index c39964a14..000000000 Binary files a/libraries/functional-tests/slacktestbot/media/AzureAppRegistration1.png and /dev/null differ diff --git a/libraries/functional-tests/slacktestbot/media/AzureAppRegistration2.png b/libraries/functional-tests/slacktestbot/media/AzureAppRegistration2.png deleted file mode 100644 index 5f64b6220..000000000 Binary files a/libraries/functional-tests/slacktestbot/media/AzureAppRegistration2.png and /dev/null differ diff --git a/libraries/functional-tests/slacktestbot/media/AzurePipelineSetup1.png b/libraries/functional-tests/slacktestbot/media/AzurePipelineSetup1.png deleted file mode 100644 index 89cb0b303..000000000 Binary files a/libraries/functional-tests/slacktestbot/media/AzurePipelineSetup1.png and /dev/null differ diff --git a/libraries/functional-tests/slacktestbot/media/AzurePipelineSetup2.png b/libraries/functional-tests/slacktestbot/media/AzurePipelineSetup2.png deleted file mode 100644 index a5ca27f38..000000000 Binary files a/libraries/functional-tests/slacktestbot/media/AzurePipelineSetup2.png and /dev/null differ diff --git a/libraries/functional-tests/slacktestbot/media/AzurePipelineVariables.png b/libraries/functional-tests/slacktestbot/media/AzurePipelineVariables.png deleted file mode 100644 index 15554ac3a..000000000 Binary files a/libraries/functional-tests/slacktestbot/media/AzurePipelineVariables.png and /dev/null differ diff --git a/libraries/functional-tests/slacktestbot/media/SlackAppCredentials.png b/libraries/functional-tests/slacktestbot/media/SlackAppCredentials.png deleted file mode 100644 index abd5b1e2f..000000000 Binary files a/libraries/functional-tests/slacktestbot/media/SlackAppCredentials.png and /dev/null differ diff --git a/libraries/functional-tests/slacktestbot/media/SlackChannelID.png b/libraries/functional-tests/slacktestbot/media/SlackChannelID.png deleted file mode 100644 index f2abf665f..000000000 Binary files a/libraries/functional-tests/slacktestbot/media/SlackChannelID.png and /dev/null differ diff --git a/libraries/functional-tests/slacktestbot/media/SlackCreateSlackApp.png b/libraries/functional-tests/slacktestbot/media/SlackCreateSlackApp.png deleted file mode 100644 index 157e94639..000000000 Binary files a/libraries/functional-tests/slacktestbot/media/SlackCreateSlackApp.png and /dev/null differ diff --git a/libraries/functional-tests/slacktestbot/media/SlackGrantScopes.png b/libraries/functional-tests/slacktestbot/media/SlackGrantScopes.png deleted file mode 100644 index d2969aae1..000000000 Binary files a/libraries/functional-tests/slacktestbot/media/SlackGrantScopes.png and /dev/null differ diff --git a/libraries/functional-tests/slacktestbot/media/SlackInstallApp.png b/libraries/functional-tests/slacktestbot/media/SlackInstallApp.png deleted file mode 100644 index f6ae3ee08..000000000 Binary files a/libraries/functional-tests/slacktestbot/media/SlackInstallApp.png and /dev/null differ diff --git a/libraries/functional-tests/slacktestbot/media/SlackOAuthToken.png b/libraries/functional-tests/slacktestbot/media/SlackOAuthToken.png deleted file mode 100644 index 322b7cdee..000000000 Binary files a/libraries/functional-tests/slacktestbot/media/SlackOAuthToken.png and /dev/null differ diff --git a/libraries/functional-tests/slacktestbot/requirements.txt b/libraries/functional-tests/slacktestbot/requirements.txt deleted file mode 100644 index 0cdcf62b8..000000000 --- a/libraries/functional-tests/slacktestbot/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -botbuilder-integration-aiohttp>=4.11.0 -botbuilder-adapters-slack>=4.11.0 diff --git a/libraries/functional-tests/slacktestbot/resources/InteractiveMessage.json b/libraries/functional-tests/slacktestbot/resources/InteractiveMessage.json deleted file mode 100644 index 91637db25..000000000 --- a/libraries/functional-tests/slacktestbot/resources/InteractiveMessage.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "Hello, Assistant to the Regional Manager Dwight! *Michael Scott* wants to know where you'd like to take the Paper Company investors to dinner tonight.\n\n *Please select a restaurant:*" - } - }, - { - "type": "divider" - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Farmhouse Thai Cuisine*\n:star::star::star::star: 1528 reviews\n They do have some vegan options, like the roti and curry, plus they have a ton of salad stuff and noodles can be ordered without meat!! They have something for everyone here" - }, - "accessory": { - "type": "image", - "image_url": "https://s3-media3.fl.yelpcdn.com/bphoto/c7ed05m9lC2EmA3Aruue7A/o.jpg", - "alt_text": "alt text for image" - } - }, - { - "type": "section", - "text": { - "type": "mrkdwn", - "text": "*Ler Ros*\n:star::star::star::star: 2082 reviews\n I would really recommend the Yum Koh Moo Yang - Spicy lime dressing and roasted quick marinated pork shoulder, basil leaves, chili & rice powder." - }, - "accessory": { - "type": "image", - "image_url": "https://s3-media2.fl.yelpcdn.com/bphoto/DawwNigKJ2ckPeDeDM7jAg/o.jpg", - "alt_text": "alt text for image" - } - }, - { - "type": "divider" - }, - { - "type": "actions", - "elements": [ - { - "type": "button", - "text": { - "type": "plain_text", - "text": "Farmhouse", - "emoji": true - }, - "value": "Farmhouse" - }, - { - "type": "button", - "text": { - "type": "plain_text", - "text": "Ler Ros", - "emoji": true - }, - "value": "Ler Ros" - } - ] - } -] \ No newline at end of file