mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
travis: Remove CI integration
Removing Travis CI in favour of Azure Pipelines. All tests previously tested by Travis are also configured in Azure. Repos [1] and [2] were used to build Docker images for Travis, thus they are no longer required for branches master and ipa-4-8. Branches ipa-4-7 and ipa-4-6 don't have Azure pipelines configured, so Travis will continue to be used by them. 1 - https://github.com/freeipa/ipa-docker-test-runner 2 - https://github.com/freeipa/freeipa-builder Related: https://pagure.io/freeipa/issue/7323 Signed-off-by: Armando Neto <abiagion@redhat.com> Reviewed-By: Francisco Trivino <ftrivino@redhat.com>
This commit is contained in:
@@ -1,98 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
|
||||
#
|
||||
|
||||
# Configuration file for the test runner used in Travis CI
|
||||
|
||||
container:
|
||||
detach: true
|
||||
hostname: master.ipa.test
|
||||
working_dir: /freeipa
|
||||
host:
|
||||
binds:
|
||||
- /sys/fs/cgroup:/sys/fs/cgroup:ro
|
||||
- /dev/urandom:/dev/random:ro
|
||||
privileged: true
|
||||
security_opt:
|
||||
- label:disable
|
||||
tmpfs:
|
||||
- /tmp
|
||||
- /run
|
||||
server:
|
||||
domain: ipa.test
|
||||
password: Secret123
|
||||
realm: IPA.TEST
|
||||
steps:
|
||||
build:
|
||||
- make V=0 ${make_target} LOG_COMPILE='gdb -return-child-result -ex run -ex "thread apply all bt" -ex "quit" --args'
|
||||
builddep:
|
||||
- rm -rf /var/cache/dnf/*
|
||||
- echo "fastestmirror = True" >> /etc/dnf/dnf.conf
|
||||
- echo "max_parallel_downloads = 8" >> /etc/dnf/dnf.conf
|
||||
- echo "timeout = 8" >> /etc/dnf/dnf.conf
|
||||
- echo "retries = 20" >> /etc/dnf/dnf.conf
|
||||
- "dnf makecache || :"
|
||||
- dnf makecache
|
||||
- cat /var/cache/dnf/fastestmirror.cache
|
||||
- dnf -y module enable nodejs:12
|
||||
- dnf builddep -y ${builddep_opts} -D "with_wheels 1" --spec freeipa.spec.in --best --allowerasing --setopt=install_weak_deps=False
|
||||
- dnf install -y gdb
|
||||
- dnf update -y annobin
|
||||
cleanup:
|
||||
- chown -R ${uid}:${gid} ${container_working_dir}
|
||||
- journalctl -b --no-pager > systemd_journal.log
|
||||
- >
|
||||
tar --ignore-failed-read -cvf ${container_working_dir}/var_log.tar
|
||||
/var/log/dirsrv
|
||||
/var/log/httpd
|
||||
/var/log/ipa*
|
||||
/var/log/krb5kdc.log
|
||||
/var/log/pki
|
||||
systemd_journal.log
|
||||
`find daemons -name '*.log' -print`
|
||||
- chown ${uid}:${gid} ${container_working_dir}/var_log.tar
|
||||
- ls -laZ /etc/dirsrv/slapd-*/ /etc/httpd/alias/ /etc/pki/pki-tomcat/alias/ || true
|
||||
configure:
|
||||
- ./autogen.sh
|
||||
install_packages:
|
||||
- sed -i 's/%_install_langs \(.*\)/\0:fr/g' /etc/rpm/macros.image-language-conf
|
||||
- dnf makecache
|
||||
- dnf install -y ${container_working_dir}/dist/rpms/*.rpm --best --allowerasing
|
||||
- dnf install -y firewalld
|
||||
- systemctl --now enable firewalld
|
||||
install_server:
|
||||
- ipa-server-install -U --domain ${server_domain} --realm ${server_realm} -p ${server_password}
|
||||
-a ${server_password} --setup-dns --setup-kra --auto-forwarders
|
||||
- sed -ri "s/mode = production/mode = development/" /etc/ipa/default.conf
|
||||
- systemctl restart httpd.service
|
||||
- firewall-cmd --add-service={freeipa-ldap,freeipa-ldaps,dns}
|
||||
lint:
|
||||
- make V=0 lint
|
||||
webui_unit:
|
||||
- dnf install -y npm
|
||||
- cd ${container_working_dir}/install/ui/js/libs && make
|
||||
- cd ${container_working_dir}/install/ui && npm install
|
||||
- cd ${container_working_dir}/install/ui && node_modules/grunt/bin/grunt --verbose test
|
||||
tox:
|
||||
# just run one pylint and one Python 3 target (time/coverage trade-off)
|
||||
- tox -e py36,pypi,pylint3
|
||||
prepare_tests:
|
||||
- echo ${server_password} | kinit admin && ipa ping
|
||||
- cp -r /etc/ipa/* ~/.ipa/
|
||||
- echo ${server_password} > ~/.ipa/.dmpw
|
||||
- echo 'wait_for_dns=5' >> ~/.ipa/default.conf
|
||||
run_tests:
|
||||
- ipa-test-config --help
|
||||
- ipa-test-task --help
|
||||
- ipa-run-tests ${tests_ignore} -k-test_dns_soa ${tests_verbose} ${path}
|
||||
- '! grep -n -C5 BytesWarning /var/log/httpd/error_log'
|
||||
- ipa-server-install --uninstall -U
|
||||
# second uninstall to verify that --uninstall without installation works
|
||||
- ipa-server-install --uninstall -U
|
||||
- firewall-cmd --remove-service={freeipa-ldap,freeipa-ldaps,dns}
|
||||
tests:
|
||||
ignore:
|
||||
- test_integration
|
||||
- test_webui
|
||||
- test_ipapython/test_keyring.py
|
||||
verbose: true
|
||||
79
.travis.yml
79
.travis.yml
@@ -1,79 +0,0 @@
|
||||
# workaround for missing IPv6 address support
|
||||
# https://github.com/travis-ci/travis-ci/issues/8891
|
||||
sudo: required
|
||||
dist: trusty
|
||||
group: deprecated-2017Q4
|
||||
|
||||
language: python
|
||||
|
||||
services:
|
||||
- docker
|
||||
python:
|
||||
- "3.6"
|
||||
cache: pip
|
||||
env:
|
||||
global:
|
||||
- TEST_RUNNER_IMAGE="freeipa/freeipa-test-runner:master-latest"
|
||||
PEP8_ERROR_LOG="pycodestyle_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="webui-unit"
|
||||
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
||||
- TASK_TO_RUN="run-tests"
|
||||
PYTHON=/usr/bin/python3
|
||||
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
||||
TESTS_TO_RUN="test_xmlrpc/test_[a-k]*.py"
|
||||
- TASK_TO_RUN="run-tests"
|
||||
PYTHON=/usr/bin/python3
|
||||
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
||||
TESTS_TO_RUN="test_cmdline
|
||||
test_install
|
||||
test_ipaclient
|
||||
test_ipalib
|
||||
test_ipaplatform
|
||||
test_ipapython
|
||||
test_ipaserver
|
||||
test_ipatests_plugins
|
||||
test_xmlrpc/test_[l-z]*.py"
|
||||
- TASK_TO_RUN="tox"
|
||||
TEST_RUNNER_CONFIG=".test_runner_config.yaml"
|
||||
|
||||
before_install:
|
||||
- ip addr show
|
||||
- ls /proc/net
|
||||
- cat /proc/net/if_inet6
|
||||
# - ip addr show dev lo | grep -q inet6 || (echo "No IPv6 address found"; exit 1)
|
||||
|
||||
install:
|
||||
- pip3 install --upgrade pip
|
||||
- pip3 install pycodestyle
|
||||
- >
|
||||
pip3 install
|
||||
git+https://github.com/freeipa/ipa-docker-test-runner@release-0-3-1
|
||||
|
||||
script:
|
||||
- mkdir -p $CI_RUNNER_LOGS_DIR
|
||||
- travis_wait 50 ./.travis_run_task.sh
|
||||
- test -z "`cat $PEP8_ERROR_LOG`"
|
||||
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
|
||||
@@ -1,65 +0,0 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (C) 2017 FreeIPA Contributors see COPYING for license
|
||||
#
|
||||
# NOTE: this script is intended to run in Travis CI only
|
||||
|
||||
test_set=""
|
||||
|
||||
env_opt=""
|
||||
|
||||
case "$TASK_TO_RUN" in
|
||||
lint|tox)
|
||||
# disable developer mode for lint and tox tasks.
|
||||
developer_mode_opt=""
|
||||
;;
|
||||
*)
|
||||
developer_mode_opt="--developer-mode"
|
||||
;;
|
||||
esac
|
||||
|
||||
function truncate_log_to_test_failures() {
|
||||
# chop off everything in the CI_RESULTS_LOG preceding pytest error output
|
||||
# if there are pytest errors in the log
|
||||
error_fail_regexp='\(=== ERRORS ===\)\|\(=== FAILURES ===\)'
|
||||
|
||||
if grep -e "$error_fail_regexp" $CI_RESULTS_LOG > /dev/null
|
||||
then
|
||||
sed -i "/$error_fail_regexp/,\$!d" $CI_RESULTS_LOG
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ "$TASK_TO_RUN" == "lint" ]]
|
||||
then
|
||||
if [[ "$TRAVIS_EVENT_TYPE" == "pull_request" ]]
|
||||
then
|
||||
git diff origin/$TRAVIS_BRANCH -U0 | \
|
||||
pycodestyle --diff &> $PEP8_ERROR_LOG ||:
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$TESTS_TO_RUN" ]]
|
||||
then
|
||||
pushd ipatests
|
||||
test_set=`ls -d -1 $TESTS_TO_RUN 2> /dev/null | tr '\n' ' '`
|
||||
popd
|
||||
fi
|
||||
|
||||
docker pull $TEST_RUNNER_IMAGE
|
||||
|
||||
ipa-docker-test-runner -l $CI_RESULTS_LOG \
|
||||
-c $TEST_RUNNER_CONFIG \
|
||||
$developer_mode_opt \
|
||||
--container-environment "RPMBUILD_OPTS=$env_opt" \
|
||||
--container-image $TEST_RUNNER_IMAGE \
|
||||
--git-repo $TRAVIS_BUILD_DIR \
|
||||
$TASK_TO_RUN $test_set
|
||||
|
||||
exit_status="$?"
|
||||
|
||||
if [[ "$exit_status" -ne 0 ]]
|
||||
then
|
||||
truncate_log_to_test_failures
|
||||
fi
|
||||
|
||||
exit $exit_status
|
||||
@@ -276,7 +276,6 @@ rpmlint: freeipa.spec
|
||||
rpmlint ./$<
|
||||
|
||||
YAML_FILES = \
|
||||
$(top_srcdir)/.travis.yml \
|
||||
$(top_srcdir)/.lgtm.yml \
|
||||
$(wildcard $(top_srcdir)/.*.yaml) \
|
||||
$(wildcard $(top_srcdir)/ipatests/prci_definitions/*.yaml)
|
||||
|
||||
@@ -188,12 +188,6 @@ class RedHatTaskNamespace(BaseTaskNamespace):
|
||||
"globally, disable it on the specific interfaces in "
|
||||
"sysctl.conf except 'lo' interface.")
|
||||
|
||||
# XXX This is a hack to work around an issue with Travis CI by
|
||||
# skipping IPv6 address test. The Dec 2017 update removed ::1 from
|
||||
# loopback, see https://github.com/travis-ci/travis-ci/issues/8891.
|
||||
if os.environ.get('TRAVIS') == 'true':
|
||||
return
|
||||
|
||||
try:
|
||||
localhost6 = ipautil.CheckedIPAddress('::1', allow_loopback=True)
|
||||
if localhost6.get_matching_interface() is None:
|
||||
|
||||
Reference in New Issue
Block a user