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.

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