serverless-plugin-canary-deployments
Advanced tools
Comparing version 0.7.0 to 0.7.1
@@ -0,1 +1,5 @@ | ||
# 0.7.1 (14.11.2021) | ||
- Truncate deployment group name to 100 characters #139 | ||
- Add lambda permission to support function name ref #141 | ||
# 0.7.0 (09.09.2021) | ||
@@ -2,0 +6,0 @@ - Generate a Deployment Group Name in the format of ${stackName}-${logicalId} to avoid a circular dependency when used with the aws-alerts plugin #135 |
@@ -6,3 +6,3 @@ { | ||
}, | ||
"version": "0.7.0", | ||
"version": "0.7.1", | ||
"description": "A Serverless plugin to implement canary deployment of Lambda functions", | ||
@@ -9,0 +9,0 @@ "main": "serverless-plugin-canary-deployments.js", |
@@ -193,3 +193,3 @@ const _ = require('lodash/fp') | ||
getDeploymentGroupName (deploymentGroupLogicalId) { | ||
return `${this.naming.getStackName()}-${deploymentGroupLogicalId}` | ||
return `${this.naming.getStackName()}-${deploymentGroupLogicalId}`.slice(0, 100) | ||
} | ||
@@ -408,3 +408,7 @@ | ||
const isLambdaPermission = _.matchesProperty('Type', 'AWS::Lambda::Permission') | ||
const isPermissionForFunction = _.matchesProperty('Properties.FunctionName.Fn::GetAtt[0]', functionName) | ||
const isPermissionForFunction = _.cond([ | ||
[_.prop('Properties.FunctionName.Fn::GetAtt[0]'), _.matchesProperty('Properties.FunctionName.Fn::GetAtt[0]', functionName)], | ||
[_.prop('Properties.FunctionName.Ref'), _.matchesProperty('Properties.FunctionName.Ref', functionName)] | ||
]) | ||
const getPermissionForFunction = _.pipe( | ||
@@ -414,2 +418,3 @@ _.pickBy(isLambdaPermission), | ||
) | ||
return getPermissionForFunction(this.compiledTpl.Resources) | ||
@@ -416,0 +421,0 @@ } |
587008
78
20535