Closed fgnass closed 6 years ago
Hi @fgnass, great suggestion.
One idea: Did you know you can add specific elements of e.g. the skill.json
to your app.json
? Take a look at our templates for Audioplayer Skills and Skill Events.
Anything else that you need to maintain manually that we should make possible to add to the app.json
? I agree that having a "single source of truth" is the best way to work in a team, especially with staging.
No, I didn't know! That already helps a lot. The only thing left is probably the .ask/config
file that contains the skill-ids/endpoints for the different deployment targets. What are your best practices for working with multiple stages and a team of developers?
We just launched staging last week 🎉. Unfortunately, we're still in the process of documenting it. Here are the PRs for the framework and CLI.
Here's an example app.json
:
{
"alexaSkill": {
"nlu": "alexa"
},
"src": "src",
"defaultStage": "dev",
"stages": {
"dev": {
"endpoint": "${JOVO_WEBHOOK_URL}",
"alexaSkill": {
"skillId": "amzn1.ask.skill.XXX"
}
},
"test": {
"endpoint": "arn:aws:lambda:us-east-1:XXX",
"alexaSkill": {
"skillId": "amzn1.ask.skill.XXXX",
"ask-profile": "someprofile"
},
"config": {
"db": {
"type": "dynamodb",
"tableName": "SomeTableName"
}
}
}
}
}
Let me know if anything's missing!
Perfect timing and works like a charm!
In our setup each developer uses their own skill-id. Would you suggest to create a stage for each or would it make sense to add something like ${SKILL_ID}
that gets resolved against process.env?
Yes, this would make sense. Currently working on our v1.2
update, but hope to get env support out soon after that
I'm thinking of something like ${ENV.SKILL_ID}.
Thanks @fgnass! This was added to the latest release, take a look at the docs here: https://www.jovo.tech/framework/docs/advanced#staging-example
${process.env.SKILL_ID}
We currently .gitignore the whole
/platforms
folder and consider/models
to be our single source of truth. Unfortunately this approach is currently not really feasible since some files (skill.json, agent.json, .ask/config) must be manually maintained. Our current solution is to copy/create these files as part of ournpm run build
script. Would you be open to the idea to generate these files fromapp.json
?