Add build YAML for Twilio functional test #3287
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds a YAML file to set up a pipeline to run the functional test for Twilio.
This pull request depends on the test added in the PR #3286
Changes made
We added the file
botbuilder-dotnet-ci-twilio-test.yml
inside the build/yaml folder.Before Setup
The following step by step guide uses a Trial Twilio account, which should last for approximately 200 text messages or runs of the test. If you want to use this functional test for an unlimited amount of time, you will need to upgrade your account to a paid version and add a balance to it.
Requirements
This test requires a valid phone number to receive text messages from the bot when it answers.
You can use a personal number, register a second Twilio account or buy a second number in a no trial account.
Variables Summary
This is a summary of the variables you will need to get before setting up the Azure pipeline
+123456423
+123456423
Setting Up
The next steps will guide you through the configuration of a Build pipeline based on the YAML files.
Prerequisites
Set up Twilio account
Go to Twilio's page to sign up for a free trial account.
You can later check this number or verify a new one to use in the test in the Verified Caller IDs dashboard. Trial accounts can only send text messages to numbers verified there.
Go to your Console Dashboard, click on Get Trial Number to register a new phone number with SMS capabilities, this will be your TwilioNumber, also take note of your account sid (TwilioAccountSid) and auth token (TwilioAuthToken).
Go to your Twilio's Active Numbers dashboard and click in your number.
Then, scroll down to the Messaging section.
In the A message comes in field, select "Webhook" and fill it with the Bot Web App URL.
https://<BotName>.azurewebsites.net/api/messages
Set up build pipeline
Create a new build pipeline. Then, select the Use classic editor option.
Configure the repository and branch. Then, in the configuration as code, click on Apply for the YAML file option.
In section YAML, write the build name and select the build YAML file inside the folder
build/yaml
in the root of the directory.In the Variables section add the following variables.
*Set these variables as private.
+123456423
+123456423
(Optional) Configure the triggers for the pipeline. By default, this pipeline runs every time a pull request is created or a commit is made in the master branch.
Create an Azure Resource Manager service connection
This step is required to use your Azure Subscription for the Windows and Linux CI builds. If you already have a Connection Service configured, save its Connection name to use it later as AzureSubscription.
For more info go to this link.
1- Navigate to Project settings -> Service Connections -> New service connection.
2- Select Azure Resource Manager and click Next. Then, select Service principal (manual)
3- In the New Azure Service Connection section, complete the next fields. Then, click on verify and save.
Testing
In the image below you can see the run of a pipeline set up using this YAML file.