Skip to content

Commit

Permalink
Updated CIrcleCI test to use new header.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexSkrypnyk committed May 3, 2024
1 parent 29d3f9b commit 8575a5f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .scaffold/tests/bats/_helper.circleci.bash
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ circleci_get_previous_job_numbers() {
workflow_id="$(circleci_get_workflow_id_from_job_number "${current_job_number}")"

workflow_data="$(curl -sSL --request GET \
-H "Authorization: Basic $(echo -n "${TEST_CIRCLECI_TOKEN}" | base64)" \
--header "Circle-Token: $TEST_CIRCLECI_TOKEN" \
"https:/circleci.com/api/v2/workflow/${workflow_id}/job")"

dependencies_job_ids="$(echo "${workflow_data}" | jq -r ".items[] | select(.job_number == ${current_job_number}) | .dependencies[]")"
Expand All @@ -28,7 +28,7 @@ circleci_get_previous_job_numbers() {
#
circleci_get_workflow_id_from_job_number() {
curl -sSL --request GET \
-H "Authorization: Basic $(echo -n "${TEST_CIRCLECI_TOKEN}" | base64)" \
--header "Circle-Token: $TEST_CIRCLECI_TOKEN" \
"https:/circleci.com/api/v2/project/gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/job/${1}" |
jq -r '.latest_workflow.id'
}
Expand All @@ -38,7 +38,7 @@ circleci_get_workflow_id_from_job_number() {
#
circleci_get_job_artifacts() {
curl -sSL --request GET \
-H "Authorization: Basic $(echo -n "${TEST_CIRCLECI_TOKEN}" | base64)" \
--header "Circle-Token: $TEST_CIRCLECI_TOKEN" \
"https:/circleci.com/api/v2/project/gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${1}/artifacts"
}

Expand All @@ -47,6 +47,6 @@ circleci_get_job_artifacts() {
#
circleci_get_job_test_metadata() {
curl -sSL --request GET \
-H "Authorization: Basic $(echo -n "${TEST_CIRCLECI_TOKEN}" | base64)" \
--header "Circle-Token: $TEST_CIRCLECI_TOKEN" \
"https:/circleci.com/api/v2/project/gh/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}/${1}/tests"
}

1 comment on commit 8575a5f

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.