How to use the @clevercloud/client/cjs/api/application.js.setBuildInstanceFlavor function in @clevercloud/client

To help you get started, we’ve selected a few @clevercloud/client examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CleverCloud / clever-tools / src / models / application.js View on Github external
async function setBuildFlavor (appId, orgaId, buildInstanceSize) {
  Logger.info('Setting build size for app: ' + appId);
  if (buildInstanceSize !== null) {
    const body = { flavorName: buildInstanceSize };
    await setDedicatedBuildInstance(appId, orgaId, true);
    return application.setBuildInstanceFlavor({ id: orgaId, appId }, body).then(sendToApi);
  }
  else {
    Logger.info('No build size given, disabling dedicated build instance');
    return setDedicatedBuildInstance(appId, orgaId, false);
  }
};