ci(travis): obtain `saltcheck.py` and run the tests (only on `develop`)

* Based on the latest development version from the `neon` branch
  - Also includes sending the appropriate exit codes (e.g. for failures)
This commit is contained in:
Imran Iqbal 2019-10-15 05:43:38 +01:00
parent 88229f08bd
commit 8ae46e5d49
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819
1 changed files with 17 additions and 0 deletions

View File

@ -13,7 +13,24 @@ cache: bundler
## Script to run for the test stage ## Script to run for the test stage
script: script:
# yamllint disable rule:line-length
# Converge and verify the instance; `saltcheck` relies upon the `converge` as well
- bin/kitchen verify "${INSTANCE}" - bin/kitchen verify "${INSTANCE}"
# If a `develop` instance, get the appropriate version of `saltcheck.py` (temporary)
- if [ ! -z $(echo "${INSTANCE}" | grep \\-develop-) ]; then
bin/kitchen exec "${INSTANCE}" -c
"sudo curl -o \$(find /usr/lib/ -type d -name modules | grep packages/salt/modules)/saltcheck.py
https://raw.githubusercontent.com/myii/salt/fix/add-retcode/salt/modules/saltcheck.py";
fi
# If a `develop` instance, run all of the `saltcheck` tests
- if [ ! -z $(echo "${INSTANCE}" | grep \\-develop-) ]; then
bin/kitchen exec "${INSTANCE}" -c
"sudo salt-call
--config-dir=/tmp/kitchen/etc/salt
saltcheck.run_state_tests
cron check_all=True";
fi
# yamllint enable rule:line-length
## Stages and jobs matrix ## Stages and jobs matrix
stages: stages: