diff --git a/shippable.yml b/shippable.yml index 1608ea3a13f..a369d53a5ac 100644 --- a/shippable.yml +++ b/shippable.yml @@ -63,7 +63,8 @@ matrix: - env: T=windows/2016/7 - env: T=windows/2019/7 - - env: T=network + - env: T=ios/csr1000v/1 + - env: T=vyos/1.1.8/1 - env: T=aix/7.2/1 - env: T=osx/10.11/1 diff --git a/test/integration/targets/ios_file/aliases b/test/integration/targets/ios_file/aliases new file mode 100644 index 00000000000..6bb69158a7a --- /dev/null +++ b/test/integration/targets/ios_file/aliases @@ -0,0 +1 @@ +shippable/ios/group1 diff --git a/test/integration/targets/ios_lacp/aliases b/test/integration/targets/ios_lacp/aliases new file mode 100644 index 00000000000..6bb69158a7a --- /dev/null +++ b/test/integration/targets/ios_lacp/aliases @@ -0,0 +1 @@ +shippable/ios/group1 diff --git a/test/integration/targets/ios_lldp_global/aliases b/test/integration/targets/ios_lldp_global/aliases new file mode 100644 index 00000000000..6bb69158a7a --- /dev/null +++ b/test/integration/targets/ios_lldp_global/aliases @@ -0,0 +1 @@ +shippable/ios/group1 diff --git a/test/integration/targets/vyos_banner/aliases b/test/integration/targets/vyos_banner/aliases index 539d9574add..8071e1f75b5 100644 --- a/test/integration/targets/vyos_banner/aliases +++ b/test/integration/targets/vyos_banner/aliases @@ -1 +1 @@ -shippable/network +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_command/aliases b/test/integration/targets/vyos_command/aliases index 539d9574add..8071e1f75b5 100644 --- a/test/integration/targets/vyos_command/aliases +++ b/test/integration/targets/vyos_command/aliases @@ -1 +1 @@ -shippable/network +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_config/aliases b/test/integration/targets/vyos_config/aliases index 539d9574add..8071e1f75b5 100644 --- a/test/integration/targets/vyos_config/aliases +++ b/test/integration/targets/vyos_config/aliases @@ -1 +1 @@ -shippable/network +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_facts/aliases b/test/integration/targets/vyos_facts/aliases index 539d9574add..8071e1f75b5 100644 --- a/test/integration/targets/vyos_facts/aliases +++ b/test/integration/targets/vyos_facts/aliases @@ -1 +1 @@ -shippable/network +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_firewall_rules/aliases b/test/integration/targets/vyos_firewall_rules/aliases new file mode 100644 index 00000000000..8071e1f75b5 --- /dev/null +++ b/test/integration/targets/vyos_firewall_rules/aliases @@ -0,0 +1 @@ +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_interface/aliases b/test/integration/targets/vyos_interface/aliases deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/test/integration/targets/vyos_l3_interface/aliases b/test/integration/targets/vyos_l3_interface/aliases deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/test/integration/targets/vyos_linkagg/aliases b/test/integration/targets/vyos_linkagg/aliases deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/test/integration/targets/vyos_lldp/aliases b/test/integration/targets/vyos_lldp/aliases index 539d9574add..8071e1f75b5 100644 --- a/test/integration/targets/vyos_lldp/aliases +++ b/test/integration/targets/vyos_lldp/aliases @@ -1 +1 @@ -shippable/network +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_lldp_global/aliases b/test/integration/targets/vyos_lldp_global/aliases new file mode 100644 index 00000000000..8071e1f75b5 --- /dev/null +++ b/test/integration/targets/vyos_lldp_global/aliases @@ -0,0 +1 @@ +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_lldp_interface/aliases b/test/integration/targets/vyos_lldp_interface/aliases index e69de29bb2d..8071e1f75b5 100644 --- a/test/integration/targets/vyos_lldp_interface/aliases +++ b/test/integration/targets/vyos_lldp_interface/aliases @@ -0,0 +1 @@ +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_lldp_interfaces/aliases b/test/integration/targets/vyos_lldp_interfaces/aliases new file mode 100644 index 00000000000..8071e1f75b5 --- /dev/null +++ b/test/integration/targets/vyos_lldp_interfaces/aliases @@ -0,0 +1 @@ +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_logging/aliases b/test/integration/targets/vyos_logging/aliases index e69de29bb2d..8071e1f75b5 100644 --- a/test/integration/targets/vyos_logging/aliases +++ b/test/integration/targets/vyos_logging/aliases @@ -0,0 +1 @@ +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_static_route/aliases b/test/integration/targets/vyos_static_route/aliases index 539d9574add..8071e1f75b5 100644 --- a/test/integration/targets/vyos_static_route/aliases +++ b/test/integration/targets/vyos_static_route/aliases @@ -1 +1 @@ -shippable/network +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_static_routes/aliases b/test/integration/targets/vyos_static_routes/aliases new file mode 100644 index 00000000000..8071e1f75b5 --- /dev/null +++ b/test/integration/targets/vyos_static_routes/aliases @@ -0,0 +1 @@ +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_system/aliases b/test/integration/targets/vyos_system/aliases new file mode 100644 index 00000000000..8071e1f75b5 --- /dev/null +++ b/test/integration/targets/vyos_system/aliases @@ -0,0 +1 @@ +shippable/vyos/group1 diff --git a/test/integration/targets/vyos_user/aliases b/test/integration/targets/vyos_user/aliases deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/test/integration/targets/vyos_vlan/aliases b/test/integration/targets/vyos_vlan/aliases deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/test/lib/ansible_test/_data/completion/network.txt b/test/lib/ansible_test/_data/completion/network.txt index cd762feb2ac..4e8486feb5e 100644 --- a/test/lib/ansible_test/_data/completion/network.txt +++ b/test/lib/ansible_test/_data/completion/network.txt @@ -1,2 +1,2 @@ -ios/csr1000v connection=local +ios/csr1000v connection=network_cli vyos/1.1.8 connection=local diff --git a/test/utils/shippable/ios.sh b/test/utils/shippable/ios.sh new file mode 120000 index 00000000000..cad3e41b707 --- /dev/null +++ b/test/utils/shippable/ios.sh @@ -0,0 +1 @@ +network.sh \ No newline at end of file diff --git a/test/utils/shippable/network.sh b/test/utils/shippable/network.sh index a232ef7f6aa..43dddd5866d 100755 --- a/test/utils/shippable/network.sh +++ b/test/utils/shippable/network.sh @@ -2,17 +2,18 @@ set -o pipefail -eux -# shellcheck disable=SC2086 -ansible-test network-integration --explain ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txt 2>&1 || { cat /tmp/explain.txt && false; } -{ grep ' network-integration: .* (targeted)$' /tmp/explain.txt || true; } > /tmp/network.txt +declare -a args +IFS='/:' read -ra args <<< "$1" -if [ "${COVERAGE}" == "--coverage" ]; then - # when on-demand coverage is enabled, force tests to run for all network platforms - echo "coverage" > /tmp/network.txt +platform="${args[0]}" +version="${args[1]}" + +if [ "${#args[@]}" -gt 2 ]; then + target="shippable/${platform}/group${args[2]}/" +else + target="shippable/${platform}/" fi -target="shippable/network/" - stage="${S:-prod}" provider="${P:-default}" @@ -23,27 +24,9 @@ python_versions=( 3.6 ) -if [ -s /tmp/network.txt ]; then - echo "Detected changes requiring integration tests specific to networking:" - cat /tmp/network.txt - - echo "Running network integration tests for multiple platforms concurrently." - - platforms=( - --platform vyos/1.1.8 - ) -else - echo "No changes requiring integration tests specific to networking were detected." - echo "Running network integration tests for a single platform only." - - platforms=( - --platform vyos/1.1.8 - ) -fi - -for version in "${python_versions[@]}"; do +for python_version in "${python_versions[@]}"; do # terminate remote instances on the final python version tested - if [ "${version}" = "${python_versions[-1]}" ]; then + if [ "${python_version}" = "${python_versions[-1]}" ]; then terminate="always" else terminate="never" @@ -51,7 +34,7 @@ for version in "${python_versions[@]}"; do # shellcheck disable=SC2086 ansible-test network-integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \ - "${platforms[@]}" \ - --docker default --python "${version}" \ + --platform "${platform}/${version}" \ + --docker default --python "${python_version}" \ --remote-terminate "${terminate}" --remote-stage "${stage}" --remote-provider "${provider}" done diff --git a/test/utils/shippable/vyos.sh b/test/utils/shippable/vyos.sh new file mode 120000 index 00000000000..cad3e41b707 --- /dev/null +++ b/test/utils/shippable/vyos.sh @@ -0,0 +1 @@ +network.sh \ No newline at end of file