Skip to content

Commit 5a62132

Browse files
committed
Upload artifact to evergreen
1 parent 7a03e70 commit 5a62132

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

packages/build/src/evergreen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import fs from 'fs';
12
import path from 'path';
23
import S3 from 'aws-sdk/clients/s3';
34
import upload, { PUBLIC_READ } from './s3';
@@ -25,7 +26,7 @@ const uploadArtifactToEvergreen = (artifact: string, awsKey: string, awsSecret:
2526
ACL: PUBLIC_READ,
2627
Bucket: BUCKET,
2728
Key: `/${project}/${revision}/${path.basename(artifact)}`,
28-
Body: 'artifact'
29+
Body: fs.createReadStream(artifact);
2930
};
3031
console.log(`mongosh: uploading ${artifact} to evergreen`);
3132
return upload(uploadParams, s3);

packages/build/src/release.ts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os from 'os';
22
import Config from './config';
33
import compileExec from './compile-exec';
4+
import uploadArtifactToEvergreen from './evergreen';
45
import uploadDownloadCenterConfig from './download-center';
56
import Platform from './platform';
67
import zip from './zip';
@@ -33,13 +34,13 @@ const release = async(config: Config) => {
3334
// 3. Create PR for Homebrew (only on macos)
3435

3536
// 4. Upload artifacts to S3 for Evergreen and downloads.
36-
// await uploadArtifactToEvergreen(
37-
// artifact,
38-
// config.evgAwsKey,
39-
// config.evgAwsSecret,
40-
// config.project,
41-
// config.revision
42-
// );
37+
await uploadArtifactToEvergreen(
38+
artifact,
39+
config.evgAwsKey,
40+
config.evgAwsSecret,
41+
config.project,
42+
config.revision
43+
);
4344
// await uploadArtifactToDownloads();
4445

4546
// 5. Create Github release.

0 commit comments

Comments
 (0)