Closed danielrbradley closed 6 years ago
- Change the path of the token to be stored within the repository.
I think we should add an option to change it and set the default value to the previous value ($HOME/.serverless) to the option.
- Ignore the custom token path from being committed.
- Before each build, fetch a cached copy of the token and restore it to the custom path within the checked-out directory.
I think that this is not the scope of this plugin. Do you have any idea? @danielrbradley
Yes, that sounds like a good plan.
Yes the "Example solution" is not part of the scope of this change - just an example of why a user might change the path.
Use case
When using a CI/CD pipeline to deploy Alexa skills, I want to put the token at a path within my repository so it's isolated from other builds that are running.
Problem
If I'm managing a number of different skills and they're built/deployed on the same server, writing the token to the current user's home directory could cause a race condition if two skills are built at the same time. This would cause one deployment to fail.
Example solution