Created
July 26, 2016 04:54
-
-
Save kristelteng/d53cc4a1034d0756417efd74190091c6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// some code above | |
let tgz = tarball.pipe(gzip); | |
let creds = await auth.awsS3Credentials('read-write', 'taskcluster-raw-docs', 'testing'); | |
aws.config.update(creds); | |
let s3obj = new aws.S3({params: {Bucket: 'taskcluster-raw-docs', Key: 'testing/latest.tar.gz'}}); | |
await new Promise((resolve, reject) => { | |
s3obj.upload({ | |
Body: tgz, | |
ACL: 'public-read'}, (err, data) => { | |
if (err) { | |
console.log(`error! ${err}`); | |
reject(); | |
} else { | |
resolve(); | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment