|
|
|
@ -173,53 +173,4 @@ exports.deployApp = async function(ctx) { |
|
|
|
}) |
|
|
|
|
|
|
|
ctx.body = deployment |
|
|
|
|
|
|
|
// const instanceQuota = await getCurrentInstanceQuota(ctx.user.instanceId)
|
|
|
|
// const credentials = await verifyDeployment({
|
|
|
|
// instanceId: ctx.user.instanceId,
|
|
|
|
// appId: ctx.user.appId,
|
|
|
|
// quota: instanceQuota,
|
|
|
|
// })
|
|
|
|
|
|
|
|
// ctx.log.info(`Uploading assets for appID ${ctx.user.appId} assets to s3..`)
|
|
|
|
|
|
|
|
// if (credentials.errors) {
|
|
|
|
// ctx.throw(500, credentials.errors)
|
|
|
|
// return
|
|
|
|
// }
|
|
|
|
|
|
|
|
// await uploadAppAssets({
|
|
|
|
// clientId,
|
|
|
|
// appId: ctx.user.appId,
|
|
|
|
// instanceId: ctx.user.instanceId,
|
|
|
|
// ...credentials,
|
|
|
|
// })
|
|
|
|
|
|
|
|
// // replicate the DB to the couchDB cluster in prod
|
|
|
|
// ctx.log.info("Replicating local PouchDB to remote..")
|
|
|
|
// await replicateCouch({
|
|
|
|
// instanceId: ctx.user.instanceId,
|
|
|
|
// clientId,
|
|
|
|
// credentials: credentials.couchDbCreds,
|
|
|
|
// })
|
|
|
|
|
|
|
|
// await updateDeploymentQuota(credentials.quota)
|
|
|
|
|
|
|
|
// const deployment = await storeLocalDeploymentHistory({
|
|
|
|
// quota: credentials.quota,
|
|
|
|
// status: "SUCCESS",
|
|
|
|
// })
|
|
|
|
|
|
|
|
// ctx.body = {
|
|
|
|
// status: "SUCCESS",
|
|
|
|
// completed: Date.now(),
|
|
|
|
// }
|
|
|
|
// } catch (err) {
|
|
|
|
// ctx.throw(err.status || 500, `Deployment Failed: ${err.message}`)
|
|
|
|
// await storeLocalDeploymentHistory({
|
|
|
|
// appId: ctx.user.appId,
|
|
|
|
// instanceId: ctx.user.instanceId,
|
|
|
|
// status: "FAILURE",
|
|
|
|
// })
|
|
|
|
// }
|
|
|
|
} |
|
|
|
|