mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 08:53:07 -06:00
DCD-621: Cleans up comments & extracts batch number to a variable
This commit is contained in:
@@ -4,8 +4,9 @@ set -e
|
|||||||
#set -x
|
#set -x
|
||||||
|
|
||||||
# Install dev packages from Pipfile.lock if necessary.
|
# Install dev packages from Pipfile.lock if necessary.
|
||||||
#pipenv sync --dev
|
pipenv sync --dev
|
||||||
|
|
||||||
|
BATCH_SIZE=3
|
||||||
BATCH_NUMBER=""
|
BATCH_NUMBER=""
|
||||||
batch_args="$1"
|
batch_args="$1"
|
||||||
|
|
||||||
@@ -31,20 +32,14 @@ esac
|
|||||||
scenarios=( $(ls -d1 roles/**/molecule/* | sort) )
|
scenarios=( $(ls -d1 roles/**/molecule/* | sort) )
|
||||||
|
|
||||||
offset=$(( ${BATCH_NUMBER} - 1))
|
offset=$(( ${BATCH_NUMBER} - 1))
|
||||||
test_start_index=$(( ${offset} * 3 ))
|
test_start_index=$(( ${offset} * $BATCH_SIZE ))
|
||||||
|
scenario_batch="${scenarios[@]:$test_start_index:$BATCH_SIZE}"
|
||||||
|
|
||||||
for scenario in "${scenarios[@]:$test_start_index:3}"; do
|
echo "Scenarios that will be executed as part of this batch: ${scenario_batch}"
|
||||||
|
|
||||||
|
for scenario in ${scenario_batch}; do
|
||||||
pushd $(dirname $(dirname $scenario))
|
pushd $(dirname $(dirname $scenario))
|
||||||
pipenv run \
|
pipenv run \
|
||||||
molecule test --all
|
molecule test --all
|
||||||
popd
|
popd
|
||||||
done;
|
done;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#for role in `find roles/ -name molecule | sort`; do
|
|
||||||
# pushd `dirname $role`
|
|
||||||
# pipenv run \
|
|
||||||
# molecule test --all
|
|
||||||
# popd
|
|
||||||
#done
|
|
||||||
|
|||||||
Reference in New Issue
Block a user