From 12fec69da3a9e16413a1531e2663b5dba27772d3 Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Wed, 2 Aug 2023 10:46:33 +0300 Subject: [PATCH 01/14] JE-56110 --- scripts/create-redeploy-script.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/create-redeploy-script.cs b/scripts/create-redeploy-script.cs index 3fe9541..794c244 100644 --- a/scripts/create-redeploy-script.cs +++ b/scripts/create-redeploy-script.cs @@ -5,6 +5,7 @@ import com.hivext.api.utils.Random; var buildEnv = "${env.envName}"; +var appidValue = (${fn.compareEngine(8.4-1)} >= 1) ? "${env.appid}" : appid; //reading script from URL var scriptBody = new Transport().get(url) @@ -75,7 +76,8 @@ jelastic.dev.scripting.DeleteScript(scriptName); //create a new script -var resp = jelastic.dev.scripting.CreateScript(scriptName, 'js', scriptBody); +api.marketplace.console.Writelog("appidValue->" + appidValue); +var resp = jelastic.dev.scripting.CreateScript(appidValue, session, scriptName, 'js', scriptBody); if (resp.result != 0) return resp; //get app host From d9ba8a96343cd4f7414811a66bdc60a590b39996 Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Wed, 2 Aug 2023 10:55:53 +0300 Subject: [PATCH 02/14] JE-56110 --- manifest.jps | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/manifest.jps b/manifest.jps index 8a2f21c..4e3fd8c 100644 --- a/manifest.jps +++ b/manifest.jps @@ -145,7 +145,13 @@ actions: targetEnv: ${env.envName} delete-redeploy-script: + - script: | + return { + result: 0, + appid: ${fn.compareEngine(8.4-1)} >= 1 ? "${env.appid}" : appid + } - jelastic.dev.scripting.DeleteScript: + appid: ${response.appid} name: ${env.envName}-${globals.scriptName} - web-hook: act: delete From 38a73fba91e8245f55ae1f380cbf33c5cf439234 Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Wed, 2 Aug 2023 12:32:42 +0300 Subject: [PATCH 03/14] JE-56110 --- scripts/create-redeploy-script.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create-redeploy-script.cs b/scripts/create-redeploy-script.cs index 794c244..dab1b3b 100644 --- a/scripts/create-redeploy-script.cs +++ b/scripts/create-redeploy-script.cs @@ -76,7 +76,7 @@ jelastic.dev.scripting.DeleteScript(scriptName); //create a new script -api.marketplace.console.Writelog("appidValue->" + appidValue); +api.marketplace.console.WriteLog("appidValue->" + appidValue); var resp = jelastic.dev.scripting.CreateScript(appidValue, session, scriptName, 'js', scriptBody); if (resp.result != 0) return resp; From 479eda989b47cdf18d7a83496fdd0251f169867b Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Wed, 2 Aug 2023 13:36:51 +0300 Subject: [PATCH 04/14] Update create-redeploy-script.cs --- scripts/create-redeploy-script.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/create-redeploy-script.cs b/scripts/create-redeploy-script.cs index dab1b3b..4350580 100644 --- a/scripts/create-redeploy-script.cs +++ b/scripts/create-redeploy-script.cs @@ -6,6 +6,9 @@ var buildEnv = "${env.envName}"; var appidValue = (${fn.compareEngine(8.4-1)} >= 1) ? "${env.appid}" : appid; +//TEST +appidValue = "${env.appid}"; +//TEST //reading script from URL var scriptBody = new Transport().get(url) From 58cea47bb33a87506b677f53ed1255a5ecc31233 Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Wed, 2 Aug 2023 15:51:16 +0300 Subject: [PATCH 05/14] JE-56110 --- scripts/create-redeploy-script.cs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/create-redeploy-script.cs b/scripts/create-redeploy-script.cs index 4350580..321ef79 100644 --- a/scripts/create-redeploy-script.cs +++ b/scripts/create-redeploy-script.cs @@ -6,9 +6,6 @@ var buildEnv = "${env.envName}"; var appidValue = (${fn.compareEngine(8.4-1)} >= 1) ? "${env.appid}" : appid; -//TEST -appidValue = "${env.appid}"; -//TEST //reading script from URL var scriptBody = new Transport().get(url) @@ -79,7 +76,6 @@ jelastic.dev.scripting.DeleteScript(scriptName); //create a new script -api.marketplace.console.WriteLog("appidValue->" + appidValue); var resp = jelastic.dev.scripting.CreateScript(appidValue, session, scriptName, 'js', scriptBody); if (resp.result != 0) return resp; From ec5eca75c7523886f76d5939c5ff2643620bbdbb Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Thu, 3 Aug 2023 11:32:14 +0300 Subject: [PATCH 06/14] JE-56110 --- manifest.jps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.jps b/manifest.jps index 4e3fd8c..0d07000 100644 --- a/manifest.jps +++ b/manifest.jps @@ -148,7 +148,7 @@ actions: - script: | return { result: 0, - appid: ${fn.compareEngine(8.4-1)} >= 1 ? "${env.appid}" : appid + appid: api.dev.apps.CreatePersistence ? "${env.appid}" : appid } - jelastic.dev.scripting.DeleteScript: appid: ${response.appid} From f9363d1a7c6aba627acd77c206e906ec4dab2b60 Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Thu, 3 Aug 2023 11:33:45 +0300 Subject: [PATCH 07/14] JE-56110 --- scripts/create-redeploy-script.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/create-redeploy-script.cs b/scripts/create-redeploy-script.cs index 321ef79..2bbef05 100644 --- a/scripts/create-redeploy-script.cs +++ b/scripts/create-redeploy-script.cs @@ -5,7 +5,7 @@ import com.hivext.api.utils.Random; var buildEnv = "${env.envName}"; -var appidValue = (${fn.compareEngine(8.4-1)} >= 1) ? "${env.appid}" : appid; +var appidValue = api.dev.apps.CreatePersistence ? "${env.appid}" : appid; //reading script from URL var scriptBody = new Transport().get(url) @@ -73,7 +73,7 @@ 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); //create a new script var resp = jelastic.dev.scripting.CreateScript(appidValue, session, scriptName, 'js', scriptBody); From f56d2c943bd57ec04e6d1438ed4404b422a1ed10 Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Sun, 20 Aug 2023 01:31:06 +0300 Subject: [PATCH 08/14] JE-56110 Co-authored-by: Slava Katiukha --- manifest.jps | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/manifest.jps b/manifest.jps index 0d07000..adf735a 100644 --- a/manifest.jps +++ b/manifest.jps @@ -146,10 +146,10 @@ actions: delete-redeploy-script: - script: | - return { - result: 0, - appid: api.dev.apps.CreatePersistence ? "${env.appid}" : appid - } + return api.dev.scripting.DeleteScript({ + appid: api.dev.apps.CreatePersistence ? "${env.appid}" : appid, + name: "${env.envName}-${globals.scriptName}" + }); - jelastic.dev.scripting.DeleteScript: appid: ${response.appid} name: ${env.envName}-${globals.scriptName} From fcbadc4acff3c849da67ace31b4f42b7c10892a1 Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Sun, 20 Aug 2023 01:31:35 +0300 Subject: [PATCH 09/14] JE-56110 --- manifest.jps | 1 - 1 file changed, 1 deletion(-) diff --git a/manifest.jps b/manifest.jps index adf735a..96c53b8 100644 --- a/manifest.jps +++ b/manifest.jps @@ -151,7 +151,6 @@ actions: name: "${env.envName}-${globals.scriptName}" }); - jelastic.dev.scripting.DeleteScript: - appid: ${response.appid} name: ${env.envName}-${globals.scriptName} - web-hook: act: delete From 050a28275cb315e45b178713fe397abf94e2bb57 Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Sun, 20 Aug 2023 01:31:55 +0300 Subject: [PATCH 10/14] JE-56110 Co-authored-by: Slava Katiukha --- scripts/create-redeploy-script.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create-redeploy-script.cs b/scripts/create-redeploy-script.cs index 2bbef05..524adfe 100644 --- a/scripts/create-redeploy-script.cs +++ b/scripts/create-redeploy-script.cs @@ -73,7 +73,7 @@ var scriptName = "${env.envName}-${globals.scriptName}"; //delete the script if it exists already -jelastic.dev.scripting.DeleteScript(appidValue, session, scriptName); +api.dev.scripting.DeleteScript(targetAppid, session, scriptName); //create a new script var resp = jelastic.dev.scripting.CreateScript(appidValue, session, scriptName, 'js', scriptBody); From a26169b97b08f604cd421749ba3fc6c9c6387dfe Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Sun, 20 Aug 2023 01:32:01 +0300 Subject: [PATCH 11/14] JE-56110 Co-authored-by: Slava Katiukha --- scripts/create-redeploy-script.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create-redeploy-script.cs b/scripts/create-redeploy-script.cs index 524adfe..aa0ab2c 100644 --- a/scripts/create-redeploy-script.cs +++ b/scripts/create-redeploy-script.cs @@ -5,7 +5,7 @@ import com.hivext.api.utils.Random; var buildEnv = "${env.envName}"; -var appidValue = api.dev.apps.CreatePersistence ? "${env.appid}" : appid; +var targetAppid = api.dev.apps.CreatePersistence ? "${env.appid}" : appid; //reading script from URL var scriptBody = new Transport().get(url) From b6683d70efe7235a8e65bc87c0dc1c01b842dbf7 Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Sun, 20 Aug 2023 01:32:16 +0300 Subject: [PATCH 12/14] JE-56110 Co-authored-by: Slava Katiukha --- scripts/create-redeploy-script.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create-redeploy-script.cs b/scripts/create-redeploy-script.cs index aa0ab2c..6706f46 100644 --- a/scripts/create-redeploy-script.cs +++ b/scripts/create-redeploy-script.cs @@ -76,7 +76,7 @@ api.dev.scripting.DeleteScript(targetAppid, session, scriptName); //create a new script -var resp = jelastic.dev.scripting.CreateScript(appidValue, session, scriptName, 'js', scriptBody); +var resp = jelastic.dev.scripting.CreateScript(targetAppid, session, scriptName, 'js', scriptBody); if (resp.result != 0) return resp; //get app host From 11573257b8c1984da9b2ffd9f10581dc86b7d860 Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Mon, 30 Oct 2023 11:54:33 +0200 Subject: [PATCH 13/14] JE-56110 --- manifest.jps | 2 -- 1 file changed, 2 deletions(-) diff --git a/manifest.jps b/manifest.jps index 96c53b8..a84d9fb 100644 --- a/manifest.jps +++ b/manifest.jps @@ -150,8 +150,6 @@ actions: appid: api.dev.apps.CreatePersistence ? "${env.appid}" : appid, name: "${env.envName}-${globals.scriptName}" }); - - jelastic.dev.scripting.DeleteScript: - name: ${env.envName}-${globals.scriptName} - web-hook: act: delete - if (nodes.build): From f01929015a1692e15ad31128338188b49c25959e Mon Sep 17 00:00:00 2001 From: "alexey.lazarenko" Date: Wed, 1 Nov 2023 16:31:04 +0200 Subject: [PATCH 14/14] JE-56110 --- scripts/create-redeploy-script.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create-redeploy-script.cs b/scripts/create-redeploy-script.cs index 6706f46..7889cb6 100644 --- a/scripts/create-redeploy-script.cs +++ b/scripts/create-redeploy-script.cs @@ -88,7 +88,7 @@ call : { procedure : next, params : { - appid : appid, + appid : targetAppid, host : host, token : token }