From 52cd9bb3031bdc443e5f1ab44ee14c07a0769833 Mon Sep 17 00:00:00 2001 From: Henadii Sychevskyi Date: Tue, 2 Sep 2025 13:32:16 +0200 Subject: [PATCH 1/5] Update manifest.jps --- manifest.jps | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.jps b/manifest.jps index e902329..17bb072 100644 --- a/manifest.jps +++ b/manifest.jps @@ -3,7 +3,7 @@ version: 1.7 id: git-push-deploy name: Git-Push-Deploy Add-On homepage: https://www.virtuozzo.com/application-platform-docs/git-push-deploy/ -baseUrl: https://cdn.jsdelivr.net/gh/jelastic-jps/git-push-deploy@master +baseUrl: https://raw.githubusercontent.com/sych74/git-push-deploy/refs/heads/JE-72978 description: text: /text/description.md short: Simple CI/CD pipeline for Git projects. From 543882f3cdc0420027eb2a4712f1a73aa08f79fa Mon Sep 17 00:00:00 2001 From: Sychevskyi Henadii Date: Mon, 29 Sep 2025 15:39:42 +0200 Subject: [PATCH 2/5] JE-72978 --- scripts/redeploy.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/redeploy.cs b/scripts/redeploy.cs index b23672c..4f1600f 100644 --- a/scripts/redeploy.cs +++ b/scripts/redeploy.cs @@ -1,4 +1,5 @@ //@req(token, action) +import com.hivext.api.server.system.service.utils.EnvironmentStatus; if (token == "${TOKEN}") { var targetEnv = "${TARGET_ENV}", nodeGroup = "${NODE_GROUP}", @@ -12,6 +13,16 @@ build = ${BUILD}, context = "${CONTEXT}"; + + var resp = jelastic.env.control.GetEnvInfo(envName, session); + if (resp.result != 0) return resp; + var status = resp.env.status; + var isEnvRunning = status == EnvironmentStatus['ENV_STATUS_TYPE_RUNNING'].getValue() ? true : false; + + if (!isEnvRunning) { + return {result: 99, error: "Environment is not running. Current status: " + status, type: "warning"}; + } + if (action == 'redeploy') { if (certified) { return {result:99, error: 'redeploy action triggers automatically for certified containers', type: 'warning'}; From a7a7d1070f49115f7ea93a936595546d27d32c8c Mon Sep 17 00:00:00 2001 From: Sychevskyi Henadii Date: Mon, 29 Sep 2025 16:01:57 +0200 Subject: [PATCH 3/5] JE-72978 --- scripts/redeploy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/redeploy.cs b/scripts/redeploy.cs index 4f1600f..40bae79 100644 --- a/scripts/redeploy.cs +++ b/scripts/redeploy.cs @@ -20,7 +20,7 @@ var isEnvRunning = status == EnvironmentStatus['ENV_STATUS_TYPE_RUNNING'].getValue() ? true : false; if (!isEnvRunning) { - return {result: 99, error: "Environment is not running. Current status: " + status, type: "warning"}; + return {result: 99, error: 'environment is not running', type: "warning"}; } if (action == 'redeploy') { From 913a6c9d0e4efb579236527497e1d14941f951f6 Mon Sep 17 00:00:00 2001 From: Sychevskyi Henadii Date: Mon, 6 Oct 2025 19:47:01 +0200 Subject: [PATCH 4/5] JE-72978 --- scripts/redeploy.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/redeploy.cs b/scripts/redeploy.cs index 40bae79..0cac90a 100644 --- a/scripts/redeploy.cs +++ b/scripts/redeploy.cs @@ -20,7 +20,10 @@ var isEnvRunning = status == EnvironmentStatus['ENV_STATUS_TYPE_RUNNING'].getValue() ? true : false; if (!isEnvRunning) { - return {result: 99, error: 'environment is not running', type: "warning"}; + if (jelastic.marketplace && jelastic.marketplace.console) { + jelastic.marketplace.console.WriteLog(appid, session, "GIT-PUSH-DEPLOY ERROR: environment is not running"); + } + return { result: 0 }; } if (action == 'redeploy') { From bc787401a95004953f5c0a4e2c80c6961b5176cc Mon Sep 17 00:00:00 2001 From: Henadii Sychevskyi Date: Tue, 7 Oct 2025 13:06:54 +0200 Subject: [PATCH 5/5] JE-72978 --- scripts/redeploy.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/redeploy.cs b/scripts/redeploy.cs index 0cac90a..5fc03ce 100644 --- a/scripts/redeploy.cs +++ b/scripts/redeploy.cs @@ -21,7 +21,7 @@ if (!isEnvRunning) { if (jelastic.marketplace && jelastic.marketplace.console) { - jelastic.marketplace.console.WriteLog(appid, session, "GIT-PUSH-DEPLOY ERROR: environment is not running"); + jelastic.marketplace.console.WriteLog(appid, session, "GIT-PUSH-DEPLOY: environment is not running"); } return { result: 0 }; }