From b82d49264d16fb1ad46a747ffd032b65942ee815 Mon Sep 17 00:00:00 2001 From: Piotr Mlocek Date: Sun, 15 Mar 2026 00:48:15 -0700 Subject: [PATCH] ci(release): trim GitLab trigger output --- .github/workflows/branch-checks.yml | 16 ++++++++++++++-- .github/workflows/release-dev.yml | 16 ++++++++++++++-- .github/workflows/release-tag.yml | 16 ++++++++++++++-- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/.github/workflows/branch-checks.yml b/.github/workflows/branch-checks.yml index 2556c454f..51dc2de3a 100644 --- a/.github/workflows/branch-checks.yml +++ b/.github/workflows/branch-checks.yml @@ -111,8 +111,10 @@ jobs: WHEEL_FILENAMES: openshell-branch-check-py3-none-any.whl,openshell-branch-check-manylinux_x86_64.whl run: | set -euo pipefail - curl -X POST \ + response=$(curl -X POST \ --fail \ + --silent \ + --show-error \ -F "token=${GITLAB_CI_TRIGGER_TOKEN}" \ -F "ref=feat/ci-trigger-pipeline" \ -F "variables[PIPELINE_ACTION]=publish_wheels" \ @@ -121,4 +123,14 @@ jobs: -F "variables[RELEASE_VERSION]=branch-check-pr-${{ github.event.pull_request.number }}" \ -F "variables[RELEASE_KIND]=dev" \ -F "variables[WHEEL_FILENAMES]=${WHEEL_FILENAMES}" \ - "${GITLAB_CI_TRIGGER_URL}" + "${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 diff --git a/.github/workflows/release-dev.yml b/.github/workflows/release-dev.yml index 3a1c0f119..e6ebe5683 100644 --- a/.github/workflows/release-dev.yml +++ b/.github/workflows/release-dev.yml @@ -494,8 +494,10 @@ jobs: fi WHEEL_FILENAMES=$(printf '%s\n' "${wheel_files[@]##*/}" | paste -sd, -) - curl -X POST \ + response=$(curl -X POST \ --fail \ + --silent \ + --show-error \ -F "token=${GITLAB_CI_TRIGGER_TOKEN}" \ -F "ref=main" \ -F "variables[PIPELINE_ACTION]=publish_wheels" \ @@ -504,4 +506,14 @@ jobs: -F "variables[RELEASE_VERSION]=${RELEASE_VERSION}" \ -F "variables[RELEASE_KIND]=dev" \ -F "variables[WHEEL_FILENAMES]=${WHEEL_FILENAMES}" \ - "${GITLAB_CI_TRIGGER_URL}" + "${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 diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index df616be8b..3e7538f53 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -519,8 +519,10 @@ jobs: fi WHEEL_FILENAMES=$(printf '%s\n' "${wheel_files[@]##*/}" | paste -sd, -) - curl -X POST \ + response=$(curl -X POST \ --fail \ + --silent \ + --show-error \ -F "token=${GITLAB_CI_TRIGGER_TOKEN}" \ -F "ref=main" \ -F "variables[PIPELINE_ACTION]=publish_wheels" \ @@ -529,4 +531,14 @@ jobs: -F "variables[RELEASE_VERSION]=${RELEASE_VERSION}" \ -F "variables[RELEASE_KIND]=stable" \ -F "variables[WHEEL_FILENAMES]=${WHEEL_FILENAMES}" \ - "${GITLAB_CI_TRIGGER_URL}" + "${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