marcy-terui / serverless-alexa-skills

Manage your Alexa Skills with Serverless Framework
https://www.npmjs.com/package/serverless-alexa-skills
MIT License
71 stars 13 forks source link

Add option to override location of token #16

Closed danielrbradley closed 6 years ago

danielrbradley commented 6 years ago

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

  1. Change the path of the token to be stored within the repository.
  2. Ignore the custom token path from being committed.
  3. Before each build, fetch a cached copy of the token and restore it to the custom path within the checked-out directory.
marcy-terui commented 6 years ago
  1. 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.

  1. Ignore the custom token path from being committed.
  2. 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

danielrbradley commented 6 years ago

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.