mirror of
https://github.com/NVIDIA/OpenShell.git
synced 2026-10-29 07:23:25 +08:00
ci(release): trim GitLab trigger output
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user