mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-1205: Simplify the pipelines generator.
This commit is contained in:
@@ -18,9 +18,10 @@ pipelines:
|
||||
- step:
|
||||
name: Pre Parallelization stage
|
||||
script:
|
||||
- echo "Running tests in {{ parallel_steps|length }} batches"
|
||||
- echo "Running tests in {{ scenario_paths|length }} batches"
|
||||
|
||||
- step:
|
||||
name: Check if number of batches match actual number of scenarios
|
||||
name: Check if the template is up-to-date
|
||||
script:
|
||||
- |
|
||||
actual_scenario_count=$(find ./roles -type f -name "molecule.yml" -exec dirname {} ';' | wc -l | sed -e 's/^[[:space:]]*//')
|
||||
@@ -30,14 +31,15 @@ pipelines:
|
||||
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
|
||||
fi
|
||||
|
||||
- parallel:
|
||||
{% for parallel_step in parallel_steps -%}
|
||||
{% for spath in scenario_paths -%}
|
||||
- step:
|
||||
name: {{ parallel_step.name }}
|
||||
name: {{ spath.parts[2] }}/{{ spath.parts[4] }}
|
||||
services:
|
||||
- docker
|
||||
script:
|
||||
{% for scriptCommand in parallel_step.scriptCommands -%}
|
||||
- {{ scriptCommand }}
|
||||
{% endfor %}
|
||||
- ./bin/install-ansible --dev
|
||||
- cd roles/{{ spath.parts[2] }}
|
||||
- molecule test -s {{ spath.parts[4] }}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user