You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

598 lines
17 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
  1. stages:
  2. - moderator
  3. - unit-tests
  4. - deploy-gce-part1
  5. - deploy-gce-part2
  6. - deploy-gce-special
  7. variables:
  8. FAILFASTCI_NAMESPACE: 'kargo-ci'
  9. # DOCKER_HOST: tcp://localhost:2375
  10. ANSIBLE_FORCE_COLOR: "true"
  11. # asia-east1-a
  12. # asia-northeast1-a
  13. # europe-west1-b
  14. # us-central1-a
  15. # us-east1-b
  16. # us-west1-a
  17. before_script:
  18. - pip install ansible==2.2.1.0
  19. - pip install netaddr
  20. - pip install apache-libcloud==0.20.1
  21. - pip install boto==2.9.0
  22. - mkdir -p /.ssh
  23. - cp tests/ansible.cfg .
  24. .job: &job
  25. tags:
  26. - kubernetes
  27. - docker
  28. image: quay.io/ant31/kargo:master
  29. .docker_service: &docker_service
  30. services:
  31. - docker:dind
  32. .create_cluster: &create_cluster
  33. <<: *job
  34. <<: *docker_service
  35. .gce_variables: &gce_variables
  36. GCE_USER: travis
  37. SSH_USER: $GCE_USER
  38. TEST_ID: "$CI_PIPELINE_ID-$CI_BUILD_ID"
  39. CONTAINER_ENGINE: docker
  40. PRIVATE_KEY: $GCE_PRIVATE_KEY
  41. GS_ACCESS_KEY_ID: $GS_KEY
  42. GS_SECRET_ACCESS_KEY: $GS_SECRET
  43. ANSIBLE_KEEP_REMOTE_FILES: "1"
  44. ANSIBLE_CONFIG: ./tests/ansible.cfg
  45. BOOTSTRAP_OS: none
  46. IDEMPOT_CHECK: "false"
  47. UPGRADE_TEST: "false"
  48. RESOLVCONF_MODE: docker_dns
  49. LOG_LEVEL: "-vv"
  50. ETCD_DEPLOYMENT: "docker"
  51. KUBELET_DEPLOYMENT: "docker"
  52. VAULT_DEPLOYMENT: "docker"
  53. WEAVE_CPU_LIMIT: "100m"
  54. MAGIC: "ci check this"
  55. .gce: &gce
  56. <<: *job
  57. <<: *docker_service
  58. cache:
  59. key: "$CI_BUILD_REF_NAME"
  60. paths:
  61. - downloads/
  62. - $HOME/.cache
  63. before_script:
  64. - docker info
  65. - pip install ansible==2.2.1.0
  66. - pip install netaddr
  67. - pip install apache-libcloud==0.20.1
  68. - pip install boto==2.9.0
  69. - mkdir -p /.ssh
  70. - mkdir -p $HOME/.ssh
  71. - echo $PRIVATE_KEY | base64 -d > $HOME/.ssh/id_rsa
  72. - echo $GCE_PEM_FILE | base64 -d > $HOME/.ssh/gce
  73. - echo $GCE_CREDENTIALS > $HOME/.ssh/gce.json
  74. - chmod 400 $HOME/.ssh/id_rsa
  75. - ansible-playbook --version
  76. - export PYPATH=$([ $BOOTSTRAP_OS = none ] && echo /usr/bin/python || echo /opt/bin/python)
  77. script:
  78. - pwd
  79. - ls
  80. - echo ${PWD}
  81. - >
  82. ansible-playbook tests/cloud_playbooks/create-gce.yml -i tests/local_inventory/hosts.cfg -c local
  83. ${LOG_LEVEL}
  84. -e cloud_image=${CLOUD_IMAGE}
  85. -e cloud_region=${CLOUD_REGION}
  86. -e gce_credentials_file=${HOME}/.ssh/gce.json
  87. -e gce_project_id=${GCE_PROJECT_ID}
  88. -e gce_service_account_email=${GCE_ACCOUNT}
  89. -e inventory_path=${PWD}/inventory/inventory.ini
  90. -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  91. -e mode=${CLUSTER_MODE}
  92. -e test_id=${TEST_ID}
  93. # Check out latest tag if testing upgrade
  94. # Uncomment when gitlab kargo repo has tags
  95. #- test "${UPGRADE_TEST}" != "false" && git fetch --all && git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
  96. - test "${UPGRADE_TEST}" != "false" && git checkout 031cf565ec3ccd3ebbe80eeef3454c3780e5c598 && pip install ansible==2.2.0
  97. # Create cluster
  98. - >
  99. ansible-playbook -i inventory/inventory.ini -b --become-user=root --private-key=${HOME}/.ssh/id_rsa -u $SSH_USER
  100. ${SSH_ARGS}
  101. ${LOG_LEVEL}
  102. -e ansible_python_interpreter=${PYPATH}
  103. -e ansible_ssh_user=${SSH_USER}
  104. -e bootstrap_os=${BOOTSTRAP_OS}
  105. -e cert_management=${CERT_MGMT:-script}
  106. -e cloud_provider=gce
  107. -e deploy_netchecker=true
  108. -e download_localhost=true
  109. -e download_run_once=true
  110. -e etcd_deployment_type=${ETCD_DEPLOYMENT}
  111. -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  112. -e kubelet_deployment_type=${KUBELET_DEPLOYMENT}
  113. -e local_release_dir=${PWD}/downloads
  114. -e resolvconf_mode=${RESOLVCONF_MODE}
  115. -e vault_deployment_type=${VAULT_DEPLOYMENT}
  116. --limit "all:!fake_hosts"
  117. cluster.yml
  118. # Repeat deployment if testing upgrade
  119. - >
  120. if [ "${UPGRADE_TEST}" != "false" ]; then
  121. test "${UPGRADE_TEST}" == "basic" && PLAYBOOK="cluster.yml";
  122. test "${UPGRADE_TEST}" == "graceful" && PLAYBOOK="upgrade-cluster.yml";
  123. pip install ansible==2.2.1.0;
  124. git checkout "${CI_BUILD_REF}";
  125. ansible-playbook -i inventory/inventory.ini -b --become-user=root --private-key=${HOME}/.ssh/id_rsa -u $SSH_USER
  126. ${SSH_ARGS}
  127. ${LOG_LEVEL}
  128. -e ansible_python_interpreter=${PYPATH}
  129. -e ansible_ssh_user=${SSH_USER}
  130. -e bootstrap_os=${BOOTSTRAP_OS}
  131. -e cloud_provider=gce
  132. -e deploy_netchecker=true
  133. -e download_localhost=true
  134. -e download_run_once=true
  135. -e etcd_deployment_type=${ETCD_DEPLOYMENT}
  136. -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  137. -e kubelet_deployment_type=${KUBELET_DEPLOYMENT}
  138. -e local_release_dir=${PWD}/downloads
  139. -e resolvconf_mode=${RESOLVCONF_MODE}
  140. -e weave_cpu_requests=${WEAVE_CPU_LIMIT}
  141. -e weave_cpu_limit=${WEAVE_CPU_LIMIT}
  142. --limit "all:!fake_hosts"
  143. $PLAYBOOK;
  144. fi
  145. # Tests Cases
  146. ## Test Master API
  147. - ansible-playbook -i inventory/inventory.ini -e ansible_python_interpreter=${PYPATH} -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root --limit "all:!fake_hosts" tests/testcases/010_check-apiserver.yml $LOG_LEVEL
  148. ## Ping the between 2 pod
  149. - ansible-playbook -i inventory/inventory.ini -e ansible_python_interpreter=${PYPATH} -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root --limit "all:!fake_hosts" tests/testcases/030_check-network.yml $LOG_LEVEL
  150. ## Advanced DNS checks
  151. - ansible-playbook -i inventory/inventory.ini -e ansible_python_interpreter=${PYPATH} -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root --limit "all:!fake_hosts" tests/testcases/040_check-network-adv.yml $LOG_LEVEL
  152. ## Idempotency checks 1/5 (repeat deployment)
  153. - >
  154. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  155. ansible-playbook -i inventory/inventory.ini -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS
  156. -b --become-user=root -e cloud_provider=gce $LOG_LEVEL -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  157. --private-key=${HOME}/.ssh/id_rsa
  158. -e bootstrap_os=${BOOTSTRAP_OS}
  159. -e ansible_python_interpreter=${PYPATH}
  160. -e download_run_once=true
  161. -e download_localhost=true
  162. -e deploy_netchecker=true
  163. -e resolvconf_mode=${RESOLVCONF_MODE}
  164. -e local_release_dir=${PWD}/downloads
  165. -e etcd_deployment_type=${ETCD_DEPLOYMENT}
  166. -e kubelet_deployment_type=${KUBELET_DEPLOYMENT}
  167. --limit "all:!fake_hosts"
  168. cluster.yml;
  169. fi
  170. ## Idempotency checks 2/5 (Advanced DNS checks)
  171. - >
  172. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  173. ansible-playbook -i inventory/inventory.ini -e ansible_python_interpreter=${PYPATH}
  174. -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root
  175. --limit "all:!fake_hosts"
  176. tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  177. fi
  178. ## Idempotency checks 3/5 (reset deployment)
  179. - >
  180. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  181. ansible-playbook -i inventory/inventory.ini -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS
  182. -b --become-user=root -e cloud_provider=gce $LOG_LEVEL -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  183. --private-key=${HOME}/.ssh/id_rsa
  184. -e bootstrap_os=${BOOTSTRAP_OS}
  185. -e ansible_python_interpreter=${PYPATH}
  186. -e reset_confirmation=yes
  187. --limit "all:!fake_hosts"
  188. reset.yml;
  189. fi
  190. ## Idempotency checks 4/5 (redeploy after reset)
  191. - >
  192. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  193. ansible-playbook -i inventory/inventory.ini -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS
  194. -b --become-user=root -e cloud_provider=gce $LOG_LEVEL -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  195. --private-key=${HOME}/.ssh/id_rsa
  196. -e bootstrap_os=${BOOTSTRAP_OS}
  197. -e ansible_python_interpreter=${PYPATH}
  198. -e download_run_once=true
  199. -e download_localhost=true
  200. -e deploy_netchecker=true
  201. -e resolvconf_mode=${RESOLVCONF_MODE}
  202. -e local_release_dir=${PWD}/downloads
  203. -e etcd_deployment_type=${ETCD_DEPLOYMENT}
  204. -e kubelet_deployment_type=${KUBELET_DEPLOYMENT}
  205. --limit "all:!fake_hosts"
  206. cluster.yml;
  207. fi
  208. ## Idempotency checks 5/5 (Advanced DNS checks)
  209. - >
  210. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  211. ansible-playbook -i inventory/inventory.ini -e ansible_python_interpreter=${PYPATH}
  212. -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root
  213. --limit "all:!fake_hosts"
  214. tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  215. fi
  216. after_script:
  217. - >
  218. ansible-playbook -i inventory/inventory.ini tests/cloud_playbooks/delete-gce.yml -c local $LOG_LEVEL
  219. -e mode=${CLUSTER_MODE}
  220. -e test_id=${TEST_ID}
  221. -e kube_network_plugin=${KUBE_NETWORK_PLUGIN}
  222. -e gce_project_id=${GCE_PROJECT_ID}
  223. -e gce_service_account_email=${GCE_ACCOUNT}
  224. -e gce_credentials_file=${HOME}/.ssh/gce.json
  225. -e cloud_image=${CLOUD_IMAGE}
  226. -e inventory_path=${PWD}/inventory/inventory.ini
  227. -e cloud_region=${CLOUD_REGION}
  228. # Test matrix. Leave the comments for markup scripts.
  229. .coreos_calico_sep_variables: &coreos_calico_sep_variables
  230. # stage: deploy-gce-part1
  231. KUBE_NETWORK_PLUGIN: calico
  232. CLOUD_IMAGE: coreos-stable-1235-6-0-v20170111
  233. CLOUD_REGION: us-west1-b
  234. CLUSTER_MODE: separate
  235. BOOTSTRAP_OS: coreos
  236. RESOLVCONF_MODE: host_resolvconf # This is required as long as the CoreOS stable channel uses docker < 1.12
  237. .debian8_canal_ha_variables: &debian8_canal_ha_variables
  238. # stage: deploy-gce-part1
  239. KUBE_NETWORK_PLUGIN: canal
  240. CLOUD_IMAGE: debian-8-kubespray
  241. CLOUD_REGION: us-east1-b
  242. UPGRADE_TEST: "basic"
  243. CLUSTER_MODE: ha
  244. .rhel7_weave_variables: &rhel7_weave_variables
  245. # stage: deploy-gce-part1
  246. KUBE_NETWORK_PLUGIN: weave
  247. CLOUD_IMAGE: rhel-7
  248. CLOUD_REGION: europe-west1-b
  249. CLUSTER_MODE: default
  250. .centos7_flannel_variables: &centos7_flannel_variables
  251. # stage: deploy-gce-part2
  252. KUBE_NETWORK_PLUGIN: flannel
  253. CLOUD_IMAGE: centos-7
  254. CLOUD_REGION: us-west1-a
  255. CLUSTER_MODE: default
  256. .debian8_calico_variables: &debian8_calico_variables
  257. # stage: deploy-gce-part2
  258. KUBE_NETWORK_PLUGIN: calico
  259. CLOUD_IMAGE: debian-8-kubespray
  260. CLOUD_REGION: us-central1-b
  261. CLUSTER_MODE: default
  262. UPGRADE_TEST: "graceful"
  263. .coreos_canal_variables: &coreos_canal_variables
  264. # stage: deploy-gce-part2
  265. KUBE_NETWORK_PLUGIN: canal
  266. CLOUD_IMAGE: coreos-stable-1235-6-0-v20170111
  267. CLOUD_REGION: us-east1-b
  268. CLUSTER_MODE: default
  269. BOOTSTRAP_OS: coreos
  270. IDEMPOT_CHECK: "true"
  271. RESOLVCONF_MODE: host_resolvconf # This is required as long as the CoreOS stable channel uses docker < 1.12
  272. .rhel7_canal_sep_variables: &rhel7_canal_sep_variables
  273. # stage: deploy-gce-special
  274. KUBE_NETWORK_PLUGIN: canal
  275. CLOUD_IMAGE: rhel-7
  276. CLOUD_REGION: us-east1-b
  277. CLUSTER_MODE: separate
  278. .ubuntu_weave_sep_variables: &ubuntu_weave_sep_variables
  279. # stage: deploy-gce-special
  280. KUBE_NETWORK_PLUGIN: weave
  281. CLOUD_IMAGE: ubuntu-1604-xenial
  282. CLOUD_REGION: us-central1-b
  283. CLUSTER_MODE: separate
  284. IDEMPOT_CHECK: "false"
  285. .centos7_calico_ha_variables: &centos7_calico_ha_variables
  286. # stage: deploy-gce-special
  287. KUBE_NETWORK_PLUGIN: calico
  288. CLOUD_IMAGE: centos-7
  289. CLOUD_REGION: europe-west1-b
  290. CLUSTER_MODE: ha-scale
  291. IDEMPOT_CHECK: "true"
  292. .coreos_alpha_weave_ha_variables: &coreos_alpha_weave_ha_variables
  293. # stage: deploy-gce-special
  294. KUBE_NETWORK_PLUGIN: weave
  295. CLOUD_IMAGE: coreos-alpha-1325-0-0-v20170216
  296. CLOUD_REGION: us-west1-a
  297. CLUSTER_MODE: ha-scale
  298. BOOTSTRAP_OS: coreos
  299. RESOLVCONF_MODE: host_resolvconf # This is required as long as the CoreOS stable channel uses docker < 1.12
  300. .ubuntu_rkt_sep_variables: &ubuntu_rkt_sep_variables
  301. # stage: deploy-gce-part1
  302. KUBE_NETWORK_PLUGIN: flannel
  303. CLOUD_IMAGE: ubuntu-1604-xenial
  304. CLOUD_REGION: us-central1-b
  305. CLUSTER_MODE: separate
  306. ETCD_DEPLOYMENT: rkt
  307. KUBELET_DEPLOYMENT: rkt
  308. .ubuntu_vault_sep_variables: &ubuntu_vault_sep_variables
  309. # stage: deploy-gce-part1
  310. KUBE_NETWORK_PLUGIN: canal
  311. CERT_MGMT: vault
  312. CLOUD_IMAGE: ubuntu-1604-xenial
  313. CLOUD_REGION: us-central1-b
  314. CLUSTER_MODE: separate
  315. # Builds for PRs only (premoderated by unit-tests step) and triggers (auto)
  316. coreos-calico-sep:
  317. stage: deploy-gce-part1
  318. <<: *job
  319. <<: *gce
  320. variables:
  321. <<: *gce_variables
  322. <<: *coreos_calico_sep_variables
  323. when: on_success
  324. except: ['triggers']
  325. only: [/^pr-.*$/]
  326. coreos-calico-sep-triggers:
  327. stage: deploy-gce-part1
  328. <<: *job
  329. <<: *gce
  330. variables:
  331. <<: *gce_variables
  332. <<: *coreos_calico_sep_variables
  333. when: on_success
  334. only: ['triggers']
  335. centos7-flannel:
  336. stage: deploy-gce-part2
  337. <<: *job
  338. <<: *gce
  339. variables:
  340. <<: *gce_variables
  341. <<: *centos7_flannel_variables
  342. when: on_success
  343. except: ['triggers']
  344. only: [/^pr-.*$/]
  345. centos7-flannel-triggers:
  346. stage: deploy-gce-part1
  347. <<: *job
  348. <<: *gce
  349. variables:
  350. <<: *gce_variables
  351. <<: *centos7_flannel_variables
  352. when: on_success
  353. only: ['triggers']
  354. ubuntu-weave-sep:
  355. stage: deploy-gce-special
  356. <<: *job
  357. <<: *gce
  358. variables:
  359. <<: *gce_variables
  360. <<: *ubuntu_weave_sep_variables
  361. when: on_success
  362. except: ['triggers']
  363. only: [/^pr-.*$/]
  364. ubuntu-weave-sep-triggers:
  365. stage: deploy-gce-part1
  366. <<: *job
  367. <<: *gce
  368. variables:
  369. <<: *gce_variables
  370. <<: *ubuntu_weave_sep_variables
  371. when: on_success
  372. only: ['triggers']
  373. # More builds for PRs/merges (manual) and triggers (auto)
  374. debian8-canal-ha:
  375. stage: deploy-gce-part1
  376. <<: *job
  377. <<: *gce
  378. variables:
  379. <<: *gce_variables
  380. <<: *debian8_canal_ha_variables
  381. when: manual
  382. except: ['triggers']
  383. only: ['master', /^pr-.*$/]
  384. debian8-canal-ha-triggers:
  385. stage: deploy-gce-part1
  386. <<: *job
  387. <<: *gce
  388. variables:
  389. <<: *gce_variables
  390. <<: *debian8_canal_ha_variables
  391. when: on_success
  392. only: ['triggers']
  393. rhel7-weave:
  394. stage: deploy-gce-part1
  395. <<: *job
  396. <<: *gce
  397. variables:
  398. <<: *gce_variables
  399. <<: *rhel7_weave_variables
  400. when: manual
  401. except: ['triggers']
  402. only: ['master', /^pr-.*$/]
  403. rhel7-weave-triggers:
  404. stage: deploy-gce-part1
  405. <<: *job
  406. <<: *gce
  407. variables:
  408. <<: *gce_variables
  409. <<: *rhel7_weave_variables
  410. when: on_success
  411. only: ['triggers']
  412. debian8-calico-upgrade:
  413. stage: deploy-gce-part2
  414. <<: *job
  415. <<: *gce
  416. variables:
  417. <<: *gce_variables
  418. <<: *debian8_calico_variables
  419. when: manual
  420. except: ['triggers']
  421. only: ['master', /^pr-.*$/]
  422. debian8-calico-triggers:
  423. stage: deploy-gce-part1
  424. <<: *job
  425. <<: *gce
  426. variables:
  427. <<: *gce_variables
  428. <<: *debian8_calico_variables
  429. when: on_success
  430. only: ['triggers']
  431. coreos-canal:
  432. stage: deploy-gce-part2
  433. <<: *job
  434. <<: *gce
  435. variables:
  436. <<: *gce_variables
  437. <<: *coreos_canal_variables
  438. when: manual
  439. except: ['triggers']
  440. only: ['master', /^pr-.*$/]
  441. coreos-canal-triggers:
  442. stage: deploy-gce-part1
  443. <<: *job
  444. <<: *gce
  445. variables:
  446. <<: *gce_variables
  447. <<: *coreos_canal_variables
  448. when: on_success
  449. only: ['triggers']
  450. rhel7-canal-sep:
  451. stage: deploy-gce-special
  452. <<: *job
  453. <<: *gce
  454. variables:
  455. <<: *gce_variables
  456. <<: *rhel7_canal_sep_variables
  457. when: manual
  458. except: ['triggers']
  459. only: ['master', /^pr-.*$/,]
  460. rhel7-canal-sep-triggers:
  461. stage: deploy-gce-part1
  462. <<: *job
  463. <<: *gce
  464. variables:
  465. <<: *gce_variables
  466. <<: *rhel7_canal_sep_variables
  467. when: on_success
  468. only: ['triggers']
  469. centos7-calico-ha:
  470. stage: deploy-gce-special
  471. <<: *job
  472. <<: *gce
  473. variables:
  474. <<: *gce_variables
  475. <<: *centos7_calico_ha_variables
  476. when: manual
  477. except: ['triggers']
  478. only: ['master', /^pr-.*$/]
  479. centos7-calico-ha-triggers:
  480. stage: deploy-gce-part1
  481. <<: *job
  482. <<: *gce
  483. variables:
  484. <<: *gce_variables
  485. <<: *centos7_calico_ha_variables
  486. when: on_success
  487. only: ['triggers']
  488. # no triggers yet https://github.com/kubernetes-incubator/kargo/issues/613
  489. coreos-alpha-weave-ha:
  490. stage: deploy-gce-special
  491. <<: *job
  492. <<: *gce
  493. variables:
  494. <<: *gce_variables
  495. <<: *coreos_alpha_weave_ha_variables
  496. when: manual
  497. except: ['triggers']
  498. only: ['master', /^pr-.*$/]
  499. ubuntu-rkt-sep-upgrade:
  500. stage: deploy-gce-part1
  501. <<: *job
  502. <<: *gce
  503. variables:
  504. <<: *gce_variables
  505. <<: *ubuntu_rkt_sep_variables
  506. when: manual
  507. except: ['triggers']
  508. only: ['master', /^pr-.*$/]
  509. ubuntu-vault-sep:
  510. stage: deploy-gce-part1
  511. <<: *job
  512. <<: *gce
  513. variables:
  514. <<: *gce_variables
  515. <<: *ubuntu_vault_sep_variables
  516. when: manual
  517. except: ['triggers']
  518. only: ['master', /^pr-.*$/]
  519. # Premoderated with manual actions
  520. ci-authorized:
  521. <<: *job
  522. stage: moderator
  523. before_script:
  524. - apt-get -y install jq
  525. script:
  526. - /bin/sh scripts/premoderator.sh
  527. except: ['triggers', 'master']
  528. syntax-check:
  529. <<: *job
  530. stage: unit-tests
  531. script:
  532. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check
  533. except: ['triggers', 'master']
  534. tox-inventory-builder:
  535. stage: unit-tests
  536. <<: *job
  537. script:
  538. - pip install tox
  539. - cd contrib/inventory_builder && tox
  540. when: manual
  541. except: ['triggers', 'master']