Skip to content

Commit

Permalink
fix jq processing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
zainasir committed Jan 15, 2025
1 parent 286cc39 commit 8bbd59c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,12 @@ jobs:
COUNT=$(jq '[.[] | select(.severity == "$SEVERITY_THRESHOLD")] | length' master_report.sbom)
cd cbioportal-test
if [ $COUNT -eq 0 ]; then
jq --arg msg "$SUCCESS_MESSAGE" --arg col "$SUCCESS_COLOR" '.message = $msg | .color = $col' security-status.json > security-status.json
jq --arg msg "$SUCCESS_MESSAGE" --arg col "$SUCCESS_COLOR" '.message = $msg | .color = $col' security-status.json > temp.json
else
jq --arg msg "$FAILURE_MESSAGE" --arg col "$FAILURE_COLOR" '.message = $msg | .color = $col' security-status.json > security-status.json
jq --arg msg "$FAILURE_MESSAGE" --arg col "$FAILURE_COLOR" '.message = $msg | .color = $col' security-status.json > temp.json
fi
echo "security-status.json has been updated."
mv temp.json security-status.json
echo "security-status.json has been updated:"
cat security-status.json | jq
- run:
name: Push new security status to cbioportal/cbioportal-test
Expand Down

0 comments on commit 8bbd59c

Please sign in to comment.