Open willfalconer opened 7 years ago
What do we think about having robin be an 'opt-out' feature rather than 'opt-in'. We should be able to pull all repos from the api and just iterate over that. Than the config value could be an exclusion list for repos we do not want to delete images from.
I agree, that is probably the best way forward. Lets build a little confidence with the repos we are testing on. Then roll it across all repos by default.
The opt out list should be configurable outside of handler.js though. I was thinking maybe using Env vars or a separate config file that we can then reference inside the serverless.yml file.
Agreed. A config file might be the way to go here. I am thinking a json file that contains an array of strings. Then the yml file having a reference to that config file.
exclusions.json
[ "repo1", "repo2" ]
serverless.yml
environment:
EXCLUSIONS: exclusions.json
that sounds ideal
Maybe this configuration file could also contain things like the account id, aws region and slack webhook url?
Yeah, I wouldn't mind doing something along the lines of loading config from env vars as well as a config.json
, just need to choose which takes precedence.
Load repositories from an env var