.gitlab-ci.yml 2.45 KB
Newer Older
1
---
2 3 4
image: quay.io/ansible/molecule:latest
services:
  - docker:dind
5

6 7 8 9
stages:
  - tests

before_script:
10 11 12 13
  - docker -v
  - python -V
  - ansible --version
  - molecule --version
14 15 16 17 18

molecule-role-common:
  stage: tests
  tags:
    - docker
19 20 21
  variables:
    DOCKER_HOST: "tcp://docker:2375"
    PY_COLORS: 1
22
  script:
Romain Dessort's avatar
Romain Dessort committed
23
    - cd roles/common/
24 25 26 27
    - molecule test
  only:
    changes:
      - roles/common/**/*
28 29 30 31 32

molecule-role-monitoring-tools:
  stage: tests
  tags:
    - docker
33 34 35
  variables:
    DOCKER_HOST: "tcp://docker:2375"
    PY_COLORS: 1
36 37 38
  script:
    - cd roles/monitoring-tools/
    - molecule test
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
  only:
    changes:
      - roles/monitoring-tools/**/*

molecule-role-redis:
  stage: tests
  tags:
    - docker
  variables:
    DOCKER_HOST: "tcp://docker:2375"
    PY_COLORS: 1
  script:
    - cd roles/redis/
    - molecule test
  only:
    changes:
      - roles/redis/**/*
56 57 58 59 60 61 62 63 64 65 66 67 68 69

molecule-role-firewall:
  stage: tests
  tags:
    - docker
  variables:
    DOCKER_HOST: "tcp://docker:2375"
    PY_COLORS: 1
  script:
    - cd roles/firewall/
    - molecule test
  only:
    changes:
      - roles/firewall/**/*
70 71 72 73 74 75 76 77 78 79 80 81 82 83

molecule-role-nginx:
  stage: tests
  tags:
    - docker
  variables:
    DOCKER_HOST: "tcp://docker:2375"
    PY_COLORS: 1
  script:
    - cd roles/nginx/
    - molecule test
  only:
    changes:
      - roles/nginx/**/*
84 85 86 87 88 89 90 91 92 93 94 95 96 97

molecule-role-syslog:
  stage: tests
  tags:
    - docker
  variables:
    DOCKER_HOST: "tcp://docker:2375"
    PY_COLORS: 1
  script:
    - cd roles/syslog/
    - molecule test
  only:
    changes:
      - roles/syslog/**/*
98 99 100 101 102 103 104 105 106 107 108 109 110 111

molecule-role-postgresql:
  stage: tests
  tags:
    - docker
  variables:
    DOCKER_HOST: "tcp://docker:2375"
    PY_COLORS: 1
  script:
    - cd roles/postgresql/
    - molecule test
  only:
    changes:
      - roles/postgresql/**/*
112 113 114 115 116 117 118 119 120 121 122 123 124 125

molecule-role-postfix:
  stage: tests
  tags:
    - docker
  variables:
    DOCKER_HOST: "tcp://docker:2375"
    PY_COLORS: 1
  script:
    - cd roles/postfix/
    - molecule test
  only:
    changes:
      - roles/postfix/**/*
126 127 128 129 130 131 132 133 134 135 136 137 138 139

molecule-role-php-fpm:
  stage: tests
  tags:
    - docker
  variables:
    DOCKER_HOST: "tcp://docker:2375"
    PY_COLORS: 1
  script:
    - cd roles/php-fpm/
    - molecule test
  only:
    changes:
      - roles/php-fpm/**/*
140 141 142 143 144 145 146 147 148 149 150 151 152 153

molecule-role-elasticsearch:
  stage: tests
  tags:
    - docker
  variables:
    DOCKER_HOST: "tcp://docker:2375"
    PY_COLORS: 1
  script:
    - cd roles/elasticsearch/
    - molecule test
  only:
    changes:
      - roles/elasticsearch/**/*