DevOps Your Skill: Deploy
DevOps Your Skill: Deploy
In this article, we discuss how to deploy your Alexa Skill to development stage in your pipeline and its importance in the day-to-day Alexa Skills development.
Join the DZone community and get the full member experience.Join For Free
When the code is checked in the previous steps, it is time to deploy the Skill to the Alexa cloud in order to start the next steps that will run different kind of tests. There are some tests, like VUI tests, integrations tests, end-to-end tests, and validation tests that we cannot run in localhost only with our code. This is why we need to deploy the Alexa Skill to the development stage.
These step are automated in the continuous integration system (CircleCI) and are executed in each new version of the software.
Here you have the technologies used in this project
- ASK CLI - Install and configure ASK CLI.
- CircleCI Account - Sign up here.
- Node.js v10.x.
- Visual Studio Code.
The Alexa Skills Kit Command Line Interface (ASK CLI) is a tool for you to manage your Alexa skills and related resources, such as AWS Lambda functions. With ASK CLI, you have access to the Skill Management API, which allows you to manage Alexa skills programmatically from the command line. We will use this powerful tool to validate our Alexa Skill. Let's start!
The ASK CLI is included in the Docker image we are using so it is not necessary to install anything else.
In this step of the pipeline, we are going to deploy our Alexa Skill using the ASK CLI to the development stage. When you deploy your skill to the development stage, it will update the skill manifest, interaction models, buckets, in-skill-purchasing products ,and lambda to the Alexa Cloud and AWS. We can use the following commands in the ASK CLI to manage this deployment of our Alexa skill:
- For ask cli v1:
- For ask cli v2:
There are not reports defined in this job.
It is not necessary to integrate it in
The deploy job will execute the following tasks:
- Restore the code that we have used in the previous step in
- Copy the
- Execute the
npm run build-productioncommand that will install only the production libraries in the
ask deploy --debug --forcethat will deploy all the code in
src/folder as an AWS lambda.
- Persist again the code that we will reuse in the next job
Note: If you want to run successfully every ASK CLI command, you have to set up 5 environment variables:
And configure the
__ENVIRONMENT_ASK_PROFILE__ profile in your
How to obtain these variables and how to configure this profile are explained in this post.
- DevOps Wikipedia - Wikipedia reference
- Official Alexa Skill Management API Documentation - Alexa Skill Management API Documentation
- Official CircleCI Documentation - Official CircleCI Documentation
Thanks to the ASK CLI we can perform this complex task.
That’s all, folks!
You can find the code in my GitHub.
I hope it will be useful! If you have any doubts or questions, do not hesitate to contact me or put a comment below.
Opinions expressed by DZone contributors are their own.