Skip to content

Commit

Permalink
fix jq parsing error
Browse files Browse the repository at this point in the history
  • Loading branch information
zainasir committed Jan 15, 2025
1 parent 99de943 commit 3b7b8d1
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -495,13 +495,17 @@ jobs:
COUNT=$(jq '[.[] | select(.severity == "$SEVERITY_THRESHOLD")] | length' master_report.sbom)
cd cbioportal-test
if [ $COUNT -eq 0 ]; then
MESSAGE=$SUCCESS_MESSAGE
COLOR=$SUCCESS_COLOR
jq --arg msg "$SUCCESS_MESSAGE" --arg col "$SUCCESS_COLOR" '.message = $msg | .color = $col' security-status.json > security-status.json
else
MESSAGE=$FAILURE_MESSAGE
COLOR=$FAILURE_COLOR
jq --arg msg "$FAILURE_MESSAGE" --arg col "$FAILURE_COLOR" '.message = $msg | .color = $col' security-status.json > security-status.json
fi
jq '.message = $MESSAGE | .color = $COLOR' security-status.json > security-status.json
echo "security-status.json has been updated."
cat security-status.json
- run:
name: Push new security status to cbioportal/cbioportal-test
command: |
cd cbioportal-test
git diff
git add -A
git commit -m "Update security status"
git push
Expand Down

0 comments on commit 3b7b8d1

Please sign in to comment.