Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression in token parameterization [semver:patch] #73

Merged
merged 5 commits into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/@orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@ description: |
This is ideal for deployments or other activities that must not run concurrently.
May optionaly consider branch-level isolation if unique branches should run concurrently.
This orb requires the project to have an API key in order to query build states.

1.6.3: addresses API changes that broke branch-job queueing, adds more API checks
1.6.1: fixes issue in tag matching , thanks @calvin-summer
1.6.0: Support Tags, thanks @nikolaik, @dunial
1.5.0: API variables name as parameter , thanks @philnielson
1.4.4: Docs improvements, thanks @jordan-brough
1.4.3: more confident confidence thanks @GreshamDanielStephens
1.4.2: Doc improvements, thanks @olleolleolle
1.4.1: fixes bug in block-workflow as job. thanks @mu-bro
1.4.0: Adds confidence checks to avoid race condition
1.3.0: use small resource class in job




display:
home_url: https://eddiewebb.github.io/circleci-queue/
Expand Down
24 changes: 13 additions & 11 deletions src/commands/until_front_of_line.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ steps:
name: Queue Until Front of Line
command: |
fetch(){
echo "DEBUG: Making API Call to ${1}"
url=$1
target=$2
http_response=$(curl -f -s -X GET -H "Circle-Token:${<< parameters.circleci-api-key >>}" -o "${target}" -w "%{http_code}" "${url}")
if [ $http_response != "200" ]; then
echo "ERROR: Server returned error code: $http_response"
cat ${target}
else
echo "DEBUG: API Success"
fi
}
load_variables(){
# just confirm our required variables are present
: ${CIRCLE_BUILD_NUM:?"Required Env Variable not found!"}
Expand All @@ -59,17 +72,6 @@ steps:
VCS_TYPE="<<parameters.vcs-type>>"
}
fetch(){
url=$1
target=$2
http_response=$(curl -f -s -X GET -H "Circle-Token:${CIRCLECI_API_KEY}" -o "${target}" -w "%{http_code}" "${url}")
if [ $http_response != "200" ]; then
echo "ERROR: Server returned error code: $http_response"
cat ${target}
else
echo "DEBUG: API Success"
fi
}
fetch_filtered_active_builds(){
if [ "<<parameters.consider-branch>>" != "true" ];then
Expand Down