mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-13 00:13:09 -06:00
ITPLT-4544 fix template check logic
This commit is contained in:
@@ -36,13 +36,11 @@ pipelines:
|
|||||||
name: Check if the template is up-to-date
|
name: Check if the template is up-to-date
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
actual_scenario_count=$(find ./roles -type f -name "molecule.yml" -exec dirname {} ';' | wc -l | sed -e 's/^[[:space:]]*//')
|
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
|
if ! grep -q "Running tests in ${actual_scenario_count} batches" bitbucket-pipelines.yml; then
|
||||||
GREP_RETURN_CODE=$?
|
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."
|
||||||
if [[ $GREP_RETURN_CODE -ne 0 ]]; then
|
exit 1
|
||||||
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."
|
fi
|
||||||
exit $GREP_RETURN_CODE
|
|
||||||
fi
|
|
||||||
|
|
||||||
- parallel:
|
- parallel:
|
||||||
- step:
|
- step:
|
||||||
|
|||||||
@@ -36,13 +36,11 @@ pipelines:
|
|||||||
name: Check if the template is up-to-date
|
name: Check if the template is up-to-date
|
||||||
script:
|
script:
|
||||||
- |
|
- |
|
||||||
actual_scenario_count=$(find ./roles -type f -name "molecule.yml" -exec dirname {} ';' | wc -l | sed -e 's/^[[:space:]]*//')
|
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
|
if ! grep -q "Running tests in ${actual_scenario_count} batches" bitbucket-pipelines.yml; then
|
||||||
GREP_RETURN_CODE=$?
|
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."
|
||||||
if [[ $GREP_RETURN_CODE -ne 0 ]]; then
|
exit 1
|
||||||
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."
|
fi
|
||||||
exit $GREP_RETURN_CODE
|
|
||||||
fi
|
|
||||||
|
|
||||||
- parallel:
|
- parallel:
|
||||||
{% for spath in scenario_paths %}
|
{% for spath in scenario_paths %}
|
||||||
|
|||||||
Reference in New Issue
Block a user