Include parameters in baseStack check for aws
parent
901eaaf581
commit
8b77b3c5c3
|
|
@ -547,15 +547,21 @@ class AWSBuildEnvironment {
|
|||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const baseStackName = this.baseStackName;
|
||||
const baseStack = fs.readFileSync(`${__dirname}/cloud-formations/base-setup.yml`, 'utf8');
|
||||
const hash = crypto.createHash('md5').update(baseStack).digest('hex');
|
||||
// Cloud Formation Input
|
||||
const describeStackInput = {
|
||||
StackName: baseStackName,
|
||||
};
|
||||
const parameters = [
|
||||
const parametersWithoutHash = [
|
||||
{ ParameterKey: 'EnvironmentName', ParameterValue: baseStackName },
|
||||
{ ParameterKey: 'Storage', ParameterValue: `${baseStackName}-storage` },
|
||||
{ ParameterKey: 'Version', ParameterValue: hash },
|
||||
];
|
||||
const hash = crypto
|
||||
.createHash('md5')
|
||||
.update(baseStack + JSON.stringify(parametersWithoutHash))
|
||||
.digest('hex');
|
||||
const parameters = [
|
||||
...parametersWithoutHash,
|
||||
...[{ ParameterKey: 'Version', ParameterValue: hash }],
|
||||
];
|
||||
const updateInput = {
|
||||
StackName: baseStackName,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -253,16 +253,22 @@ class AWSBuildEnvironment implements CloudRunnerProviderInterface {
|
|||
async setupBaseStack(CF: SDK.CloudFormation) {
|
||||
const baseStackName = this.baseStackName;
|
||||
const baseStack = fs.readFileSync(`${__dirname}/cloud-formations/base-setup.yml`, 'utf8');
|
||||
const hash = crypto.createHash('md5').update(baseStack).digest('hex');
|
||||
|
||||
// Cloud Formation Input
|
||||
const describeStackInput: SDK.CloudFormation.DescribeStacksInput = {
|
||||
StackName: baseStackName,
|
||||
};
|
||||
const parameters: SDK.CloudFormation.Parameter[] = [
|
||||
const parametersWithoutHash: SDK.CloudFormation.Parameter[] = [
|
||||
{ ParameterKey: 'EnvironmentName', ParameterValue: baseStackName },
|
||||
{ ParameterKey: 'Storage', ParameterValue: `${baseStackName}-storage` },
|
||||
{ ParameterKey: 'Version', ParameterValue: hash },
|
||||
];
|
||||
const hash = crypto
|
||||
.createHash('md5')
|
||||
.update(baseStack + JSON.stringify(parametersWithoutHash))
|
||||
.digest('hex');
|
||||
const parameters: SDK.CloudFormation.Parameter[] = [
|
||||
...parametersWithoutHash,
|
||||
...[{ ParameterKey: 'Version', ParameterValue: hash }],
|
||||
];
|
||||
const updateInput: SDK.CloudFormation.UpdateStackInput = {
|
||||
StackName: baseStackName,
|
||||
|
|
|
|||
Loading…
Reference in New Issue