From 9d38485943be6903e678d5644951647e2c871635 Mon Sep 17 00:00:00 2001 From: amirt Date: Sun, 19 Apr 2020 18:49:33 +0300 Subject: [PATCH 1/4] When using "deploy to azure" button, taking the repo and branch from the page where the button was clicked --- azuredeploy.json | 16 ++++++++++------ public/index.js | 5 ++--- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/azuredeploy.json b/azuredeploy.json index 38f1973..1f750fe 100644 --- a/azuredeploy.json +++ b/azuredeploy.json @@ -57,6 +57,12 @@ "metadata":{ "description": "Healthbot webchat secret." } + }, + "repoUrl": { + "type": "string" + }, + "branch": { + "type": "string" } }, "variables":{ @@ -66,8 +72,6 @@ "linuxFxVersion": "NODE|lts", "hostingPlanNameLinux": "[concat('plan-linux-', parameters('siteName'))]", "hostingPlanNameWin": "[concat('plan-win-', parameters('siteName'))]", - "repoURL": "https://github.com/microsoft/HealthBotContainerSample.git", - "branch": "master", "kind": "[if(equals(parameters('operatingSystem'), 'windows'), 'app', 'linux')]", "linuxSiteName": "[if(equals(parameters('operatingSystem'), 'linux'), parameters('siteName'), 'app-na')]", "windowsSiteName": "[if(equals(parameters('operatingSystem'), 'windows'), parameters('siteName'), 'app-na')]", @@ -119,8 +123,8 @@ "[resourceId('Microsoft.Web/sites', variables('linuxSiteName'))]" ], "properties": { - "repoUrl": "[variables('repoURL')]", - "branch": "[variables('branch')]", + "repoUrl": "[parameters('repoURL')]", + "branch": "[parameters('branch')]", "isManualIntegration": true } } @@ -193,8 +197,8 @@ "[resourceId('Microsoft.Web/sites', variables('windowsSiteName'))]" ], "properties": { - "repoUrl": "[variables('repoURL')]", - "branch": "[variables('branch')]", + "repoUrl": "[parameters('repoURL')]", + "branch": "[parameters('branch')]", "isManualIntegration": true } } diff --git a/public/index.js b/public/index.js index d44cb55..1926eed 100644 --- a/public/index.js +++ b/public/index.js @@ -105,15 +105,14 @@ function initBotConversation() { jsonWebToken: jsonWebToken, // Use the following activity to proactively invoke a bot scenario - /* + triggeredScenario: { - trigger: "{scenario_id}", + trigger: "demo", args: { myVar1: "{custom_arg_1}", myVar2: "{custom_arg_2}" } } - */ } } } From 351c6b997001668a783f69c502360905a93a2a22 Mon Sep 17 00:00:00 2001 From: amirt Date: Sun, 19 Apr 2020 19:17:49 +0300 Subject: [PATCH 2/4] When using "deploy to azure" button, taking the repo and branch from the page where the button was clicked --- azuredeploy.json | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/azuredeploy.json b/azuredeploy.json index 1f750fe..3cd369d 100644 --- a/azuredeploy.json +++ b/azuredeploy.json @@ -57,12 +57,6 @@ "metadata":{ "description": "Healthbot webchat secret." } - }, - "repoUrl": { - "type": "string" - }, - "branch": { - "type": "string" } }, "variables":{ @@ -121,12 +115,7 @@ "location": "[parameters('siteLocation')]", "dependsOn": [ "[resourceId('Microsoft.Web/sites', variables('linuxSiteName'))]" - ], - "properties": { - "repoUrl": "[parameters('repoURL')]", - "branch": "[parameters('branch')]", - "isManualIntegration": true - } + ] } ] }, @@ -195,12 +184,7 @@ "location": "[parameters('siteLocation')]", "dependsOn": [ "[resourceId('Microsoft.Web/sites', variables('windowsSiteName'))]" - ], - "properties": { - "repoUrl": "[parameters('repoURL')]", - "branch": "[parameters('branch')]", - "isManualIntegration": true - } + ] } ] }, From 16e1c03196429f38a7efc4aa6a60288e6ed51747 Mon Sep 17 00:00:00 2001 From: amirt Date: Sun, 19 Apr 2020 19:35:44 +0300 Subject: [PATCH 3/4] Revert "When using "deploy to azure" button, taking the repo and branch from the page where the button was clicked" This reverts commit 351c6b99 --- azuredeploy.json | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/azuredeploy.json b/azuredeploy.json index 3cd369d..1f750fe 100644 --- a/azuredeploy.json +++ b/azuredeploy.json @@ -57,6 +57,12 @@ "metadata":{ "description": "Healthbot webchat secret." } + }, + "repoUrl": { + "type": "string" + }, + "branch": { + "type": "string" } }, "variables":{ @@ -115,7 +121,12 @@ "location": "[parameters('siteLocation')]", "dependsOn": [ "[resourceId('Microsoft.Web/sites', variables('linuxSiteName'))]" - ] + ], + "properties": { + "repoUrl": "[parameters('repoURL')]", + "branch": "[parameters('branch')]", + "isManualIntegration": true + } } ] }, @@ -184,7 +195,12 @@ "location": "[parameters('siteLocation')]", "dependsOn": [ "[resourceId('Microsoft.Web/sites', variables('windowsSiteName'))]" - ] + ], + "properties": { + "repoUrl": "[parameters('repoURL')]", + "branch": "[parameters('branch')]", + "isManualIntegration": true + } } ] }, From 84e7b4bea9418218da7ff4b1522d847db612541c Mon Sep 17 00:00:00 2001 From: amirt Date: Sun, 19 Apr 2020 19:46:15 +0300 Subject: [PATCH 4/4] removing test code --- public/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/index.js b/public/index.js index 1926eed..d44cb55 100644 --- a/public/index.js +++ b/public/index.js @@ -105,14 +105,15 @@ function initBotConversation() { jsonWebToken: jsonWebToken, // Use the following activity to proactively invoke a bot scenario - + /* triggeredScenario: { - trigger: "demo", + trigger: "{scenario_id}", args: { myVar1: "{custom_arg_1}", myVar2: "{custom_arg_2}" } } + */ } } }