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.

636 lines
16 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
contiv network support (#1914) * Add Contiv support Contiv is a network plugin for Kubernetes and Docker. It supports vlan/vxlan/BGP/Cisco ACI technologies. It support firewall policies, multiple networks and bridging pods onto physical networks. * Update contiv version to 1.1.4 Update contiv version to 1.1.4 and added SVC_SUBNET in contiv-config. * Load openvswitch module to workaround on CentOS7.4 * Set contiv cni version to 0.1.0 Correct contiv CNI version to 0.1.0. * Use kube_apiserver_endpoint for K8S_API_SERVER Use kube_apiserver_endpoint as K8S_API_SERVER to make contiv talks to a available endpoint no matter if there's a loadbalancer or not. * Make contiv use its own etcd Before this commit, contiv is using a etcd proxy mode to k8s etcd, this work fine when the etcd hosts are co-located with contiv etcd proxy, however the k8s peering certs are only in etcd group, as a result the etcd-proxy is not able to peering with the k8s etcd on etcd group, plus the netplugin is always trying to find the etcd endpoint on localhost, this will cause problem for all netplugins not runnign on etcd group nodes. This commit make contiv uses its own etcd, separate from k8s one. on kube-master nodes (where net-master runs), it will run as leader mode and on all rest nodes it will run as proxy mode. * Use cp instead of rsync to copy cni binaries Since rsync has been removed from hyperkube, this commit changes it to use cp instead. * Make contiv-etcd able to run on master nodes * Add rbac_enabled flag for contiv pods * Add contiv into CNI network plugin lists * migrate contiv test to tests/files Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> * Add required rules for contiv netplugin * Better handling json return of fwdMode * Make contiv etcd port configurable * Use default var instead of templating * roles/download/defaults/main.yml: use contiv 1.1.7 Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
6 years ago
contiv network support (#1914) * Add Contiv support Contiv is a network plugin for Kubernetes and Docker. It supports vlan/vxlan/BGP/Cisco ACI technologies. It support firewall policies, multiple networks and bridging pods onto physical networks. * Update contiv version to 1.1.4 Update contiv version to 1.1.4 and added SVC_SUBNET in contiv-config. * Load openvswitch module to workaround on CentOS7.4 * Set contiv cni version to 0.1.0 Correct contiv CNI version to 0.1.0. * Use kube_apiserver_endpoint for K8S_API_SERVER Use kube_apiserver_endpoint as K8S_API_SERVER to make contiv talks to a available endpoint no matter if there's a loadbalancer or not. * Make contiv use its own etcd Before this commit, contiv is using a etcd proxy mode to k8s etcd, this work fine when the etcd hosts are co-located with contiv etcd proxy, however the k8s peering certs are only in etcd group, as a result the etcd-proxy is not able to peering with the k8s etcd on etcd group, plus the netplugin is always trying to find the etcd endpoint on localhost, this will cause problem for all netplugins not runnign on etcd group nodes. This commit make contiv uses its own etcd, separate from k8s one. on kube-master nodes (where net-master runs), it will run as leader mode and on all rest nodes it will run as proxy mode. * Use cp instead of rsync to copy cni binaries Since rsync has been removed from hyperkube, this commit changes it to use cp instead. * Make contiv-etcd able to run on master nodes * Add rbac_enabled flag for contiv pods * Add contiv into CNI network plugin lists * migrate contiv test to tests/files Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> * Add required rules for contiv netplugin * Better handling json return of fwdMode * Make contiv etcd port configurable * Use default var instead of templating * roles/download/defaults/main.yml: use contiv 1.1.7 Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
6 years ago
7 years ago
6 years ago
7 years ago
6 years ago
  1. stages:
  2. - unit-tests
  3. - moderator
  4. - deploy-part1
  5. - deploy-part2
  6. - deploy-special
  7. variables:
  8. FAILFASTCI_NAMESPACE: 'kargo-ci'
  9. # DOCKER_HOST: tcp://localhost:2375
  10. ANSIBLE_FORCE_COLOR: "true"
  11. MAGIC: "ci check this"
  12. TEST_ID: "$CI_PIPELINE_ID-$CI_BUILD_ID"
  13. CI_TEST_VARS: "./tests/files/${CI_JOB_NAME}.yml"
  14. GS_ACCESS_KEY_ID: $GS_KEY
  15. GS_SECRET_ACCESS_KEY: $GS_SECRET
  16. CONTAINER_ENGINE: docker
  17. SSH_USER: root
  18. GCE_PREEMPTIBLE: "false"
  19. ANSIBLE_KEEP_REMOTE_FILES: "1"
  20. ANSIBLE_CONFIG: ./tests/ansible.cfg
  21. IDEMPOT_CHECK: "false"
  22. RESET_CHECK: "false"
  23. UPGRADE_TEST: "false"
  24. KUBEADM_ENABLED: "false"
  25. LOG_LEVEL: "-vv"
  26. # asia-east1-a
  27. # asia-northeast1-a
  28. # europe-west1-b
  29. # us-central1-a
  30. # us-east1-b
  31. # us-west1-a
  32. before_script:
  33. - /usr/bin/python -m pip install -r tests/requirements.txt
  34. - mkdir -p /.ssh
  35. .job: &job
  36. tags:
  37. - kubernetes
  38. - docker
  39. image: quay.io/kubespray/kubespray:latest
  40. .docker_service: &docker_service
  41. services:
  42. - docker:dind
  43. .create_cluster: &create_cluster
  44. <<: *job
  45. <<: *docker_service
  46. .gce_variables: &gce_variables
  47. GCE_USER: travis
  48. SSH_USER: $GCE_USER
  49. CLOUD_MACHINE_TYPE: "g1-small"
  50. CI_PLATFORM: "gce"
  51. PRIVATE_KEY: $GCE_PRIVATE_KEY
  52. .do_variables: &do_variables
  53. PRIVATE_KEY: $DO_PRIVATE_KEY
  54. CI_PLATFORM: "do"
  55. SSH_USER: root
  56. .testcases: &testcases
  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. - /usr/bin/python -m pip install -r requirements.txt
  67. - /usr/bin/python -m pip install -r tests/requirements.txt
  68. - mkdir -p /.ssh
  69. - mkdir -p $HOME/.ssh
  70. - ansible-playbook --version
  71. - export PYPATH=$([[ ! "$CI_JOB_NAME" =~ "coreos" ]] && echo /usr/bin/python || echo /opt/bin/python)
  72. - echo "CI_JOB_NAME is $CI_JOB_NAME"
  73. - echo "PYPATH is $PYPATH"
  74. script:
  75. - pwd
  76. - ls
  77. - echo ${PWD}
  78. - echo "${STARTUP_SCRIPT}"
  79. - cd tests && make create-${CI_PLATFORM} -s ; cd -
  80. # Check out latest tag if testing upgrade
  81. # Uncomment when gitlab kargo repo has tags
  82. #- test "${UPGRADE_TEST}" != "false" && git fetch --all && git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
  83. - test "${UPGRADE_TEST}" != "false" && git checkout ba0a03a8ba2d97a73d06242ec4bb3c7e2012e58c
  84. # Checkout the CI vars file so it is available
  85. - test "${UPGRADE_TEST}" != "false" && git checkout "${CI_BUILD_REF}" tests/files/${CI_JOB_NAME}.yml
  86. # Workaround https://github.com/kubernetes-incubator/kubespray/issues/2021
  87. - 'sh -c "echo ignore_assert_errors: true | tee -a tests/files/${CI_JOB_NAME}.yml"'
  88. # Create cluster
  89. - >
  90. ansible-playbook
  91. -i inventory/sample/hosts.ini
  92. -b --become-user=root
  93. --private-key=${HOME}/.ssh/id_rsa
  94. -u $SSH_USER
  95. ${SSH_ARGS}
  96. ${LOG_LEVEL}
  97. -e @${CI_TEST_VARS}
  98. -e ansible_python_interpreter=${PYPATH}
  99. -e ansible_ssh_user=${SSH_USER}
  100. -e local_release_dir=${PWD}/downloads
  101. --limit "all:!fake_hosts"
  102. cluster.yml
  103. # Repeat deployment if testing upgrade
  104. - >
  105. if [ "${UPGRADE_TEST}" != "false" ]; then
  106. test "${UPGRADE_TEST}" == "basic" && PLAYBOOK="cluster.yml";
  107. test "${UPGRADE_TEST}" == "graceful" && PLAYBOOK="upgrade-cluster.yml";
  108. git checkout "${CI_BUILD_REF}";
  109. ansible-playbook
  110. -i inventory/sample/hosts.ini
  111. -b --become-user=root
  112. --private-key=${HOME}/.ssh/id_rsa
  113. -u $SSH_USER
  114. ${SSH_ARGS}
  115. ${LOG_LEVEL}
  116. -e @${CI_TEST_VARS}
  117. -e ansible_python_interpreter=${PYPATH}
  118. -e ansible_ssh_user=${SSH_USER}
  119. -e local_release_dir=${PWD}/downloads
  120. --limit "all:!fake_hosts"
  121. $PLAYBOOK;
  122. fi
  123. # Tests Cases
  124. ## Test Master API
  125. - >
  126. ansible-playbook -i inventory/sample/hosts.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
  127. -e "{kubeadm_enabled: ${KUBEADM_ENABLED}}"
  128. ## Ping the between 2 pod
  129. - ansible-playbook -i inventory/sample/hosts.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
  130. ## Advanced DNS checks
  131. - ansible-playbook -i inventory/sample/hosts.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
  132. ## Idempotency checks 1/5 (repeat deployment)
  133. - >
  134. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  135. ansible-playbook
  136. -i inventory/sample/hosts.ini
  137. -b --become-user=root
  138. --private-key=${HOME}/.ssh/id_rsa
  139. -u $SSH_USER
  140. ${SSH_ARGS}
  141. ${LOG_LEVEL}
  142. -e @${CI_TEST_VARS}
  143. -e ansible_python_interpreter=${PYPATH}
  144. -e local_release_dir=${PWD}/downloads
  145. --limit "all:!fake_hosts"
  146. cluster.yml;
  147. fi
  148. ## Idempotency checks 2/5 (Advanced DNS checks)
  149. - >
  150. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  151. ansible-playbook
  152. -i inventory/sample/hosts.ini
  153. -b --become-user=root
  154. --private-key=${HOME}/.ssh/id_rsa
  155. -u $SSH_USER
  156. ${SSH_ARGS}
  157. ${LOG_LEVEL}
  158. -e @${CI_TEST_VARS}
  159. --limit "all:!fake_hosts"
  160. tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  161. fi
  162. ## Idempotency checks 3/5 (reset deployment)
  163. - >
  164. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  165. ansible-playbook
  166. -i inventory/sample/hosts.ini
  167. -b --become-user=root
  168. --private-key=${HOME}/.ssh/id_rsa
  169. -u $SSH_USER
  170. ${SSH_ARGS}
  171. ${LOG_LEVEL}
  172. -e @${CI_TEST_VARS}
  173. -e ansible_python_interpreter=${PYPATH}
  174. -e reset_confirmation=yes
  175. --limit "all:!fake_hosts"
  176. reset.yml;
  177. fi
  178. ## Idempotency checks 4/5 (redeploy after reset)
  179. - >
  180. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  181. ansible-playbook
  182. -i inventory/sample/hosts.ini
  183. -b --become-user=root
  184. --private-key=${HOME}/.ssh/id_rsa
  185. -u $SSH_USER
  186. ${SSH_ARGS}
  187. ${LOG_LEVEL}
  188. -e @${CI_TEST_VARS}
  189. -e ansible_python_interpreter=${PYPATH}
  190. -e local_release_dir=${PWD}/downloads
  191. --limit "all:!fake_hosts"
  192. cluster.yml;
  193. fi
  194. ## Idempotency checks 5/5 (Advanced DNS checks)
  195. - >
  196. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  197. ansible-playbook -i inventory/sample/hosts.ini -e ansible_python_interpreter=${PYPATH}
  198. -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root
  199. --limit "all:!fake_hosts"
  200. tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  201. fi
  202. after_script:
  203. - cd tests && make delete-${CI_PLATFORM} -s ; cd -
  204. .gce: &gce
  205. <<: *testcases
  206. variables:
  207. <<: *gce_variables
  208. .do: &do
  209. variables:
  210. <<: *do_variables
  211. <<: *testcases
  212. # Test matrix. Leave the comments for markup scripts.
  213. .coreos_calico_aio_variables: &coreos_calico_aio_variables
  214. # stage: deploy-part1
  215. MOVED_TO_GROUP_VARS: "true"
  216. .ubuntu_canal_ha_variables: &ubuntu_canal_ha_variables
  217. # stage: deploy-part1
  218. UPGRADE_TEST: "graceful"
  219. .centos_weave_kubeadm_variables: &centos_weave_kubeadm_variables
  220. # stage: deploy-part1
  221. UPGRADE_TEST: "graceful"
  222. .ubuntu_canal_kubeadm_variables: &ubuntu_canal_kubeadm_variables
  223. # stage: deploy-part1
  224. MOVED_TO_GROUP_VARS: "true"
  225. .ubuntu_contiv_sep_variables: &ubuntu_contiv_sep_variables
  226. # stage: deploy-special
  227. MOVED_TO_GROUP_VARS: "true"
  228. .rhel7_weave_variables: &rhel7_weave_variables
  229. # stage: deploy-part1
  230. MOVED_TO_GROUP_VARS: "true"
  231. .centos7_flannel_addons_variables: &centos7_flannel_addons_variables
  232. # stage: deploy-part2
  233. MOVED_TO_GROUP_VARS: "true"
  234. .debian8_calico_variables: &debian8_calico_variables
  235. # stage: deploy-part2
  236. MOVED_TO_GROUP_VARS: "true"
  237. .coreos_canal_variables: &coreos_canal_variables
  238. # stage: deploy-part2
  239. MOVED_TO_GROUP_VARS: "true"
  240. .rhel7_canal_sep_variables: &rhel7_canal_sep_variables
  241. # stage: deploy-special
  242. MOVED_TO_GROUP_VARS: "true"
  243. .ubuntu_weave_sep_variables: &ubuntu_weave_sep_variables
  244. # stage: deploy-special
  245. MOVED_TO_GROUP_VARS: "true"
  246. .centos7_calico_ha_variables: &centos7_calico_ha_variables
  247. # stage: deploy-special
  248. MOVED_TO_GROUP_VARS: "true"
  249. .coreos_alpha_weave_ha_variables: &coreos_alpha_weave_ha_variables
  250. # stage: deploy-special
  251. MOVED_TO_GROUP_VARS: "true"
  252. .ubuntu_rkt_sep_variables: &ubuntu_rkt_sep_variables
  253. # stage: deploy-part1
  254. MOVED_TO_GROUP_VARS: "true"
  255. .ubuntu_vault_sep_variables: &ubuntu_vault_sep_variables
  256. # stage: deploy-part1
  257. MOVED_TO_GROUP_VARS: "true"
  258. .ubuntu_flannel_variables: &ubuntu_flannel_variables
  259. # stage: deploy-special
  260. MOVED_TO_GROUP_VARS: "true"
  261. # Builds for PRs only (premoderated by unit-tests step) and triggers (auto)
  262. gce_coreos-calico-aio:
  263. stage: deploy-part1
  264. <<: *job
  265. <<: *gce
  266. variables:
  267. <<: *coreos_calico_aio_variables
  268. <<: *gce_variables
  269. when: on_success
  270. except: ['triggers']
  271. only: [/^pr-.*$/]
  272. do_ubuntu-canal-ha:
  273. stage: deploy-part1
  274. <<: *job
  275. <<: *do
  276. variables:
  277. <<: *do_variables
  278. when: on_success
  279. except: ['triggers']
  280. only: [/^pr-.*$/]
  281. gce_coreos-calico-sep-triggers:
  282. stage: deploy-part1
  283. <<: *job
  284. <<: *gce
  285. variables:
  286. <<: *gce_variables
  287. <<: *coreos_calico_aio_variables
  288. when: on_success
  289. only: ['triggers']
  290. gce_centos7-flannel-addons:
  291. stage: deploy-part2
  292. <<: *job
  293. <<: *gce
  294. variables:
  295. <<: *gce_variables
  296. <<: *centos7_flannel_addons_variables
  297. when: on_success
  298. except: ['triggers']
  299. only: [/^pr-.*$/]
  300. gce_centos7-flannel-addons-triggers:
  301. stage: deploy-part1
  302. <<: *job
  303. <<: *gce
  304. variables:
  305. <<: *gce_variables
  306. <<: *centos7_flannel_addons_variables
  307. when: on_success
  308. only: ['triggers']
  309. gce_ubuntu-weave-sep:
  310. stage: deploy-special
  311. <<: *job
  312. <<: *gce
  313. variables:
  314. <<: *gce_variables
  315. <<: *ubuntu_weave_sep_variables
  316. when: on_success
  317. except: ['triggers']
  318. only: [/^pr-.*$/]
  319. gce_ubuntu-weave-sep-triggers:
  320. stage: deploy-part1
  321. <<: *job
  322. <<: *gce
  323. variables:
  324. <<: *gce_variables
  325. <<: *ubuntu_weave_sep_variables
  326. when: on_success
  327. only: ['triggers']
  328. # More builds for PRs/merges (manual) and triggers (auto)
  329. gce_ubuntu-canal-ha:
  330. stage: deploy-part1
  331. <<: *job
  332. <<: *gce
  333. variables:
  334. <<: *gce_variables
  335. <<: *ubuntu_canal_ha_variables
  336. when: manual
  337. except: ['triggers']
  338. only: ['master', /^pr-.*$/]
  339. gce_ubuntu-canal-ha-triggers:
  340. stage: deploy-part1
  341. <<: *job
  342. <<: *gce
  343. variables:
  344. <<: *gce_variables
  345. <<: *ubuntu_canal_ha_variables
  346. when: on_success
  347. only: ['triggers']
  348. gce_ubuntu-canal-kubeadm:
  349. stage: deploy-part1
  350. <<: *job
  351. <<: *gce
  352. variables:
  353. <<: *gce_variables
  354. <<: *ubuntu_canal_kubeadm_variables
  355. when: manual
  356. except: ['triggers']
  357. only: ['master', /^pr-.*$/]
  358. gce_ubuntu-canal-kubeadm-triggers:
  359. stage: deploy-part1
  360. <<: *job
  361. <<: *gce
  362. variables:
  363. <<: *gce_variables
  364. <<: *ubuntu_canal_kubeadm_variables
  365. when: on_success
  366. only: ['triggers']
  367. gce_centos-weave-kubeadm:
  368. stage: deploy-part1
  369. <<: *job
  370. <<: *gce
  371. variables:
  372. <<: *gce_variables
  373. <<: *centos_weave_kubeadm_variables
  374. when: manual
  375. except: ['triggers']
  376. only: ['master', /^pr-.*$/]
  377. gce_centos-weave-kubeadm-triggers:
  378. stage: deploy-part1
  379. <<: *job
  380. <<: *gce
  381. variables:
  382. <<: *gce_variables
  383. <<: *centos_weave_kubeadm_variables
  384. when: on_success
  385. only: ['triggers']
  386. gce_ubuntu-contiv-sep:
  387. stage: deploy-special
  388. <<: *job
  389. <<: *gce
  390. variables:
  391. <<: *gce_variables
  392. <<: *ubuntu_contiv_sep_variables
  393. when: manual
  394. except: ['triggers']
  395. only: ['master', /^pr-.*$/]
  396. gce_rhel7-weave:
  397. stage: deploy-part1
  398. <<: *job
  399. <<: *gce
  400. variables:
  401. <<: *gce_variables
  402. <<: *rhel7_weave_variables
  403. when: manual
  404. except: ['triggers']
  405. only: ['master', /^pr-.*$/]
  406. gce_rhel7-weave-triggers:
  407. stage: deploy-part1
  408. <<: *job
  409. <<: *gce
  410. variables:
  411. <<: *gce_variables
  412. <<: *rhel7_weave_variables
  413. when: on_success
  414. only: ['triggers']
  415. gce_debian8-calico-upgrade:
  416. stage: deploy-part2
  417. <<: *job
  418. <<: *gce
  419. variables:
  420. <<: *gce_variables
  421. <<: *debian8_calico_variables
  422. when: manual
  423. except: ['triggers']
  424. only: ['master', /^pr-.*$/]
  425. gce_debian8-calico-triggers:
  426. stage: deploy-part1
  427. <<: *job
  428. <<: *gce
  429. variables:
  430. <<: *gce_variables
  431. <<: *debian8_calico_variables
  432. when: on_success
  433. only: ['triggers']
  434. gce_coreos-canal:
  435. stage: deploy-part2
  436. <<: *job
  437. <<: *gce
  438. variables:
  439. <<: *gce_variables
  440. <<: *coreos_canal_variables
  441. when: manual
  442. except: ['triggers']
  443. only: ['master', /^pr-.*$/]
  444. gce_coreos-canal-triggers:
  445. stage: deploy-part1
  446. <<: *job
  447. <<: *gce
  448. variables:
  449. <<: *gce_variables
  450. <<: *coreos_canal_variables
  451. when: on_success
  452. only: ['triggers']
  453. gce_rhel7-canal-sep:
  454. stage: deploy-special
  455. <<: *job
  456. <<: *gce
  457. variables:
  458. <<: *gce_variables
  459. <<: *rhel7_canal_sep_variables
  460. when: manual
  461. except: ['triggers']
  462. only: ['master', /^pr-.*$/,]
  463. gce_rhel7-canal-sep-triggers:
  464. stage: deploy-part1
  465. <<: *job
  466. <<: *gce
  467. variables:
  468. <<: *gce_variables
  469. <<: *rhel7_canal_sep_variables
  470. when: on_success
  471. only: ['triggers']
  472. gce_centos7-calico-ha:
  473. stage: deploy-special
  474. <<: *job
  475. <<: *gce
  476. variables:
  477. <<: *gce_variables
  478. <<: *centos7_calico_ha_variables
  479. when: manual
  480. except: ['triggers']
  481. only: ['master', /^pr-.*$/]
  482. gce_centos7-calico-ha-triggers:
  483. stage: deploy-part1
  484. <<: *job
  485. <<: *gce
  486. variables:
  487. <<: *gce_variables
  488. <<: *centos7_calico_ha_variables
  489. when: on_success
  490. only: ['triggers']
  491. # no triggers yet https://github.com/kubernetes-incubator/kargo/issues/613
  492. gce_coreos-alpha-weave-ha:
  493. stage: deploy-special
  494. <<: *job
  495. <<: *gce
  496. variables:
  497. <<: *gce_variables
  498. <<: *coreos_alpha_weave_ha_variables
  499. when: manual
  500. except: ['triggers']
  501. only: ['master', /^pr-.*$/]
  502. gce_ubuntu-rkt-sep:
  503. stage: deploy-part1
  504. <<: *job
  505. <<: *gce
  506. variables:
  507. <<: *gce_variables
  508. <<: *ubuntu_rkt_sep_variables
  509. when: manual
  510. except: ['triggers']
  511. only: ['master', /^pr-.*$/]
  512. gce_ubuntu-vault-sep:
  513. stage: deploy-part1
  514. <<: *job
  515. <<: *gce
  516. variables:
  517. <<: *gce_variables
  518. <<: *ubuntu_vault_sep_variables
  519. when: manual
  520. except: ['triggers']
  521. only: ['master', /^pr-.*$/]
  522. gce_ubuntu-flannel-sep:
  523. stage: deploy-special
  524. <<: *job
  525. <<: *gce
  526. variables:
  527. <<: *gce_variables
  528. <<: *ubuntu_flannel_variables
  529. when: manual
  530. except: ['triggers']
  531. only: ['master', /^pr-.*$/]
  532. # Premoderated with manual actions
  533. ci-authorized:
  534. <<: *job
  535. stage: moderator
  536. before_script:
  537. - apt-get -y install jq
  538. script:
  539. - /bin/sh scripts/premoderator.sh
  540. except: ['triggers', 'master']
  541. syntax-check:
  542. <<: *job
  543. stage: unit-tests
  544. script:
  545. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check
  546. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root upgrade-cluster.yml -vvv --syntax-check
  547. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root reset.yml -vvv --syntax-check
  548. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root extra_playbooks/upgrade-only-k8s.yml -vvv --syntax-check
  549. except: ['triggers', 'master']
  550. yamllint:
  551. <<: *job
  552. stage: unit-tests
  553. script:
  554. - yamllint roles
  555. except: ['triggers', 'master']
  556. tox-inventory-builder:
  557. stage: unit-tests
  558. <<: *job
  559. script:
  560. - pip install tox
  561. - cd contrib/inventory_builder && tox
  562. when: manual
  563. except: ['triggers', 'master']