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.

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