Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Je 56110 #19

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
6 changes: 6 additions & 0 deletions manifest.jps
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,13 @@ actions:
targetEnv: ${env.envName}

delete-redeploy-script:
- script: |
return {
result: 0,
appid: api.dev.apps.CreatePersistence ? "${env.appid}" : appid
}
lazarenkoalexey marked this conversation as resolved.
Show resolved Hide resolved
- jelastic.dev.scripting.DeleteScript:
appid: ${response.appid}
name: ${env.envName}-${globals.scriptName}
lazarenkoalexey marked this conversation as resolved.
Show resolved Hide resolved
- web-hook:
act: delete
Expand Down
5 changes: 3 additions & 2 deletions scripts/create-redeploy-script.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.hivext.api.utils.Random;

var buildEnv = "${env.envName}";
var appidValue = api.dev.apps.CreatePersistence ? "${env.appid}" : appid;
lazarenkoalexey marked this conversation as resolved.
Show resolved Hide resolved

//reading script from URL
var scriptBody = new Transport().get(url)
Expand Down Expand Up @@ -72,10 +73,10 @@

var scriptName = "${env.envName}-${globals.scriptName}";
//delete the script if it exists already
jelastic.dev.scripting.DeleteScript(scriptName);
jelastic.dev.scripting.DeleteScript(appidValue, session, scriptName);
lazarenkoalexey marked this conversation as resolved.
Show resolved Hide resolved

//create a new script
var resp = jelastic.dev.scripting.CreateScript(scriptName, 'js', scriptBody);
var resp = jelastic.dev.scripting.CreateScript(appidValue, session, scriptName, 'js', scriptBody);
lazarenkoalexey marked this conversation as resolved.
Show resolved Hide resolved
if (resp.result != 0) return resp;

//get app host
Expand Down