.gitlab-ci.yml 1.32 KB
Newer Older
1
image: williamyeh/ansible:debian9
2

3
test:lint:
4
  script:
5 6
  - apt-get update && apt-get -y install python-pip
  - pip install ansible-lint
7
  - PYTHONIOENCODING=UTF-8 ansible-lint site.yml
8

9
test:role:apt:
10
  script:
11 12
  - echo "deb cdrom:[foobar test]/ stretch main" >> /etc/apt/sources.list
  - touch /etc/apt/apt.conf.d/30apt-proxy
13
  - ansible-playbook tests/apt.yml --skip-tags="no_unit_test"
14
  - apt-get update && apt-get -y install rolldice
15

16
test:role:bash:
17
  script:
18
  - ansible-playbook tests/bash.yml --skip-tags="no_unit_test"
19
  - bash -c "compgen -c unam |grep -q uname && exit || exit 1"
20

21
test:role:motd:
22
  script:
23
  - ansible-playbook tests/motd.yml --skip-tags="no_unit_test"
24
  - sh tests/motd/unit_test.sh
25

26
test:role:opsis:
27
  script:
28
  - ansible-playbook --inventory inventory/hosts -l opsis1 tests/opsis.yml --skip-tags="no_unit_test"
29

30
test:role:system-software:
31 32
  script:
  - ansible-playbook tests/system-software.yml --skip-tags="no_unit_test"
33

34
test:role:users:
35
  script:
36
  - apt-get update && apt-get -y install locales
37
  - ansible-playbook tests/users.yml --skip-tags="no_unit_test"
Kyle Robbertze's avatar
Kyle Robbertze committed
38

Stefano Rivera's avatar
Stefano Rivera committed
39
pages:
40
  image: debian:sid
Kyle Robbertze's avatar
Kyle Robbertze committed
41
  script:
42
  - apt-get update
43
  - apt-get -y install python3-sphinx python3-recommonmark make
Kyle Robbertze's avatar
Kyle Robbertze committed
44 45 46 47 48 49
  - cd docs
  - make html
  - mv _build/html/ ../public/
  artifacts:
    paths:
    - public
50
    expire_in: 1 hour
Kyle Robbertze's avatar
Kyle Robbertze committed
51 52
  only:
  - master