forked from dogtagpki/pki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (62 loc) · 1.92 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
sudo: required
language: python
services:
- docker
cache: pip
env:
global:
- CONTAINER=pkitest
- SCRIPTDIR=/tmp/workdir/pki/.travis
- PKI_LOG=pki_log.log
- CI_RESULTS_LOG="ci_results_${TRAVIS_BRANCH}.log"
- CI_RUNNER_LOG_ARCHIVE="dogtag-ci-job-${TRAVIS_JOB_NUMBER}.tar.gz"
- IMAGE=dogtagpki/pki-ci:f26_105
# F25 is outdated
# - IMAGE=dogtagpki/pki-ci:f25_104
# rawhide repo is unstable
# - IMAGE=dogtagpki/pki-ci:rawhide
matrix:
- TASK_TO_RUN="run-dogtag-build"
- TASK_TO_RUN="run-ipa-test"
IPA_TEST_RUNNER_IMAGE="dogtagpki/pki-ci:f26_ipa_4-5"
RPMS_LOCATION=/tmp/workdir/packages/RPMS
DOGTAG_PKI_RPMS=${TRAVIS_BUILD_DIR}/dogtag_rpms
before_install:
- pyenv global system 3.5
- docker pull ${IMAGE}
- >
docker run
--detach
--name=${CONTAINER}
--hostname='pki.test'
--privileged
--tmpfs /tmp
--tmpfs /run
-v /sys/fs/cgroup:/sys/fs/cgroup:ro
-v $(pwd):/tmp/workdir/pki
-e BUILDUSER_UID=$(id -u)
-e BUILDUSER_GID=$(id -g)
-e TRAVIS=${TRAVIS}
-e TRAVIS_JOB_NUMBER=${TRAVIS_JOB_NUMBER}
-ti
${IMAGE}
install:
- docker exec -ti ${CONTAINER} /bin/ls -la /tmp/workdir
- docker exec -ti ${CONTAINER} ${SCRIPTDIR}/00-init
- docker exec -ti ${CONTAINER} ${SCRIPTDIR}/10-compose-rpms
# IPA related installs
- pip install --upgrade pip
- pip3 install --upgrade pip
- pip install pep8
script:
# It is time to run FreeIPA tests with new Dogtag RPMS built
- travis_wait 20 ./.travis_run_task.sh
after_script:
- docker kill ${CONTAINER}
- docker rm ${CONTAINER}
# The errors can be in either dogtag container or freeipa container
after_failure:
- docker exec ${CONTAINER} journalctl -l > ${PKI_LOG}
- echo "Uploading CI Logs to transfer.sh ..."
- curl --upload-file ./${PKI_LOG} https://transfer.sh/dogtag_build_logs.txt
- curl --upload-file ./${CI_RESULTS_LOG} https://transfer.sh/freeipa-integration.txt