.gitlab-ci.yml 2 KB
Newer Older
Bengt Giger's avatar
Bengt Giger committed
1
---
2
image: quay.io/ansible/toolset:0.4
Bengt Giger's avatar
Bengt Giger committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
services:
  - docker:19.03.0-dind

variables:
  PY_COLORS: 1
  GIT_STRATEGY: clone
  # DOCKER_HOST: tcp://localhost:2375
  DOCKER_TLS_CERTDIR: ""

stages:
  - tests

before_script:
  - docker -v
  - python -V
  - ansible --version
  - molecule --version

# Test timeservice on dedicated gitlab-runner server
Bengt Giger's avatar
Bengt Giger committed
22
timeservice-chrony-test:
Bengt Giger's avatar
Bengt Giger committed
23
24
25
26
27
28
  stage: tests
  tags:
    - docker
  script:
    - cd roles/timeservice;
      molecule test;
29
30
31
32
  only:
    changes:
      - .gitlab-ci.yml
      - roles/timeservice/**/*
33
34
35
36
37
38
timeservice-ntp-test:
  stage: tests
  tags:
    - docker
  script:
    - cd roles/timeservice;
Bengt Giger's avatar
Bengt Giger committed
39
      molecule test -s ntp;
40
41
42
43
  only:
    changes:
      - .gitlab-ci.yml
      - roles/timeservice/**/*
Bengt Giger's avatar
Bengt Giger committed
44
45
46
47
48
49
50
51
52
53
54

# Test private_subnet_client on Kubernetes
private_subnet_client-test:
  stage: tests
  tags:
    - k8s-runner
  variables:
    DOCKER_HOST: tcp://localhost:2375
  script:
    - cd roles/private_subnet_client;
      molecule test;
55
56
57
58
  only:
    changes:
      - .gitlab-ci.yml
      - roles/private_subnet_client/**/*
Bengt Giger's avatar
Bengt Giger committed
59

Bengt Giger's avatar
Bengt Giger committed
60
# Test console_configuration on Kubernetes
Bengt Giger's avatar
Bengt Giger committed
61
62
63
64
65
66
67
68
69
console_configuration-test:
  stage: tests
  tags:
    - k8s-runner
  variables:
    DOCKER_HOST: tcp://localhost:2375
  script:
    - cd roles/console_configuration;
      molecule test;
70
71
72
73
  only:
    changes:
      - .gitlab-ci.yml
      - roles/console_configuration/**/*
Bengt Giger's avatar
Bengt Giger committed
74
75
76
77
78
79
80
81
82
83

# Test system_update_manager on Kubernetes
system_update_manager-test:
  stage: tests
  tags:
    - k8s-runner
  variables:
    DOCKER_HOST: tcp://localhost:2375
  script:
    - cd roles/system_update_manager;
Bengt Giger's avatar
Bengt Giger committed
84
      molecule test -s remove;
Bengt Giger's avatar
Bengt Giger committed
85
86
87
      molecule test;
      molecule test -s increase;
      molecule test -s decrease;
88
89
90
91
92
  only:
    changes:
      - .gitlab-ci.yml
      - roles/system_update_manager/**/*

Bengt Giger's avatar
Bengt Giger committed
93
94
95
96
97
98
99
100
101

# Test rsyslog_forwarder on dedicated runner (systemd)
rsyslog_forwarder-test:
  stage: tests
  tags:
    - docker
  script:
    - cd roles/rsyslog_forwarder;
      molecule test;
102
103
104
105
  only:
    changes:
      - .gitlab-ci.yml
      - roles/rsyslog_forwarder/**/*