set drone to default (#3081)

This commit is contained in:
Yan 2017-08-18 18:33:44 +08:00 committed by GitHub
parent f6eea98261
commit cf63f75de4

View File

@ -50,29 +50,24 @@ if [ $DRONE_REPO != "vmware/harbor" ]; then
exit 1 exit 1
fi fi
# default running mode...
if [[ $DRONE_BRANCH == "master" || $DRONE_BRANCH == *"refs/tags"* || $DRONE_BRANCH == "releases/"* ]] && [[ $DRONE_BUILD_EVENT == "push" || $DRONE_BUILD_EVENT == "tag" ]]; then if [[ $DRONE_BRANCH == "master" || $DRONE_BRANCH == *"refs/tags"* || $DRONE_BRANCH == "releases/"* ]] && [[ $DRONE_BUILD_EVENT == "push" || $DRONE_BUILD_EVENT == "tag" ]]; then
## -------------- Package installer with clean code ----------------- ## -------------- Package installer with clean code -----------------
echo "Package Harbor build." echo "Package Harbor build."
pybot --removekeywords TAG:secret --include Bundle tests/robot-cases/Group0-Distro-Harbor pybot --removekeywords TAG:secret --include Bundle tests/robot-cases/Group0-Distro-Harbor
echo "Running full CI for $DRONE_BUILD_EVENT on $DRONE_BRANCH" echo "Running full CI for $DRONE_BUILD_EVENT on $DRONE_BRANCH"
pybot -v ip:$container_ip --removekeywords TAG:secret --include BAT tests/robot-cases/Group0-BAT pybot -v ip:$container_ip --removekeywords TAG:secret --include BAT tests/robot-cases/Group0-BAT
elif (echo $buildinfo | grep -q "\[specific ci="); then elif (echo $buildinfo | grep -q "\[Specific CI="); then
buildtype=$(echo $buildinfo | grep "\[specific ci=") buildtype=$(echo $buildinfo | grep "\[Specific CI=")
testsuite=$(echo $buildtype | awk -v FS="(=|])" '{print $2}') testsuite=$(echo $buildtype | awk -v FS="(=|])" '{print $2}')
pybot -v ip:$container_ip --removekeywords TAG:secret --suite $testsuite --suite Regression tests/robot-cases pybot -v ip:$container_ip --removekeywords TAG:secret --suite $testsuite --suite Regression tests/robot-cases
elif (echo $buildinfo | grep -q "\[full ci\]"); then elif (echo $buildinfo | grep -q "\[Full CI\]"); then
upload_build=true upload_build=true
pybot -v ip:$container_ip --removekeywords TAG:secret --exclude skip tests/robot-cases pybot -v ip:$container_ip --removekeywords TAG:secret --exclude skip tests/robot-cases
elif (echo $buildinfo | grep -q "\[BAT\]"); then elif (echo $buildinfo | grep -q "\[Skip CI\]"); then
upload_build=true echo "Skip CI."
pybot -v ip:$container_ip --removekeywords TAG:secret --include BAT tests/robot-cases/Group0-BAT
elif (echo $buildinfo | grep -q "\[Nightly\]"); then
upload_build=true
nightly_run=false
pybot -v ip:$container_ip --removekeywords TAG:secret --include BAT tests/robot-cases/Group0-BAT
else else
echo "Please specify the tests, otherwise no case will be triggered." # default mode is BAT.
pybot -v ip:$container_ip --removekeywords TAG:secret --include BAT tests/robot-cases/Group0-BAT
fi fi
rc="$?" rc="$?"