2016-12-20 08:47:31 -06:00
|
|
|
language: python
|
2016-09-05 03:19:40 -05:00
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
|
2016-12-21 03:16:47 -06:00
|
|
|
python:
|
|
|
|
- "2.7"
|
2016-12-21 03:30:49 -06:00
|
|
|
cache: pip
|
2016-11-30 03:37:46 -06:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- TEST_RUNNER_IMAGE="martbab/freeipa-fedora-test-runner:master-latest"
|
2016-12-20 09:04:02 -06:00
|
|
|
PEP8_ERROR_LOG="pep8_errors.log"
|
|
|
|
CI_RESULTS_LOG="ci_results_${TRAVIS_BRANCH}.log"
|
2017-01-05 03:10:06 -06:00
|
|
|
CI_BACKLOG_SIZE=5000
|
2017-02-08 03:38:57 -06:00
|
|
|
CI_RUNNER_LOGS_DIR="/tmp/test-runner-logs"
|
|
|
|
CI_RUNNER_LOG_ARCHIVE="freeipa-ci-pr-${TRAVIS_PULL_REQUEST}-job-${TRAVIS_JOB_NUMBER}.tar.gz"
|
2016-11-30 03:37:46 -06:00
|
|
|
matrix:
|
2016-12-20 09:04:02 -06:00
|
|
|
- TASK_TO_RUN="lint"
|
2017-02-07 11:29:08 -06:00
|
|
|
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
2016-12-20 09:04:02 -06:00
|
|
|
- TASK_TO_RUN="run-tests"
|
2017-02-07 10:23:54 -06:00
|
|
|
PYTHON=/usr/bin/python2
|
2017-02-07 11:29:08 -06:00
|
|
|
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
2016-12-20 09:04:02 -06:00
|
|
|
TESTS_TO_RUN="test_xmlrpc/test_[a-k]*.py"
|
|
|
|
- TASK_TO_RUN="run-tests"
|
2017-02-07 10:23:54 -06:00
|
|
|
PYTHON=/usr/bin/python2
|
2017-02-07 11:29:08 -06:00
|
|
|
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
2016-12-20 09:04:02 -06:00
|
|
|
TESTS_TO_RUN="test_cmdline
|
2016-11-30 03:37:46 -06:00
|
|
|
test_install
|
2017-03-03 05:57:21 -06:00
|
|
|
test_ipaclient
|
2016-11-30 03:37:46 -06:00
|
|
|
test_ipalib
|
|
|
|
test_ipapython
|
|
|
|
test_ipaserver
|
|
|
|
test_pkcs10
|
|
|
|
test_xmlrpc/test_[l-z]*.py"
|
2017-02-07 11:29:08 -06:00
|
|
|
- TASK_TO_RUN="run-tests"
|
|
|
|
PYTHON=/usr/bin/python3
|
|
|
|
TEST_RUNNER_CONFIG=".test_runner_config_py3_temp.yaml"
|
2017-06-22 04:03:33 -05:00
|
|
|
TESTS_TO_RUN="test_xmlrpc/test_add_remove_cert_cmd.py
|
|
|
|
test_xmlrpc/test_attr.py
|
2017-06-22 03:57:52 -05:00
|
|
|
test_xmlrpc/test_automember_plugin.py
|
|
|
|
test_xmlrpc/test_automount_plugin.py
|
|
|
|
test_xmlrpc/test_baseldap_plugin.py
|
|
|
|
test_xmlrpc/test_batch_plugin.py
|
|
|
|
test_xmlrpc/test_cert_plugin.py
|
|
|
|
test_xmlrpc/test_certprofile_plugin.py
|
|
|
|
test_xmlrpc/test_config_plugin.py
|
|
|
|
test_xmlrpc/test_delegation_plugin.py
|
|
|
|
test_xmlrpc/test_group_plugin.py
|
|
|
|
test_xmlrpc/test_hbac_plugin.py
|
|
|
|
test_xmlrpc/test_hbacsvcgroup_plugin.py
|
|
|
|
test_xmlrpc/test_hbactest_plugin.py
|
|
|
|
test_xmlrpc/test_host_plugin.py
|
|
|
|
test_xmlrpc/test_hostgroup_plugin.py
|
2017-06-22 05:10:25 -05:00
|
|
|
test_xmlrpc/test_krbtpolicy.py
|
|
|
|
test_xmlrpc/test_kerberos_principal_aliases.py"
|
2017-02-07 11:29:08 -06:00
|
|
|
### Tests which haven't been ported to py3 yet ###
|
|
|
|
## test_xmlrpc/test_[a-k]*.py
|
|
|
|
# test_xmlrpc/test_ca_plugin.py
|
|
|
|
# test_xmlrpc/test_caacl_plugin.py
|
|
|
|
# test_xmlrpc/test_caacl_profile_enforcement.py
|
|
|
|
# test_xmlrpc/test_dns_plugin.py
|
|
|
|
# test_xmlrpc/test_dns_realmdomains_integration.py
|
|
|
|
# test_xmlrpc/test_external_members.py
|
|
|
|
# test_xmlrpc/test_idviews_plugin.py
|
|
|
|
- TASK_TO_RUN="run-tests"
|
|
|
|
PYTHON=/usr/bin/python3
|
|
|
|
TEST_RUNNER_CONFIG=".test_runner_config_py3_temp.yaml"
|
|
|
|
TESTS_TO_RUN="test_cmdline
|
|
|
|
test_ipalib
|
2017-06-19 12:11:10 -05:00
|
|
|
test_ipapython
|
2017-06-27 06:22:00 -05:00
|
|
|
test_ipaserver/test_changepw.py
|
2017-02-07 11:29:08 -06:00
|
|
|
test_pkcs10
|
2017-06-22 06:40:38 -05:00
|
|
|
test_xmlrpc/test_location_plugin.py
|
2017-06-22 03:57:52 -05:00
|
|
|
test_xmlrpc/test_nesting.py
|
|
|
|
test_xmlrpc/test_netgroup_plugin.py
|
|
|
|
test_xmlrpc/test_old_permission_plugin.py
|
|
|
|
test_xmlrpc/test_passwd_plugin.py
|
|
|
|
test_xmlrpc/test_permission_plugin.py
|
|
|
|
test_xmlrpc/test_ping_plugin.py
|
|
|
|
test_xmlrpc/test_privilege_plugin.py
|
|
|
|
test_xmlrpc/test_pwpolicy_plugin.py
|
|
|
|
test_xmlrpc/test_radiusproxy_plugin.py
|
|
|
|
test_xmlrpc/test_realmdomains_plugin.py
|
|
|
|
test_xmlrpc/test_replace.py
|
|
|
|
test_xmlrpc/test_role_plugin.py
|
|
|
|
test_xmlrpc/test_selfservice_plugin.py
|
|
|
|
test_xmlrpc/test_selinuxusermap_plugin.py
|
|
|
|
test_xmlrpc/test_service_plugin.py
|
|
|
|
test_xmlrpc/test_servicedelegation_plugin.py
|
|
|
|
test_xmlrpc/test_stageuser_plugin.py
|
|
|
|
test_xmlrpc/test_sudocmd_plugin.py
|
|
|
|
test_xmlrpc/test_sudocmdgroup_plugin.py
|
|
|
|
test_xmlrpc/test_sudorule_plugin.py"
|
2017-02-07 11:29:08 -06:00
|
|
|
### Tests which haven't been ported to py3 yet ###
|
|
|
|
## test_install
|
|
|
|
# test_ipaserver/httptest.py
|
|
|
|
# test_ipaserver/test_dnssec.py
|
|
|
|
# test_ipaserver/test_install/test_adtrustinstance.py
|
|
|
|
# test_ipaserver/test_install/test_service.py
|
|
|
|
# test_ipaserver/test_ipap11helper.py
|
|
|
|
# test_ipaserver/test_kadmin.py
|
|
|
|
# test_ipaserver/test_ldap.py
|
|
|
|
# test_ipaserver/test_otptoken_import.py
|
|
|
|
# test_ipaserver/test_rpcserver.py
|
|
|
|
# test_ipaserver/test_secrets.py
|
|
|
|
# test_ipaserver/test_serverroles.py
|
|
|
|
# test_ipaserver/test_topology_plugin.py
|
|
|
|
# test_ipaserver/test_version_comparison.py
|
|
|
|
## test_ipaserver
|
|
|
|
## test_xmlrpc/test_[l-z]*.py
|
|
|
|
# test_xmlrpc/test_range_plugin.py
|
|
|
|
# test_xmlrpc/test_trust_plugin.py
|
|
|
|
# test_xmlrpc/test_vault_plugin.py
|
2016-12-21 03:30:49 -06:00
|
|
|
install:
|
2017-05-09 11:36:51 -05:00
|
|
|
- pip install --upgrade pip
|
|
|
|
- pip3 install --upgrade pip
|
2016-09-05 03:19:40 -05:00
|
|
|
- pip install pep8
|
2016-11-30 03:37:46 -06:00
|
|
|
- >
|
|
|
|
pip3 install
|
2016-12-20 03:11:20 -06:00
|
|
|
git+https://github.com/freeipa/ipa-docker-test-runner@release-0-2-1
|
2016-09-05 03:19:40 -05:00
|
|
|
|
|
|
|
script:
|
2017-02-08 03:38:57 -06:00
|
|
|
- mkdir -p $CI_RUNNER_LOGS_DIR
|
2016-12-20 09:03:25 -06:00
|
|
|
- travis_wait 50 ./.travis_run_task.sh
|
2016-11-30 03:37:46 -06:00
|
|
|
after_failure:
|
2017-01-05 03:10:06 -06:00
|
|
|
- echo "Test runner output:"; tail -n $CI_BACKLOG_SIZE $CI_RESULTS_LOG
|
2016-12-20 09:04:02 -06:00
|
|
|
- echo "PEP-8 errors:"; cat $PEP8_ERROR_LOG
|
2017-02-08 03:38:57 -06:00
|
|
|
- >
|
|
|
|
echo "Archiving CI logs";
|
|
|
|
if [[ "$TASK_TO_RUN" != "lint" ]]; then
|
|
|
|
tar --ignore-failed-read -uvf var_log.tar $CI_RESULTS_LOG $PEP8_ERROR_LOG;
|
|
|
|
gzip var_log.tar;
|
|
|
|
mv var_log.tar.gz $CI_RUNNER_LOG_ARCHIVE;
|
|
|
|
|
|
|
|
transfer_url=$(
|
|
|
|
curl --upload-file \
|
|
|
|
./$CI_RUNNER_LOG_ARCHIVE \
|
|
|
|
https://transfer.sh/${CI_RUNNER_LOG_ARCHIVE}) &&
|
|
|
|
echo "Download log archive from ${transfer_url}" ||
|
|
|
|
echo "Failed to upload log archive!";
|
|
|
|
fi
|