Reputation: 1401
Hello I am new to Alexa Skill Kit deployment using ask-cli. I just want to know if there are any deployment practices in place where we have different configurations i.e skills.json
and .ask/config
For example, I have a repository some-alexa-skill
with 2 branches: staging and production.
staging
has this configuration for the skills.json
{
"skillManifest": {
"publishingInformation": {
"locales": {
"en-US": {
"name": "staging"
}
},
"isAvailableWorldwide": true,
"distributionCountries": []
},
"apis": {
"custom": {
"endpoint": {
"uri": "staging",
"sourceDir": "lambda/custom"
}
}
},
"manifestVersion": "1.0"
}
}
while production
has this:
{
"skillManifest": {
"publishingInformation": {
"locales": {
"en-US": {
"name": "production"
}
},
"isAvailableWorldwide": true,
"distributionCountries": []
},
"apis": {
"custom": {
"endpoint": {
"uri": "production",
"sourceDir": "lambda/custom"
}
}
},
"manifestVersion": "1.0"
}
}
As I can observe skill.json
should be "ignored" in the git respository since it will be replaced whenever merges occur during "release to production". I'm thinking of just ignoring skills.json
and just change it when I want to deploy. But I am also considering the ability to allow others to deploy it in their own machines.
Any suggestions on how should I approach this using ask-cli
?
Upvotes: 0
Views: 325
Reputation: 1164
Using the API should allow you to control your source and target destinations however you like. Using "profiles" will allow you to keep separate sets of credentials also.
There are 2 different levels of control when using the ask-cli. One is high level, and simplifies creating, cloning, and updating skills. These use the format:
A lower level API is available that allows more specific control. These use the format "ask api ..." and allow you to specify for example the specific file to upload/download to/from. I've found these better for projects with staging, develop, testing branches, etc.
In all of the ask commands, you can provide a profile that specifies the credentials for the Alexa developer account and the AWS account for the Lambda. Use the "ask init" to set these up. I keep separate profiles for:
The Amazon doc is pretty well written, and explains how to use the ask-cli. It just doesn't go into why you would use multiple profiles, etc.
I hope this helps. Start with the Amazon ask-cli quick start then follow the links to the reference documentation.
One thing to be careful about is to make sure that you are using the latest ask-cli download. As of today it is 1.0.0-beta.4. You can use the "ask -v" command to display your installed version. There were problems with the deploy command in the earlier 1.0.0-beta.1 version.
Upvotes: 2