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.

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