Skip to content

Commit

Permalink
Some bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
singiamtel committed Jan 13, 2025
1 parent 1d63721 commit eabaadd
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/build-any-ib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
steps:
- name: Launch the build-any-ib job in Jenkins and wait for completion
run: |

Check failure on line 58 in .github/workflows/build-any-ib.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC2034:warning:11:1: QUEUE_URL appears unused. Verify use (or export if used externally) ``` run: | ^~~~ ```

Check failure on line 58 in .github/workflows/build-any-ib.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC2036:warning:11:1: If you wanted to assign the output of the pipeline, use a=$(b | c) ``` run: | ^~~~ ```

Check failure on line 58 in .github/workflows/build-any-ib.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC1089:error:15:95: Parsing stopped here. Is this keyword correctly matched up? ``` run: | ^~~~ ```

Check failure on line 58 in .github/workflows/build-any-ib.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC2034:warning:11:1: QUEUE_URL appears unused. Verify use (or export if used externally) ``` run: | ^~~~ ```

Check failure on line 58 in .github/workflows/build-any-ib.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC2036:warning:11:1: If you wanted to assign the output of the pipeline, use a=$(b | c) ``` run: | ^~~~ ```

Check failure on line 58 in .github/workflows/build-any-ib.yml

View workflow job for this annotation

GitHub Actions / actionlint

shellcheck reported issue in this script: SC1089:error:15:95: Parsing stopped here. Is this keyword correctly matched up? ``` run: | ^~~~ ```
set -euo pipefail
# Login against SSO
TOKEN="$(curl --location -X POST "$SSO_AUTH_URL" \
--header 'Content-Type: application/x-www-form-urlencoded' \
Expand All @@ -69,11 +70,20 @@ jobs:
-H "Authorization: Bearer $TOKEN" \
--data "PACKAGE_NAME=$PACKAGE_NAME" \
--data "ALIDIST_SLUG=$ALIDIST_SLUG" \
--data "ARCHITECTURE=$ARCHITECTURE")
--data "ARCHITECTURE=$ARCHITECTURE") | grep -i "Location:" | awk '{print $2}' | tr -d '\r')
# Remove any trailing whitespace, change http to https
QUEUE_URL=$(echo "$QUEUE_URL" | xargs)
QUEUE_URL=$(echo "$QUEUE_URL" | sed 's/http/https/')
if [ -z "$QUEUE_URL" ]; then
echo "::error::Failed to get queue URL from Jenkins"
exit 1
fi
# Poll the queue item until we get the actual job URL
while true; do
QUEUE_RESPONSE=$(curl -s "$QUEUE_URL/api/json" -H "Authorization: Bearer $TOKEN")
QUEUE_RESPONSE=$(curl -L -s "$QUEUE_URL/api/json" -H "Authorization: Bearer $TOKEN")
if echo "$QUEUE_RESPONSE" | jq -e '.executable.url' > /dev/null; then
BUILD_URL=$(echo "$QUEUE_RESPONSE" | jq -r '.executable.url')
break
Expand All @@ -84,6 +94,8 @@ jobs:
echo "Job started at: $BUILD_URL"
BUILD_URL=$(echo "$BUILD_URL" | sed 's/alijenkins/alijenkins-api/')
while true; do
JOB_STATUS=$(curl -s "$BUILD_URL/api/json" -H "Authorization: Bearer $TOKEN" | jq -r '.result')
if [ "$JOB_STATUS" = "SUCCESS" ]; then
Expand Down

0 comments on commit eabaadd

Please sign in to comment.