forked from freeipa/freeipa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
125 lines (122 loc) · 5.03 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
language: python
services:
- docker
python:
- "2.7"
cache: pip
env:
global:
- TEST_RUNNER_IMAGE="martbab/freeipa-fedora-test-runner:master-latest"
PEP8_ERROR_LOG="pep8_errors.log"
CI_RESULTS_LOG="ci_results_${TRAVIS_BRANCH}.log"
CI_BACKLOG_SIZE=5000
CI_RUNNER_LOGS_DIR="/tmp/test-runner-logs"
CI_RUNNER_LOG_ARCHIVE="freeipa-ci-pr-${TRAVIS_PULL_REQUEST}-job-${TRAVIS_JOB_NUMBER}.tar.gz"
matrix:
- TASK_TO_RUN="lint"
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
- TASK_TO_RUN="run-tests"
PYTHON=/usr/bin/python2
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
TESTS_TO_RUN="test_xmlrpc/test_[a-k]*.py"
- TASK_TO_RUN="run-tests"
PYTHON=/usr/bin/python2
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
TESTS_TO_RUN="test_cmdline
test_install
test_ipaclient
test_ipalib
test_ipapython
test_ipaserver
test_pkcs10
test_xmlrpc/test_[l-z]*.py"
- TASK_TO_RUN="run-tests"
PYTHON=/usr/bin/python3
TEST_RUNNER_CONFIG=".test_runner_config_py3_temp.yaml"
TESTS_TO_RUN="test_xmlrpc/test_add_remove_cert_cmd.py
test_xmlrpc/test_attr.py
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
test_xmlrpc/test_krbtpolicy.py
test_xmlrpc/test_kerberos_principal_aliases.py"
### 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
test_ipapython
test_ipaserver
test_pkcs10
test_xmlrpc/test_location_plugin.py
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"
### Tests which haven't been ported to py3 yet ###
## test_xmlrpc/test_[l-z]*.py
# test_xmlrpc/test_range_plugin.py
# test_xmlrpc/test_trust_plugin.py
# test_xmlrpc/test_vault_plugin.py
install:
- pip install --upgrade pip
- pip3 install --upgrade pip
- pip install pep8
- >
pip3 install
git+https://github.com/freeipa/ipa-docker-test-runner@release-0-2-1
script:
- mkdir -p $CI_RUNNER_LOGS_DIR
- travis_wait 50 ./.travis_run_task.sh
after_failure:
- echo "Test runner output:"; tail -n $CI_BACKLOG_SIZE $CI_RESULTS_LOG
- echo "PEP-8 errors:"; cat $PEP8_ERROR_LOG
- >
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