From bb2ba9ca0323b8cc2002ef372e07995f09b3e356 Mon Sep 17 00:00:00 2001 From: Piotr Mlocek Date: Sun, 15 Mar 2026 00:49:37 -0700 Subject: [PATCH] ci(release): avoid python in GitLab trigger steps --- .github/workflows/branch-checks.yml | 13 +++---------- .github/workflows/release-dev.yml | 13 +++---------- .github/workflows/release-tag.yml | 13 +++---------- 3 files changed, 9 insertions(+), 30 deletions(-) diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 51dc2de3a..699d9e80d 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -124,13 +124,6 @@ jobs: -F "variables[RELEASE_KIND]=dev" \ -F "variables[WHEEL_FILENAMES]=${WHEEL_FILENAMES}" \ "${GITLAB_CI_TRIGGER_URL}") - RESPONSE_JSON="$response" python - <<'PY' - import json - import os - - response = json.loads(os.environ["RESPONSE_JSON"]) - print( - f"Triggered GitLab pipeline {response['id']} " - f"with status={response['status']}" - ) - PY + pipeline_id=$(printf '%s' "$response" | sed -n 's/.*"id":\([0-9][0-9]*\).*/\1/p') + pipeline_status=$(printf '%s' "$response" | sed -n 's/.*"status":"\([^"]*\)".*/\1/p') + echo "Triggered GitLab pipeline ${pipeline_id:-unknown} with status=${pipeline_status:-unknown}" diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml index e6ebe5683..98b116b4f 100644 --- a/.github/workflows/release-dev.yml +++ b/.github/workflows/release-dev.yml @@ -507,13 +507,6 @@ jobs: -F "variables[RELEASE_KIND]=dev" \ -F "variables[WHEEL_FILENAMES]=${WHEEL_FILENAMES}" \ "${GITLAB_CI_TRIGGER_URL}") - RESPONSE_JSON="$response" python - <<'PY' - import json - import os - - response = json.loads(os.environ["RESPONSE_JSON"]) - print( - f"Triggered GitLab pipeline {response['id']} " - f"with status={response['status']}" - ) - PY + pipeline_id=$(printf '%s' "$response" | sed -n 's/.*"id":\([0-9][0-9]*\).*/\1/p') + pipeline_status=$(printf '%s' "$response" | sed -n 's/.*"status":"\([^"]*\)".*/\1/p') + echo "Triggered GitLab pipeline ${pipeline_id:-unknown} with status=${pipeline_status:-unknown}" diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index 3e7538f53..d62d3a307 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -532,13 +532,6 @@ jobs: -F "variables[RELEASE_KIND]=stable" \ -F "variables[WHEEL_FILENAMES]=${WHEEL_FILENAMES}" \ "${GITLAB_CI_TRIGGER_URL}") - RESPONSE_JSON="$response" python - <<'PY' - import json - import os - - response = json.loads(os.environ["RESPONSE_JSON"]) - print( - f"Triggered GitLab pipeline {response['id']} " - f"with status={response['status']}" - ) - PY + pipeline_id=$(printf '%s' "$response" | sed -n 's/.*"id":\([0-9][0-9]*\).*/\1/p') + pipeline_status=$(printf '%s' "$response" | sed -n 's/.*"status":"\([^"]*\)".*/\1/p') + echo "Triggered GitLab pipeline ${pipeline_id:-unknown} with status=${pipeline_status:-unknown}"