-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from Asymmetrik/feature/secret-cachebusting
Feature/secret cachebusting
- Loading branch information
Showing
4 changed files
with
121 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
'use strict'; | ||
|
||
var Q = require('q'); | ||
|
||
var config = require('../../config'); | ||
var logger = config.logger; | ||
|
||
var cliHelpers = require('../helpers'); | ||
|
||
var secretTasks = require('../../lib/secret-tasks'); | ||
|
||
module.exports = function(program) { | ||
program.command('secret-refresh') | ||
.arguments('<environment>') | ||
.description('Cache bust all secrets in an environment') | ||
.action(function(environment) { | ||
var runtimeOptions = this.opts(); | ||
runtimeOptions.environment = environment; | ||
|
||
Q.when(runtimeOptions) | ||
.then(cliHelpers.setup()) | ||
.then(cliHelpers.lint) | ||
.then(secretTasks.verify) | ||
.then(secretTasks.setupSecretCenter) | ||
.then(secretTasks.refreshSecrets) | ||
.catch(function (err) { | ||
logger.error(err.message); | ||
}); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters