aws-delivlib 13.2.0 → 13.3.1

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.
@@ -115,7 +115,7 @@ export abstract class MirrorSource {
115
115
  }
116
116
 
117
117
  public bind(options: MirrorSourceBindOptions) {
118
- const asset = new s3Assets.Asset(options.scope, `BuildContext${this.directory}`, { path: this.directory! });
118
+ const asset = new s3Assets.Asset(options.scope, `BuildContext${this.directory}${JSON.stringify(opts.buildArgs ?? {})}`, { path: this.directory! });
119
119
  if (options.syncJob) {
120
120
  asset.grantRead(options.syncJob);
121
121
  }
@@ -128,11 +128,15 @@ export abstract class MirrorSource {
128
128
  Object.entries(opts.buildArgs).forEach(([k, v]) => cmdFlags.push('--build-arg', `${k}=${v}`));
129
129
  }
130
130
 
131
+ const zipFile = `${this.repositoryName}.zip`;
132
+ const tmpDir = this.repositoryName;
133
+
131
134
  return {
132
135
  commands: [
133
- `aws s3 cp ${asset.s3ObjectUrl} ${this.repositoryName}.zip`,
134
- `unzip ${this.repositoryName}.zip -d ${this.repositoryName}`,
135
- `docker build ${cmdFlags.join(' ')} ${this.repositoryName}`,
136
+ `rm -rf ${zipFile} ${tmpDir}`,
137
+ `aws s3 cp ${asset.s3ObjectUrl} ${zipFile}`,
138
+ `unzip ${zipFile} -d ${tmpDir}`,
139
+ `docker build ${cmdFlags.join(' ')} ${tmpDir}`,
136
140
  ],
137
141
  repositoryName: this.repositoryName,
138
142
  tag: this.tag,
package/package.json CHANGED
@@ -78,7 +78,7 @@
78
78
  ],
79
79
  "main": "lib/index.js",
80
80
  "license": "Apache-2.0",
81
- "version": "13.2.0",
81
+ "version": "13.3.1",
82
82
  "jest": {
83
83
  "testMatch": [
84
84
  "**/lib/__tests__/**/?(*.)+(spec|test).js?(x)"