Skip to content

Commit

Permalink
Refactor impacted area test script var
Browse files Browse the repository at this point in the history
  • Loading branch information
opcoder0 committed Jan 31, 2025
1 parent 24f03a0 commit e401a69
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ steps:
sudo apt-get -o DPkg::Lock::Timeout=600 update && sudo apt-get -o DPkg::Lock::Timeout=600 -y install jq
TEST_SCRIPTS=$(echo "$TEST_SCRIPTS" | jq -r -c '."${{ parameters.TOPOLOGY }}_checker"')
if [[ $? -ne 0 || -z "$TEST_SCRIPTS" ]]; then
echo "$TEST_SCRIPTS" > /tmp/ts.json
echo "TEST_SCRIPTS value from file:"
cat /tmp/ts.json
TEST_SCRIPTS=$(jq -r -c '."${{ parameters.TOPOLOGY }}_checker"' temp.json)
rm /tmp/ts.json
if [[ -z "$TEST_SCRIPTS" ]]; then
echo "##vso[task.complete result=Failed;]Get test scripts of specfic topology fails."
exit 1
fi
SCRIPTS=$(echo "$TEST_SCRIPTS" | jq -r '. | join(",")')
echo -n "##vso[task.setvariable variable=SCRIPTS]$SCRIPTS"
displayName: "Get ${{ parameters.TOPOLOGY }} test scripts"
Expand Down

0 comments on commit e401a69

Please sign in to comment.