ITPLT-4544 fix template check logic

This commit is contained in:
Lee Goolsbee
2025-09-26 10:30:51 -05:00
parent dda6d7c93d
commit 52c84f656e
2 changed files with 10 additions and 14 deletions

View File

@@ -37,11 +37,9 @@ pipelines:
script:
- |
actual_scenario_count=$(find ./roles -type f -name "molecule.yml" -exec dirname {} ';' | wc -l | sed -e 's/^[[:space:]]*//')
grep "Running tests in ${actual_scenario_count} batches" bitbucket-pipelines.yml
GREP_RETURN_CODE=$?
if [[ $GREP_RETURN_CODE -ne 0 ]]; then
echo "Mismatch between expected and actual number [${actual_scenario_count}] of scenarios. Please look at https://bitbucket.org/atlassian/dc-deployments-automation/src/master/DEVELOPMENT.md for instructions on how to fix this error."
exit $GREP_RETURN_CODE
if ! grep -q "Running tests in ${actual_scenario_count} batches" bitbucket-pipelines.yml; then
echo "Mismatch between expected (39) and actual number (${actual_scenario_count}) of scenarios. Please look at https://bitbucket.org/atlassian/dc-deployments-automation/src/master/DEVELOPMENT.md for instructions on how to fix this error."
exit 1
fi
- parallel:

View File

@@ -37,11 +37,9 @@ pipelines:
script:
- |
actual_scenario_count=$(find ./roles -type f -name "molecule.yml" -exec dirname {} ';' | wc -l | sed -e 's/^[[:space:]]*//')
grep "Running tests in ${actual_scenario_count} batches" bitbucket-pipelines.yml
GREP_RETURN_CODE=$?
if [[ $GREP_RETURN_CODE -ne 0 ]]; then
echo "Mismatch between expected and actual number [${actual_scenario_count}] of scenarios. Please look at https://bitbucket.org/atlassian/dc-deployments-automation/src/master/DEVELOPMENT.md for instructions on how to fix this error."
exit $GREP_RETURN_CODE
if ! grep -q "Running tests in ${actual_scenario_count} batches" bitbucket-pipelines.yml; then
echo "Mismatch between expected ({{ scenario_paths|length }}) and actual number (${actual_scenario_count}) of scenarios. Please look at https://bitbucket.org/atlassian/dc-deployments-automation/src/master/DEVELOPMENT.md for instructions on how to fix this error."
exit 1
fi
- parallel: