New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add uploaded file name to log while AWS deploy #5495

Merged
merged 2 commits into from Jan 23, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.
+5 −2
Diff settings

Always

Just for now

@@ -116,7 +116,10 @@ module.exports = {


return BbPromise.map(artifactFilePaths, (artifactFilePath) => { return BbPromise.map(artifactFilePaths, (artifactFilePath) => {
const stats = fs.statSync(artifactFilePath); const stats = fs.statSync(artifactFilePath);
this.serverless.cli.log(`Uploading service .zip file to S3 (${filesize(stats.size)})...`); const fileName = path.basename(artifactFilePath);
this.serverless.cli.log(
`Uploading service ${fileName} file to S3 (${filesize(stats.size)})...`
);
return this.uploadZipFile(artifactFilePath); return this.uploadZipFile(artifactFilePath);
}, { concurrency: NUM_CONCURRENT_UPLOADS } }, { concurrency: NUM_CONCURRENT_UPLOADS }
); );
@@ -324,7 +324,7 @@ describe('uploadArtifacts', () => {
sinon.spy(awsDeploy.serverless.cli, 'log'); sinon.spy(awsDeploy.serverless.cli, 'log');


return awsDeploy.uploadFunctionsAndLayers().then(() => { return awsDeploy.uploadFunctionsAndLayers().then(() => {
const expected = 'Uploading service .zip file to S3 (1 KB)...'; const expected = 'Uploading service new-service.zip file to S3 (1 KB)...';
expect(awsDeploy.serverless.cli.log.calledWithExactly(expected)).to.be.equal(true); expect(awsDeploy.serverless.cli.log.calledWithExactly(expected)).to.be.equal(true);
}); });
}); });
ProTip! Use n and p to navigate between commits in a pull request.