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.

742 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
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>
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>
7 years ago
6 years ago
8 years ago
6 years ago
8 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
6 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. GITLAB_REPOSITORY: 'kargo-ci/kubernetes-sigs-kubespray'
  10. # DOCKER_HOST: tcp://localhost:2375
  11. ANSIBLE_FORCE_COLOR: "true"
  12. MAGIC: "ci check this"
  13. TEST_ID: "$CI_PIPELINE_ID-$CI_BUILD_ID"
  14. CI_TEST_VARS: "./tests/files/${CI_JOB_NAME}.yml"
  15. GS_ACCESS_KEY_ID: $GS_KEY
  16. GS_SECRET_ACCESS_KEY: $GS_SECRET
  17. CONTAINER_ENGINE: docker
  18. SSH_USER: root
  19. GCE_PREEMPTIBLE: "false"
  20. ANSIBLE_KEEP_REMOTE_FILES: "1"
  21. ANSIBLE_CONFIG: ./tests/ansible.cfg
  22. ANSIBLE_INVENTORY: ./inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
  23. IDEMPOT_CHECK: "false"
  24. RESET_CHECK: "false"
  25. UPGRADE_TEST: "false"
  26. LOG_LEVEL: "-vv"
  27. # asia-east1-a
  28. # asia-northeast1-a
  29. # europe-west1-b
  30. # us-central1-a
  31. # us-east1-b
  32. # us-west1-a
  33. before_script:
  34. - /usr/bin/python -m pip install -r tests/requirements.txt
  35. - mkdir -p /.ssh
  36. .job: &job
  37. tags:
  38. - kubernetes
  39. - docker
  40. image: quay.io/kubespray/kubespray:v2.8
  41. .docker_service: &docker_service
  42. services:
  43. - docker:dind
  44. .create_cluster: &create_cluster
  45. <<: *job
  46. <<: *docker_service
  47. .gce_variables: &gce_variables
  48. GCE_USER: travis
  49. SSH_USER: $GCE_USER
  50. CLOUD_MACHINE_TYPE: "g1-small"
  51. CI_PLATFORM: "gce"
  52. PRIVATE_KEY: $GCE_PRIVATE_KEY
  53. .do_variables: &do_variables
  54. PRIVATE_KEY: $DO_PRIVATE_KEY
  55. CI_PLATFORM: "do"
  56. SSH_USER: root
  57. .testcases: &testcases
  58. <<: *job
  59. <<: *docker_service
  60. cache:
  61. key: "$CI_BUILD_REF_NAME"
  62. paths:
  63. - downloads/
  64. - $HOME/.cache
  65. before_script:
  66. - docker info
  67. - /usr/bin/python -m pip install -r requirements.txt
  68. - /usr/bin/python -m pip install -r tests/requirements.txt
  69. - mkdir -p /.ssh
  70. - mkdir -p $HOME/.ssh
  71. - ansible-playbook --version
  72. - export PYPATH=$([[ ! "$CI_JOB_NAME" =~ "coreos" ]] && echo /usr/bin/python || echo /opt/bin/python)
  73. - echo "CI_JOB_NAME is $CI_JOB_NAME"
  74. - echo "PYPATH is $PYPATH"
  75. script:
  76. - pwd
  77. - ls
  78. - echo ${PWD}
  79. - echo "${STARTUP_SCRIPT}"
  80. - cd tests && make create-${CI_PLATFORM} -s ; cd -
  81. # Check out latest tag if testing upgrade
  82. # Uncomment when gitlab kubespray repo has tags
  83. #- test "${UPGRADE_TEST}" != "false" && git fetch --all && git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
  84. - test "${UPGRADE_TEST}" != "false" && git checkout 9051aa5296ef76fcff69a2e3827cef28752aa475
  85. # Checkout the CI vars file so it is available
  86. - test "${UPGRADE_TEST}" != "false" && git checkout "${CI_BUILD_REF}" tests/files/${CI_JOB_NAME}.yml
  87. # Workaround https://github.com/kubernetes-sigs/kubespray/issues/2021
  88. - 'sh -c "echo ignore_assert_errors: true | tee -a tests/files/${CI_JOB_NAME}.yml"'
  89. # Create cluster
  90. - >
  91. ansible-playbook
  92. -i ${ANSIBLE_INVENTORY}
  93. -b --become-user=root
  94. --private-key=${HOME}/.ssh/id_rsa
  95. -u $SSH_USER
  96. ${SSH_ARGS}
  97. ${LOG_LEVEL}
  98. -e @${CI_TEST_VARS}
  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 ${ANSIBLE_INVENTORY}
  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_ssh_user=${SSH_USER}
  118. -e local_release_dir=${PWD}/downloads
  119. --limit "all:!fake_hosts"
  120. $PLAYBOOK;
  121. fi
  122. # Tests Cases
  123. ## Test Master API
  124. - ansible-playbook -i ${ANSIBLE_INVENTORY} -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
  125. ## Ping the between 2 pod
  126. - ansible-playbook -i ${ANSIBLE_INVENTORY} -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
  127. ## Advanced DNS checks
  128. - ansible-playbook -i ${ANSIBLE_INVENTORY} -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
  129. ## Idempotency checks 1/5 (repeat deployment)
  130. - >
  131. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  132. ansible-playbook
  133. -i ${ANSIBLE_INVENTORY}
  134. -b --become-user=root
  135. --private-key=${HOME}/.ssh/id_rsa
  136. -u $SSH_USER
  137. ${SSH_ARGS}
  138. ${LOG_LEVEL}
  139. -e @${CI_TEST_VARS}
  140. -e ansible_python_interpreter=${PYPATH}
  141. -e local_release_dir=${PWD}/downloads
  142. --limit "all:!fake_hosts"
  143. cluster.yml;
  144. fi
  145. ## Idempotency checks 2/5 (Advanced DNS checks)
  146. - >
  147. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  148. ansible-playbook
  149. -i ${ANSIBLE_INVENTORY}
  150. -b --become-user=root
  151. --private-key=${HOME}/.ssh/id_rsa
  152. -u $SSH_USER
  153. ${SSH_ARGS}
  154. ${LOG_LEVEL}
  155. -e @${CI_TEST_VARS}
  156. --limit "all:!fake_hosts"
  157. tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  158. fi
  159. ## Idempotency checks 3/5 (reset deployment)
  160. - >
  161. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  162. ansible-playbook
  163. -i ${ANSIBLE_INVENTORY}
  164. -b --become-user=root
  165. --private-key=${HOME}/.ssh/id_rsa
  166. -u $SSH_USER
  167. ${SSH_ARGS}
  168. ${LOG_LEVEL}
  169. -e @${CI_TEST_VARS}
  170. -e ansible_python_interpreter=${PYPATH}
  171. -e reset_confirmation=yes
  172. --limit "all:!fake_hosts"
  173. reset.yml;
  174. fi
  175. ## Idempotency checks 4/5 (redeploy after reset)
  176. - >
  177. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  178. ansible-playbook
  179. -i ${ANSIBLE_INVENTORY}
  180. -b --become-user=root
  181. --private-key=${HOME}/.ssh/id_rsa
  182. -u $SSH_USER
  183. ${SSH_ARGS}
  184. ${LOG_LEVEL}
  185. -e @${CI_TEST_VARS}
  186. -e ansible_python_interpreter=${PYPATH}
  187. -e local_release_dir=${PWD}/downloads
  188. --limit "all:!fake_hosts"
  189. cluster.yml;
  190. fi
  191. ## Idempotency checks 5/5 (Advanced DNS checks)
  192. - >
  193. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  194. ansible-playbook -i ${ANSIBLE_INVENTORY} -e ansible_python_interpreter=${PYPATH}
  195. -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root
  196. --limit "all:!fake_hosts"
  197. tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  198. fi
  199. after_script:
  200. - cd tests && make delete-${CI_PLATFORM} -s ; cd -
  201. .gce: &gce
  202. <<: *testcases
  203. variables:
  204. <<: *gce_variables
  205. .do: &do
  206. variables:
  207. <<: *do_variables
  208. <<: *testcases
  209. # Test matrix. Leave the comments for markup scripts.
  210. .coreos_calico_aio_variables: &coreos_calico_aio_variables
  211. # stage: deploy-part1
  212. MOVED_TO_GROUP_VARS: "true"
  213. .ubuntu18_flannel_aio_variables: &ubuntu18_flannel_aio_variables
  214. # stage: deploy-part1
  215. MOVED_TO_GROUP_VARS: "true"
  216. .centos_weave_kubeadm_variables: &centos_weave_kubeadm_variables
  217. # stage: deploy-part1
  218. UPGRADE_TEST: "graceful"
  219. .ubuntu_canal_kubeadm_variables: &ubuntu_canal_kubeadm_variables
  220. # stage: deploy-part1
  221. MOVED_TO_GROUP_VARS: "true"
  222. .ubuntu_canal_ha_variables: &ubuntu_canal_ha_variables
  223. # stage: deploy-special
  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. .coreos_cilium_variables: &coreos_cilium_variables
  229. # stage: deploy-special
  230. MOVED_TO_GROUP_VARS: "true"
  231. .ubuntu_cilium_sep_variables: &ubuntu_cilium_sep_variables
  232. # stage: deploy-special
  233. MOVED_TO_GROUP_VARS: "true"
  234. .rhel7_weave_variables: &rhel7_weave_variables
  235. # stage: deploy-part1
  236. MOVED_TO_GROUP_VARS: "true"
  237. .centos7_flannel_addons_variables: &centos7_flannel_addons_variables
  238. # stage: deploy-part2
  239. MOVED_TO_GROUP_VARS: "true"
  240. .debian9_calico_variables: &debian9_calico_variables
  241. # stage: deploy-part2
  242. MOVED_TO_GROUP_VARS: "true"
  243. .coreos_canal_variables: &coreos_canal_variables
  244. # stage: deploy-part2
  245. MOVED_TO_GROUP_VARS: "true"
  246. .rhel7_canal_sep_variables: &rhel7_canal_sep_variables
  247. # stage: deploy-special
  248. MOVED_TO_GROUP_VARS: "true"
  249. .ubuntu_weave_sep_variables: &ubuntu_weave_sep_variables
  250. # stage: deploy-special
  251. MOVED_TO_GROUP_VARS: "true"
  252. .centos7_calico_ha_variables: &centos7_calico_ha_variables
  253. # stage: deploy-special
  254. MOVED_TO_GROUP_VARS: "true"
  255. .centos7_kube_router_variables: &centos7_kube_router_variables
  256. # stage: deploy-special
  257. MOVED_TO_GROUP_VARS: "true"
  258. .centos7_multus_calico_variables: &centos7_multus_calico_variables
  259. # stage: deploy-part2
  260. UPGRADE_TEST: "graceful"
  261. .coreos_alpha_weave_ha_variables: &coreos_alpha_weave_ha_variables
  262. # stage: deploy-special
  263. MOVED_TO_GROUP_VARS: "true"
  264. .coreos_kube_router_variables: &coreos_kube_router_variables
  265. # stage: deploy-special
  266. MOVED_TO_GROUP_VARS: "true"
  267. .ubuntu_rkt_sep_variables: &ubuntu_rkt_sep_variables
  268. # stage: deploy-part1
  269. MOVED_TO_GROUP_VARS: "true"
  270. .ubuntu_flannel_variables: &ubuntu_flannel_variables
  271. # stage: deploy-part2
  272. MOVED_TO_GROUP_VARS: "true"
  273. .ubuntu_kube_router_variables: &ubuntu_kube_router_variables
  274. # stage: deploy-special
  275. MOVED_TO_GROUP_VARS: "true"
  276. .opensuse_canal_variables: &opensuse_canal_variables
  277. # stage: deploy-part2
  278. MOVED_TO_GROUP_VARS: "true"
  279. # Builds for PRs only (premoderated by unit-tests step) and triggers (auto)
  280. ### PR JOBS PART1
  281. gce_ubuntu18-flannel-aio:
  282. stage: deploy-part1
  283. <<: *job
  284. <<: *gce
  285. variables:
  286. <<: *ubuntu18_flannel_aio_variables
  287. <<: *gce_variables
  288. when: on_success
  289. except: ['triggers']
  290. only: [/^pr-.*$/]
  291. ### PR JOBS PART2
  292. gce_coreos-calico-aio:
  293. stage: deploy-part2
  294. <<: *job
  295. <<: *gce
  296. variables:
  297. <<: *coreos_calico_aio_variables
  298. <<: *gce_variables
  299. when: on_success
  300. except: ['triggers']
  301. only: [/^pr-.*$/]
  302. gce_centos7-flannel-addons:
  303. stage: deploy-part2
  304. <<: *job
  305. <<: *gce
  306. variables:
  307. <<: *gce_variables
  308. <<: *centos7_flannel_addons_variables
  309. when: on_success
  310. except: ['triggers']
  311. only: [/^pr-.*$/]
  312. ### MANUAL JOBS
  313. gce_centos-weave-kubeadm-sep:
  314. stage: deploy-part2
  315. <<: *job
  316. <<: *gce
  317. variables:
  318. <<: *gce_variables
  319. <<: *centos_weave_kubeadm_variables
  320. when: on_success
  321. only: ['triggers']
  322. gce_ubuntu-weave-sep:
  323. stage: deploy-part2
  324. <<: *job
  325. <<: *gce
  326. variables:
  327. <<: *gce_variables
  328. <<: *ubuntu_weave_sep_variables
  329. when: manual
  330. only: ['triggers']
  331. gce_coreos-calico-sep-triggers:
  332. stage: deploy-part2
  333. <<: *job
  334. <<: *gce
  335. variables:
  336. <<: *gce_variables
  337. <<: *coreos_calico_aio_variables
  338. when: on_success
  339. only: ['triggers']
  340. gce_ubuntu-canal-ha-triggers:
  341. stage: deploy-special
  342. <<: *job
  343. <<: *gce
  344. variables:
  345. <<: *gce_variables
  346. <<: *ubuntu_canal_ha_variables
  347. when: on_success
  348. only: ['triggers']
  349. gce_centos7-flannel-addons-triggers:
  350. stage: deploy-part2
  351. <<: *job
  352. <<: *gce
  353. variables:
  354. <<: *gce_variables
  355. <<: *centos7_flannel_addons_variables
  356. when: on_success
  357. only: ['triggers']
  358. gce_ubuntu-weave-sep-triggers:
  359. stage: deploy-part2
  360. <<: *job
  361. <<: *gce
  362. variables:
  363. <<: *gce_variables
  364. <<: *ubuntu_weave_sep_variables
  365. when: on_success
  366. only: ['triggers']
  367. # More builds for PRs/merges (manual) and triggers (auto)
  368. do_ubuntu-canal-ha:
  369. stage: deploy-part2
  370. <<: *job
  371. <<: *do
  372. variables:
  373. <<: *do_variables
  374. when: manual
  375. except: ['triggers']
  376. only: ['master', /^pr-.*$/]
  377. gce_ubuntu-canal-ha:
  378. stage: deploy-special
  379. <<: *job
  380. <<: *gce
  381. variables:
  382. <<: *gce_variables
  383. <<: *ubuntu_canal_ha_variables
  384. when: manual
  385. except: ['triggers']
  386. only: ['master', /^pr-.*$/]
  387. gce_ubuntu-canal-kubeadm:
  388. stage: deploy-part2
  389. <<: *job
  390. <<: *gce
  391. variables:
  392. <<: *gce_variables
  393. <<: *ubuntu_canal_kubeadm_variables
  394. when: manual
  395. except: ['triggers']
  396. only: ['master', /^pr-.*$/]
  397. gce_ubuntu-canal-kubeadm-triggers:
  398. stage: deploy-part2
  399. <<: *job
  400. <<: *gce
  401. variables:
  402. <<: *gce_variables
  403. <<: *ubuntu_canal_kubeadm_variables
  404. when: on_success
  405. only: ['triggers']
  406. gce_ubuntu-flannel-ha:
  407. stage: deploy-part2
  408. <<: *job
  409. <<: *gce
  410. variables:
  411. <<: *gce_variables
  412. <<: *ubuntu_flannel_variables
  413. when: manual
  414. except: ['triggers']
  415. gce_centos-weave-kubeadm-triggers:
  416. stage: deploy-part2
  417. <<: *job
  418. <<: *gce
  419. variables:
  420. <<: *gce_variables
  421. <<: *centos_weave_kubeadm_variables
  422. when: on_success
  423. only: ['triggers']
  424. gce_ubuntu-contiv-sep:
  425. stage: deploy-special
  426. <<: *job
  427. <<: *gce
  428. variables:
  429. <<: *gce_variables
  430. <<: *ubuntu_contiv_sep_variables
  431. when: manual
  432. except: ['triggers']
  433. only: ['master', /^pr-.*$/]
  434. gce_coreos-cilium:
  435. stage: deploy-special
  436. <<: *job
  437. <<: *gce
  438. variables:
  439. <<: *gce_variables
  440. <<: *coreos_cilium_variables
  441. when: manual
  442. except: ['triggers']
  443. only: ['master', /^pr-.*$/]
  444. gce_ubuntu-cilium-sep:
  445. stage: deploy-special
  446. <<: *job
  447. <<: *gce
  448. variables:
  449. <<: *gce_variables
  450. <<: *ubuntu_cilium_sep_variables
  451. when: manual
  452. except: ['triggers']
  453. only: ['master', /^pr-.*$/]
  454. gce_rhel7-weave:
  455. stage: deploy-part2
  456. <<: *job
  457. <<: *gce
  458. variables:
  459. <<: *gce_variables
  460. <<: *rhel7_weave_variables
  461. when: manual
  462. except: ['triggers']
  463. only: ['master', /^pr-.*$/]
  464. gce_rhel7-weave-triggers:
  465. stage: deploy-part2
  466. <<: *job
  467. <<: *gce
  468. variables:
  469. <<: *gce_variables
  470. <<: *rhel7_weave_variables
  471. when: on_success
  472. only: ['triggers']
  473. gce_debian9-calico-upgrade:
  474. stage: deploy-part2
  475. <<: *job
  476. <<: *gce
  477. variables:
  478. <<: *gce_variables
  479. <<: *debian9_calico_variables
  480. when: manual
  481. except: ['triggers']
  482. only: ['master', /^pr-.*$/]
  483. gce_debian9-calico-triggers:
  484. stage: deploy-part2
  485. <<: *job
  486. <<: *gce
  487. variables:
  488. <<: *gce_variables
  489. <<: *debian9_calico_variables
  490. when: on_success
  491. only: ['triggers']
  492. gce_coreos-canal:
  493. stage: deploy-part2
  494. <<: *job
  495. <<: *gce
  496. variables:
  497. <<: *gce_variables
  498. <<: *coreos_canal_variables
  499. when: manual
  500. except: ['triggers']
  501. only: ['master', /^pr-.*$/]
  502. gce_coreos-canal-triggers:
  503. stage: deploy-part2
  504. <<: *job
  505. <<: *gce
  506. variables:
  507. <<: *gce_variables
  508. <<: *coreos_canal_variables
  509. when: on_success
  510. only: ['triggers']
  511. gce_rhel7-canal-sep:
  512. stage: deploy-special
  513. <<: *job
  514. <<: *gce
  515. variables:
  516. <<: *gce_variables
  517. <<: *rhel7_canal_sep_variables
  518. when: manual
  519. except: ['triggers']
  520. only: ['master', /^pr-.*$/]
  521. gce_rhel7-canal-sep-triggers:
  522. stage: deploy-part2
  523. <<: *job
  524. <<: *gce
  525. variables:
  526. <<: *gce_variables
  527. <<: *rhel7_canal_sep_variables
  528. when: on_success
  529. only: ['triggers']
  530. gce_centos7-calico-ha:
  531. stage: deploy-special
  532. <<: *job
  533. <<: *gce
  534. variables:
  535. <<: *gce_variables
  536. <<: *centos7_calico_ha_variables
  537. when: manual
  538. except: ['triggers']
  539. only: ['master', /^pr-.*$/]
  540. gce_centos7-calico-ha-triggers:
  541. stage: deploy-part2
  542. <<: *job
  543. <<: *gce
  544. variables:
  545. <<: *gce_variables
  546. <<: *centos7_calico_ha_variables
  547. when: on_success
  548. only: ['triggers']
  549. gce_centos7-kube-router:
  550. stage: deploy-special
  551. <<: *job
  552. <<: *gce
  553. variables:
  554. <<: *gce_variables
  555. <<: *centos7_kube_router_variables
  556. when: manual
  557. except: ['triggers']
  558. only: ['master', /^pr-.*$/]
  559. gce_centos7-multus-calico:
  560. stage: deploy-part2
  561. <<: *job
  562. <<: *gce
  563. variables:
  564. <<: *gce_variables
  565. <<: *centos7_multus_calico_variables
  566. when: manual
  567. except: ['triggers']
  568. only: ['master', /^pr-.*$/]
  569. gce_opensuse-canal:
  570. stage: deploy-part2
  571. <<: *job
  572. <<: *gce
  573. variables:
  574. <<: *gce_variables
  575. <<: *opensuse_canal_variables
  576. when: manual
  577. except: ['triggers']
  578. only: ['master', /^pr-.*$/]
  579. # no triggers yet https://github.com/kubernetes-incubator/kargo/issues/613
  580. gce_coreos-alpha-weave-ha:
  581. stage: deploy-special
  582. <<: *job
  583. <<: *gce
  584. variables:
  585. <<: *gce_variables
  586. <<: *coreos_alpha_weave_ha_variables
  587. when: manual
  588. except: ['triggers']
  589. only: ['master', /^pr-.*$/]
  590. gce_coreos-kube-router:
  591. stage: deploy-special
  592. <<: *job
  593. <<: *gce
  594. variables:
  595. <<: *gce_variables
  596. <<: *coreos_kube_router_variables
  597. when: manual
  598. except: ['triggers']
  599. only: ['master', /^pr-.*$/]
  600. gce_ubuntu-rkt-sep:
  601. stage: deploy-part2
  602. <<: *job
  603. <<: *gce
  604. variables:
  605. <<: *gce_variables
  606. <<: *ubuntu_rkt_sep_variables
  607. when: manual
  608. except: ['triggers']
  609. only: ['master', /^pr-.*$/]
  610. gce_ubuntu-kube-router-sep:
  611. stage: deploy-special
  612. <<: *job
  613. <<: *gce
  614. variables:
  615. <<: *gce_variables
  616. <<: *ubuntu_kube_router_variables
  617. when: manual
  618. except: ['triggers']
  619. only: ['master', /^pr-.*$/]
  620. # Premoderated with manual actions
  621. ci-authorized:
  622. <<: *job
  623. stage: moderator
  624. before_script:
  625. - apt-get -y install jq
  626. script:
  627. - /bin/sh scripts/premoderator.sh
  628. except: ['triggers', 'master']
  629. syntax-check:
  630. <<: *job
  631. stage: unit-tests
  632. script:
  633. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check
  634. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root upgrade-cluster.yml -vvv --syntax-check
  635. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root reset.yml -vvv --syntax-check
  636. - 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
  637. except: ['triggers', 'master']
  638. yamllint:
  639. <<: *job
  640. stage: unit-tests
  641. script:
  642. - yamllint roles
  643. except: ['triggers', 'master']
  644. tox-inventory-builder:
  645. stage: unit-tests
  646. <<: *job
  647. script:
  648. - pip install tox
  649. - cd contrib/inventory_builder && tox
  650. when: manual
  651. except: ['triggers', 'master']