Skip to content

Commit b0e1466

Browse files
authored
Fix failed ci not causing Drone job to fail (#8407)
We run general tests and custom iso test in two distinct job. So we should consider both two job return status as the drone job return status. Changed: We run custom iso test only if general tests being passed.
1 parent ee619cd commit b0e1466

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

tests/integration-test.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,23 @@ fi
5959

6060
if [[ $DRONE_BRANCH == "master" || $DRONE_BRANCH == "releases/"* ]] && [[ $DRONE_REPO == "vmware/vic" ]] && [[ $DRONE_BUILD_EVENT == "push" ]]; then
6161
echo "Running full CI for $DRONE_BUILD_EVENT on $DRONE_BRANCH"
62-
pabot --verbose --processes $jobs --removekeywords TAG:secret --exclude skip tests/test-cases
63-
test_custom_iso
62+
pabot --verbose --processes $jobs --removekeywords TAG:secret --exclude skip tests/test-cases && test_custom_iso
6463
elif [[ $DRONE_REPO == "vmware/vic" ]] && [[ $DRONE_BUILD_EVENT == "tag" ]]; then
6564
echo "Running only Group11-Upgrade and 7-01-Regression for $DRONE_BUILD_EVENT on $DRONE_BRANCH"
6665
pabot --verbose --processes $jobs --removekeywords TAG:secret --suite Group11-Upgrade --suite 7-01-Regression tests/test-cases
6766
elif (echo $prBody | grep -q "\[full ci\]"); then
6867
echo "Running full CI as per commit message"
69-
pabot --verbose --processes $jobs --removekeywords TAG:secret --exclude skip tests/test-cases
70-
test_custom_iso
68+
pabot --verbose --processes $jobs --removekeywords TAG:secret --exclude skip tests/test-cases && test_custom_iso
7169
elif (echo $prBody | grep -q "\[specific ci="); then
7270
echo "Running specific CI as per commit message"
7371
buildtype=$(echo $prBody | grep "\[specific ci=")
7472
testsuite=$(echo $buildtype | awk -F"\[specific ci=" '{sub(/\].*/,"",$2);print $2}')
75-
pabot --verbose --processes $jobs --removekeywords TAG:secret --suite $testsuite --suite 7-01-Regression tests/test-cases
73+
pabot --verbose --processes $jobs --removekeywords TAG:secret --suite $testsuite --suite 7-01-Regression tests/test-cases && \
7674
pabot --verbose --processes $jobs --removekeywords TAG:secret -v BOOTSTRAP-ISO:$bootstrapiso --outputdir $bootstrapdir --suite $testsuite --suite 7-01-Regression tests/test-cases
7775
else
7876
echo "Running regressions"
79-
pabot --verbose --processes $jobs --removekeywords TAG:secret --exclude skip --include regression tests/test-cases
80-
test_custom_iso
77+
pabot --verbose --processes $jobs --removekeywords TAG:secret --exclude skip --include regression tests/test-cases && \
78+
pabot --verbose --processes $jobs --removekeywords TAG:secret -v BOOTSTRAP-ISO:$bootstrapiso --outputdir $bootstrapdir --exclude skip --include regression tests/test-cases
8179
fi
8280

8381
rc="$?"

0 commit comments

Comments
 (0)