Skip to content

Commit

Permalink
Merge pull request #1238 from ORNL/1236-bug-job-not-failing-with-setu…
Browse files Browse the repository at this point in the history
…p-script

Throw error if OpenStack error code returned from API
  • Loading branch information
JoshuaSBrown authored Jan 16, 2025
2 parents 39814b4 + 03aa9a6 commit 812c2bf
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 7 deletions.
20 changes: 19 additions & 1 deletion .gitlab/end_to_end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -444,46 +444,64 @@ end_to_end_web_test:
- cmake --build build --target end_to_end_web_tests

end_to_end_error_discovery_arango:
needs: ["check-ci-infrastructure", "end-to-end-arango-setup"]
stage: log
tags:
- ci-datafed-arango
script:
- sudo journalctl --no-pager -u arangodb3.service
rules:
- when: always
- job: check-ci-infrastructure
when: on_success

end_to_end_error_discovery_gcs:
needs: ["check-ci-infrastructure", "end-to-end-gcs-authz-setup"]
extends: .error_logs_client_end_to_end
variables:
PROJECT: "datafed"
COMPONENT: "gcs"
tags:
- ci-datafed-globus
- docker
rules:
- job: check-ci-infrastructure
when: on_success

end_to_end_error_discovery_repo:
needs: ["check-ci-infrastructure", "end-to-end-repo-setup"]
extends: .error_logs_client_end_to_end
variables:
PROJECT: "datafed"
COMPONENT: "repo"
tags:
- ci-datafed-globus
- docker
rules:
- job: check-ci-infrastructure
when: on_success

end_to_end_error_discovery_core:
needs: ["check-ci-infrastructure", "end-to-end-core-setup"]
extends: .error_logs_client_end_to_end
variables:
PROJECT: "datafed"
COMPONENT: "core"
tags:
- ci-datafed-core
- docker
rules:
- job: check-ci-infrastructure
when: on_success

end_to_end_error_discovery_web:
needs: ["check-ci-infrastructure", "end-to-end-ws-setup"]
extends: .error_logs_client_end_to_end
variables:
PROJECT: "datafed"
COMPONENT: "ws"
tags:
- ci-datafed-core
- docker
rules:
- job: check-ci-infrastructure
when: on_success
2 changes: 1 addition & 1 deletion external/protobuf
Submodule protobuf updated 1498 files
12 changes: 7 additions & 5 deletions scripts/ci_pipeline_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ Help()
echo "-a, --gitlab-api-token The GitLab API token for checking the"
echo " status of a pipeline."
}

GITLAB_PROJECT_ID="10830"

OS_APP_ID=$(printenv OS_APP_ID || true)
Expand Down Expand Up @@ -145,7 +144,7 @@ data=$(curl -s --retry 5 -i -X POST \
}
}" \
https://orc-open.ornl.gov:13000/v3/auth/tokens)
error_code=$?
error_code="$?"
if [ "$error_code" == "6" ]
then
echo "Unable to connect to Open Stack API endpoints, make sure you are"
Expand Down Expand Up @@ -226,17 +225,20 @@ find_orc_instance_by_name() {
found_vm_id="TRUE"
fi
}
body=$(echo "$data" | sed -n 's/^\({\".*\)/\1/p')

body=$(echo $data | sed 's/^.*{\"token/{\"token/' )
if jq -e 'has("error")' <<< "$body" > /dev/null; then
echo "Error Detected!"
echo "$body" | jq
exit 2
fi

compute_url=$(echo "$body" | jq '.token.catalog[] | select(.name=="nova") |.endpoints[] | select(.interface=="public") | .url ')
sanitize_compute_url=$(echo $compute_url | sed 's/\"//g')
header=$(echo "$data" | sed 's/{\"token.*//')
subject_token=$(echo "$data" | grep "X-Subject-Token" | awk '{print $2}' )

sanitize_subject_token=${subject_token:0:268}


################################################################################
# Check 1 - Are there running pipelines
################################################################################
Expand Down

0 comments on commit 812c2bf

Please sign in to comment.