Skip to content

Commit 621fa05

Browse files
committed
wip
1 parent 70de574 commit 621fa05

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/scripts/pipeline-queue.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
22
tmp=${TMP_DIR:-/tmp}
3-
tmp="/tmp"
43
workflows_file="${tmp}/workflow_status.json"
54

65
# logger command for debugging
@@ -21,8 +20,8 @@ load_variables(){
2120
if [ -z "${CIRCLECI_API_TOKEN}" ]; then
2221
echo "CIRCLECI_API_TOKEN not set. Private projects will be inaccessible."
2322
else
24-
fetch "https://circleci.com/api/v2/me" "/tmp/me.cci"
25-
me=$(jq -e '.id' /tmp/me.cci)
23+
fetch "https://circleci.com/api/v2/me" "${tmp}/me.cci"
24+
me=$(jq -e '.id' "${tmp}/me.cci")
2625
echo "Using API key for user: ${me}"
2726
fi
2827
}

src/scripts/validate.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env bash
22

33
#TODO: figure out how to pack these files in ci
4+
tmp=${TMP_DIR:-/tmp}
45

56
# ensure we have the required variables present to execute
67
load_variables(){
@@ -12,8 +13,8 @@ load_variables(){
1213
if [ -z "${CIRCLECI_API_TOKEN}" ]; then
1314
echo "CIRCLECI_API_TOKEN not set. Private projects will be inaccessible."
1415
else
15-
fetch "https://circleci.com/api/v2/me" "/tmp/me.cci"
16-
me=$(jq -e '.id' /tmp/me.cci)
16+
fetch "https://circleci.com/api/v2/me" "${tmp}/me.cci"
17+
me=$(jq -e '.id' "${tmp}/me.cci")
1718
echo "Using API key for user: ${me}"
1819
fi
1920
}
@@ -56,4 +57,4 @@ load_variables
5657
fetch_pipeline_workflows
5758

5859
# compare workflows
59-
jq '.items | sort_by(.stopped_at) | .[].name | select(.name | startswith("test"))' "${pipeline_detail}"
60+
jq '.items | sort_by(.stopped_at) | .[].name | select(. | startswith("test-pipeline"))' "${pipeline_detail}"

0 commit comments

Comments
 (0)