@rlyle1179/serverless-aws-batch 1.0.29 → 1.0.32

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.
package/lib/batchtask.js CHANGED
@@ -69,8 +69,6 @@ function compileBatchTask(functionName) {
69
69
  // Now replace the original lambda function with code to invoke this batch task
70
70
  generateLambdaScheduleArtifact.bind(this)(functionName);
71
71
 
72
- console.log("this.serverless.config:", JSON.stringify(this.serverless.config, null, 4 ));
73
-
74
72
  _.merge(
75
73
  this.serverless.service.functions,
76
74
  {
package/lib/docker.js CHANGED
@@ -10,7 +10,7 @@ const { getDockerLoginToECRCommand } = require('./awscli');
10
10
  * @returns {string} "<ECR Repo Name>:latest"
11
11
  */
12
12
  function getDockerImageName() {
13
- return `${this.provider.naming.getECRRepositoryURL()}:latest`;
13
+ return `${this.provider.naming.getECRRepositoryURL()}:${Date.now()}`;
14
14
  }
15
15
 
16
16
  /**
@@ -51,7 +51,8 @@ function dockerCommand(options, cwd = null, stdio = null) {
51
51
  * https://hub.docker.com/r/lambci/lambda/
52
52
  */
53
53
  function buildDockerImage() {
54
- this.serverless.cli.log(`Building docker image: "${this.provider.naming.getDockerImageName()}"...`);
54
+ let image = this.provider.naming.getDockerImageName();
55
+ this.serverless.cli.log(`Building docker image: "${image}"...`);
55
56
 
56
57
  // Get any additional run commands we'd like to include in the docker image
57
58
  let additionalRunCommands = "";
@@ -95,7 +96,7 @@ function buildDockerImage() {
95
96
  const dockerFile = path.join(packagePath, 'Dockerfile');
96
97
  fse.writeFileSync(dockerFile, dockerFileContents);
97
98
 
98
- const dockerOptions = ['build', '-f', dockerFile, '-t', this.provider.naming.getDockerImageName(), '.'];
99
+ const dockerOptions = ['build', '-f', dockerFile, '-t', image, '.'];
99
100
  dockerCommand(dockerOptions, packagePath, 'inherit');
100
101
 
101
102
  return BbPromise.resolve();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rlyle1179/serverless-aws-batch",
3
- "version": "1.0.29",
3
+ "version": "1.0.32",
4
4
  "description": "Serverless Framework Plugin for interacting with AWS Batch",
5
5
  "main": "index.js",
6
6
  "scripts": {