wp-mb-kit/scripts/common.yml

19 lines
971 B
YAML
Raw Normal View History

2024-04-26 15:38:56 +00:00
actions:
applyEnvSettings:
script: |
var envs = '${this.targetAppid}'.split(',');
2024-09-20 16:03:27 +00:00
for (var i=0, n = envs.length; i < n; i++) {
let targetAppid = envs[i];
let resp = jelastic.env.control.GetEnvInfo(targetAppid, session);
if (resp.result != 0) return resp;
let node = resp.nodes[0];
if (String(node.flexibleCloudlets) != '${this.cloudlets}') {
resp = jelastic.env.control.SetCloudletsCountByGroup({ appid: targetAppid, session: session, nodeGroup: node.nodeGroup, fixedCloudlets: node.fixedCloudlets, flexibleCloudlets: '${this.cloudlets}'});
if (resp.result != 0) return resp;
2024-09-19 16:08:04 +00:00
}
2024-09-20 16:03:27 +00:00
if (String(node.diskLimit) != '${this.diskspace}') {
resp = jelastic.env.control.SetDiskLimitByGroup({ appid: targetAppid, session: session, nodeGroup: node.nodeGroup, limit: '${this.diskspace}' });
if (resp.result != 0) return resp;
2024-04-26 15:38:56 +00:00
}
}
2024-09-20 16:03:27 +00:00
return { result: 0 };