Skip to content

Commit

Permalink
Try #73:
Browse files Browse the repository at this point in the history
  • Loading branch information
bors[bot] authored Nov 10, 2021
2 parents e487eb1 + 42dc6a2 commit 463d6ef
Showing 1 changed file with 13 additions and 11 deletions.
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:${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

0 comments on commit 463d6ef

Please sign in to comment.