forked from ansible-lockdown/RHEL7-STIG
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
42 lines (42 loc) · 1.12 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
---
sudo: required
services: docker
dist: xenial
language: python
python:
- 3.7
jobs:
include:
- name: "AWS Test"
if: fork IS false
env: TYPE=aws
- name: "Docker Test"
env: TYPE=docker
- name: "Docs Test"
env: TYPE=docs
before_install:
- |
if [ "${TYPE}" == "docker" ]; then
docker pull centos/systemd
if [[ "${TRAVIS_PULL_REQUEST}" == "false" || "${TRAVIS_PULL_REQUEST_SLUG}" == "MindPointGroup/RHEL7-STIG" ]]; then
docker login -u=$RHR_USER -p=$RHR_TOKEN registry.redhat.io
docker pull registry.redhat.io/rhel7:latest
(cd molecule/docker; docker build --build-arg rhn_user=$RHN_USERNAME --build-arg rhn_pass=$RHN_PASSWORD -t molly .)
else
sed -i '/- name: RHEL/,/- docker/d' ./molecule/docker/molecule.yml
fi
fi
install:
- |
if [ "${TYPE}" == "docs" ]; then
(cd doc; pip3 install -r requirements.txt)
else
pip3 install -r tests/ci-requirements.txt
fi
script:
- |
if [ "${TYPE}" == "docs" ]; then
(cd doc; make clean; make html)
else
molecule --base-config base-molecule.yml test --scenario-name $TYPE
fi