@rlyle1179/serverless-aws-batch 1.0.34 → 1.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,7 +7,7 @@ const path = require('path');
7
7
  const _ = require('lodash');
8
8
  var util = require('util');
9
9
 
10
- const expireRule = {
10
+ const lifeCyclePolicies = {
11
11
  "rules": [
12
12
  {
13
13
  "rulePriority": 1,
@@ -30,43 +30,45 @@ const expireRule = {
30
30
  * during deployment.
31
31
  */
32
32
  function generateCoreTemplate() {
33
- // Setup our ECR Repository to delete untagged images after 1 day
34
- const ecrTemplate = `
33
+ // Setup our ECR Repository to delete untagged images after 1 day
34
+ const ecrTemplate = `
35
35
  {
36
36
  "Type" : "AWS::ECR::Repository",
37
37
  "Properties" : {
38
38
  "LifecyclePolicy" : {
39
- "LifecyclePolicyText" : ${JSON.stringify(expireRule)}
39
+ "LifecyclePolicyText" : "${JSON.stringify(lifeCyclePolicies)}"
40
40
  },
41
41
  "RepositoryName" : "${this.provider.naming.getECRRepositoryName()}"
42
42
  }
43
43
  }
44
44
  `;
45
45
 
46
- const newECRObject = {
47
- [this.provider.naming.getECRLogicalId()]: JSON.parse(ecrTemplate)
48
- };
46
+ console.log("ecrTemplate:", ecrTemplate );
47
+
48
+ const newECRObject = {
49
+ [this.provider.naming.getECRLogicalId()]: JSON.parse(ecrTemplate)
50
+ };
49
51
 
50
- // Add it to our initial compiled cloud formation templates
51
- _.merge(
52
- this.serverless.service.provider.compiledCloudFormationTemplate.Resources,
53
- newECRObject
54
- );
52
+ // Add it to our initial compiled cloud formation templates
53
+ _.merge(
54
+ this.serverless.service.provider.compiledCloudFormationTemplate.Resources,
55
+ newECRObject
56
+ );
55
57
 
56
- // Then write it back out to the file
57
- const coreTemplateFileName = this.provider.naming.getCoreTemplateFileName();
58
+ // Then write it back out to the file
59
+ const coreTemplateFileName = this.provider.naming.getCoreTemplateFileName();
58
60
 
59
- const coreTemplateFilePath = path.join(this.serverless.config.servicePath,
60
- '.serverless',
61
- coreTemplateFileName);
61
+ const coreTemplateFilePath = path.join(this.serverless.config.servicePath,
62
+ '.serverless',
63
+ coreTemplateFileName);
62
64
 
63
- this.serverless.utils.writeFileSync(coreTemplateFilePath,
64
- this.serverless.service.provider.compiledCloudFormationTemplate);
65
+ this.serverless.utils.writeFileSync(coreTemplateFilePath,
66
+ this.serverless.service.provider.compiledCloudFormationTemplate);
65
67
 
66
- this.serverless.service.provider.coreCloudFormationTemplate =
67
- _.cloneDeep(this.serverless.service.provider.compiledCloudFormationTemplate);
68
+ this.serverless.service.provider.coreCloudFormationTemplate =
69
+ _.cloneDeep(this.serverless.service.provider.compiledCloudFormationTemplate);
68
70
 
69
- return BbPromise.resolve();
71
+ return BbPromise.resolve();
70
72
  }
71
73
 
72
74
  module.exports = { generateCoreTemplate };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlyle1179/serverless-aws-batch",
3
- "version": "1.0.34",
3
+ "version": "1.0.37",
4
4
  "description": "Serverless Framework Plugin for interacting with AWS Batch",
5
5
  "main": "index.js",
6
6
  "scripts": {