From ded302cf07dbf01a688418f06c4216cf7d37b516 Mon Sep 17 00:00:00 2001 From: Blaize Kaye Date: Fri, 31 Jan 2025 11:24:51 +1300 Subject: [PATCH 1/3] adds basic parsing of deploy output result --- action.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/action.py b/action.py index 5fe74b5..c48c19a 100644 --- a/action.py +++ b/action.py @@ -90,7 +90,11 @@ def deploy_environment(project_name, environment_name, buildVars, wait_till_depl debugLog(f"Running Lagoon CLI command: {lagoon_command}") # Call the Lagoon CLI command and capture the output - build_id = run_lagoon_command(lagoon_command) + output = run_lagoon_command(lagoon_command) + + # grab buildid + result_json = json.loads(output) + build_id = result_json["result"] debugLog(f"Deployment initiated. Build ID: {build_id}") @@ -120,7 +124,9 @@ def deploy_pull_request(project_name, pr_title, pr_number, baseBranchName, baseB debugLog(f"Running Lagoon CLI command: {lagoon_command}") # Call the Lagoon CLI command and capture the output - build_id = run_lagoon_command(lagoon_command) + output = run_lagoon_command(lagoon_command) + result_json = json.loads(output) + build_id = result_json["result"] debugLog(f"Deployment initiated. Build ID: {build_id}") From 82edaf19f5298cc4334914430ce08a30509b235d Mon Sep 17 00:00:00 2001 From: Blaize Kaye Date: Fri, 31 Jan 2025 12:57:15 +1300 Subject: [PATCH 2/3] updates cli to v0.31.4 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2ae80a9..3c25833 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ # Use the uselagoon/lagoon-cli as a base image # FROM uselagoon/lagoon-cli as base -FROM ghcr.io/uselagoon/lagoon-cli:v0.31.3 as base +FROM ghcr.io/uselagoon/lagoon-cli:v0.31.4 as base RUN apk update && apk upgrade && apk add python3 py3-pip From 0d5398b108fbbe81fca688ae8ad388cfc6eba915 Mon Sep 17 00:00:00 2001 From: Blaize Kaye Date: Fri, 31 Jan 2025 13:26:26 +1300 Subject: [PATCH 3/3] updates README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2f8eba3..f030434 100644 --- a/README.md +++ b/README.md @@ -180,7 +180,7 @@ jobs: uses: actions/checkout@v2 - name: Lagoon Upsert Variable - uses: uselagoon/lagoon-action@v1 + uses: uselagoon/lagoon-action@v1.0.1 with: action: 'upsert_variable' ssh_private_key: ${{ secrets.LAGOON_SSH_PRIVATE_KEY }}