@rlyle1179/serverless-aws-batch 1.0.31 → 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.
Files changed (2) hide show
  1. package/lib/docker.js +4 -3
  2. package/package.json +1 -1
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.31",
3
+ "version": "1.0.32",
4
4
  "description": "Serverless Framework Plugin for interacting with AWS Batch",
5
5
  "main": "index.js",
6
6
  "scripts": {