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.

749 lines
18 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
6 years ago
7 years ago
6 years ago
7 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
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-incubator__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. KUBEADM_ENABLED: "false"
  27. LOG_LEVEL: "-vv"
  28. # asia-east1-a
  29. # asia-northeast1-a
  30. # europe-west1-b
  31. # us-central1-a
  32. # us-east1-b
  33. # us-west1-a
  34. before_script:
  35. - /usr/bin/python -m pip install -r tests/requirements.txt
  36. - mkdir -p /.ssh
  37. .job: &job
  38. tags:
  39. - kubernetes
  40. - docker
  41. image: quay.io/kubespray/kubespray:v2.7
  42. .docker_service: &docker_service
  43. services:
  44. - docker:dind
  45. .create_cluster: &create_cluster
  46. <<: *job
  47. <<: *docker_service
  48. .gce_variables: &gce_variables
  49. GCE_USER: travis
  50. SSH_USER: $GCE_USER
  51. CLOUD_MACHINE_TYPE: "g1-small"
  52. CI_PLATFORM: "gce"
  53. PRIVATE_KEY: $GCE_PRIVATE_KEY
  54. .do_variables: &do_variables
  55. PRIVATE_KEY: $DO_PRIVATE_KEY
  56. CI_PLATFORM: "do"
  57. SSH_USER: root
  58. .testcases: &testcases
  59. <<: *job
  60. <<: *docker_service
  61. cache:
  62. key: "$CI_BUILD_REF_NAME"
  63. paths:
  64. - downloads/
  65. - $HOME/.cache
  66. before_script:
  67. - docker info
  68. - /usr/bin/python -m pip install -r requirements.txt
  69. - /usr/bin/python -m pip install -r tests/requirements.txt
  70. - mkdir -p /.ssh
  71. - mkdir -p $HOME/.ssh
  72. - ansible-playbook --version
  73. - export PYPATH=$([[ ! "$CI_JOB_NAME" =~ "coreos" ]] && echo /usr/bin/python || echo /opt/bin/python)
  74. - echo "CI_JOB_NAME is $CI_JOB_NAME"
  75. - echo "PYPATH is $PYPATH"
  76. script:
  77. - pwd
  78. - ls
  79. - echo ${PWD}
  80. - echo "${STARTUP_SCRIPT}"
  81. - cd tests && make create-${CI_PLATFORM} -s ; cd -
  82. # Check out latest tag if testing upgrade
  83. # Uncomment when gitlab kubespray repo has tags
  84. #- test "${UPGRADE_TEST}" != "false" && git fetch --all && git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
  85. - test "${UPGRADE_TEST}" != "false" && git checkout 53d87e53c5899d4ea2904ab7e3883708dd6363d3
  86. # Checkout the CI vars file so it is available
  87. - test "${UPGRADE_TEST}" != "false" && git checkout "${CI_BUILD_REF}" tests/files/${CI_JOB_NAME}.yml
  88. # Workaround https://github.com/kubernetes-incubator/kubespray/issues/2021
  89. - 'sh -c "echo ignore_assert_errors: true | tee -a tests/files/${CI_JOB_NAME}.yml"'
  90. # Create cluster
  91. - >
  92. ansible-playbook
  93. -i ${ANSIBLE_INVENTORY}
  94. -b --become-user=root
  95. --private-key=${HOME}/.ssh/id_rsa
  96. -u $SSH_USER
  97. ${SSH_ARGS}
  98. ${LOG_LEVEL}
  99. -e @${CI_TEST_VARS}
  100. -e ansible_ssh_user=${SSH_USER}
  101. -e local_release_dir=${PWD}/downloads
  102. --limit "all:!fake_hosts"
  103. cluster.yml
  104. # Repeat deployment if testing upgrade
  105. - >
  106. if [ "${UPGRADE_TEST}" != "false" ]; then
  107. test "${UPGRADE_TEST}" == "basic" && PLAYBOOK="cluster.yml";
  108. test "${UPGRADE_TEST}" == "graceful" && PLAYBOOK="upgrade-cluster.yml";
  109. git checkout "${CI_BUILD_REF}";
  110. ansible-playbook
  111. -i ${ANSIBLE_INVENTORY}
  112. -b --become-user=root
  113. --private-key=${HOME}/.ssh/id_rsa
  114. -u $SSH_USER
  115. ${SSH_ARGS}
  116. ${LOG_LEVEL}
  117. -e @${CI_TEST_VARS}
  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 ${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
  127. -e "{kubeadm_enabled: ${KUBEADM_ENABLED}}"
  128. ## Ping the between 2 pod
  129. - 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
  130. ## Advanced DNS checks
  131. - 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
  132. ## Idempotency checks 1/5 (repeat deployment)
  133. - >
  134. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  135. ansible-playbook
  136. -i ${ANSIBLE_INVENTORY}
  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 ${ANSIBLE_INVENTORY}
  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 ${ANSIBLE_INVENTORY}
  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 ${ANSIBLE_INVENTORY}
  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 ${ANSIBLE_INVENTORY} -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. .ubuntu18_flannel_aio_variables: &ubuntu18_flannel_aio_variables
  217. # stage: deploy-part1
  218. MOVED_TO_GROUP_VARS: "true"
  219. .ubuntu_canal_ha_variables: &ubuntu_canal_ha_variables
  220. # stage: deploy-part1
  221. UPGRADE_TEST: "graceful"
  222. .centos_weave_kubeadm_variables: &centos_weave_kubeadm_variables
  223. # stage: deploy-part1
  224. UPGRADE_TEST: "graceful"
  225. .ubuntu_canal_kubeadm_variables: &ubuntu_canal_kubeadm_variables
  226. # stage: deploy-part1
  227. MOVED_TO_GROUP_VARS: "true"
  228. .ubuntu_contiv_sep_variables: &ubuntu_contiv_sep_variables
  229. # stage: deploy-special
  230. MOVED_TO_GROUP_VARS: "true"
  231. .coreos_cilium_variables: &coreos_cilium_variables
  232. # stage: deploy-special
  233. MOVED_TO_GROUP_VARS: "true"
  234. .ubuntu_cilium_sep_variables: &ubuntu_cilium_sep_variables
  235. # stage: deploy-special
  236. MOVED_TO_GROUP_VARS: "true"
  237. .rhel7_weave_variables: &rhel7_weave_variables
  238. # stage: deploy-part1
  239. MOVED_TO_GROUP_VARS: "true"
  240. .centos7_flannel_addons_variables: &centos7_flannel_addons_variables
  241. # stage: deploy-part2
  242. MOVED_TO_GROUP_VARS: "true"
  243. .debian8_calico_variables: &debian8_calico_variables
  244. # stage: deploy-part2
  245. MOVED_TO_GROUP_VARS: "true"
  246. .coreos_canal_variables: &coreos_canal_variables
  247. # stage: deploy-part2
  248. MOVED_TO_GROUP_VARS: "true"
  249. .rhel7_canal_sep_variables: &rhel7_canal_sep_variables
  250. # stage: deploy-special
  251. MOVED_TO_GROUP_VARS: "true"
  252. .ubuntu_weave_sep_variables: &ubuntu_weave_sep_variables
  253. # stage: deploy-special
  254. MOVED_TO_GROUP_VARS: "true"
  255. .centos7_calico_ha_variables: &centos7_calico_ha_variables
  256. # stage: deploy-special
  257. MOVED_TO_GROUP_VARS: "true"
  258. .centos7_kube_router_variables: &centos7_kube_router_variables
  259. # stage: deploy-special
  260. MOVED_TO_GROUP_VARS: "true"
  261. .centos7_multus_calico_variables: &centos7_multus_calico_variables
  262. # stage: deploy-part2
  263. MOVED_TO_GROUP_VARS: "true"
  264. .coreos_alpha_weave_ha_variables: &coreos_alpha_weave_ha_variables
  265. # stage: deploy-special
  266. MOVED_TO_GROUP_VARS: "true"
  267. .coreos_kube_router_variables: &coreos_kube_router_variables
  268. # stage: deploy-special
  269. MOVED_TO_GROUP_VARS: "true"
  270. .ubuntu_rkt_sep_variables: &ubuntu_rkt_sep_variables
  271. # stage: deploy-part1
  272. MOVED_TO_GROUP_VARS: "true"
  273. .ubuntu_flannel_variables: &ubuntu_flannel_variables
  274. # stage: deploy-special
  275. MOVED_TO_GROUP_VARS: "true"
  276. .ubuntu_kube_router_variables: &ubuntu_kube_router_variables
  277. # stage: deploy-special
  278. MOVED_TO_GROUP_VARS: "true"
  279. .opensuse_canal_variables: &opensuse_canal_variables
  280. # stage: deploy-part2
  281. MOVED_TO_GROUP_VARS: "true"
  282. # Builds for PRs only (premoderated by unit-tests step) and triggers (auto)
  283. ### PR JOBS PART1
  284. gce_ubuntu18-flannel-aio:
  285. stage: deploy-part1
  286. <<: *job
  287. <<: *gce
  288. variables:
  289. <<: *ubuntu18_flannel_aio_variables
  290. <<: *gce_variables
  291. when: on_success
  292. except: ['triggers']
  293. only: [/^pr-.*$/]
  294. ### PR JOBS PART2
  295. gce_coreos-calico-aio:
  296. stage: deploy-part2
  297. <<: *job
  298. <<: *gce
  299. variables:
  300. <<: *coreos_calico_aio_variables
  301. <<: *gce_variables
  302. when: on_success
  303. except: ['triggers']
  304. only: [/^pr-.*$/]
  305. gce_centos7-flannel-addons:
  306. stage: deploy-part2
  307. <<: *job
  308. <<: *gce
  309. variables:
  310. <<: *gce_variables
  311. <<: *centos7_flannel_addons_variables
  312. when: on_success
  313. except: ['triggers']
  314. only: [/^pr-.*$/]
  315. gce_centos-weave-kubeadm-sep:
  316. stage: deploy-part2
  317. <<: *job
  318. <<: *gce
  319. variables:
  320. <<: *gce_variables
  321. <<: *centos_weave_kubeadm_variables
  322. when: on_success
  323. except: ['triggers']
  324. only: [/^pr-.*$/]
  325. ### MANUAL JOBS
  326. gce_ubuntu-weave-sep:
  327. stage: deploy-part2
  328. <<: *job
  329. <<: *gce
  330. variables:
  331. <<: *gce_variables
  332. <<: *ubuntu_weave_sep_variables
  333. when: manual
  334. except: ['triggers']
  335. only: [/^pr-.*$/]
  336. gce_coreos-calico-sep-triggers:
  337. stage: deploy-part2
  338. <<: *job
  339. <<: *gce
  340. variables:
  341. <<: *gce_variables
  342. <<: *coreos_calico_aio_variables
  343. when: on_success
  344. only: ['triggers']
  345. gce_ubuntu-canal-ha-triggers:
  346. stage: deploy-part2
  347. <<: *job
  348. <<: *gce
  349. variables:
  350. <<: *gce_variables
  351. <<: *ubuntu_canal_ha_variables
  352. when: on_success
  353. only: ['triggers']
  354. gce_centos7-flannel-addons-triggers:
  355. stage: deploy-part2
  356. <<: *job
  357. <<: *gce
  358. variables:
  359. <<: *gce_variables
  360. <<: *centos7_flannel_addons_variables
  361. when: on_success
  362. only: ['triggers']
  363. gce_ubuntu-weave-sep-triggers:
  364. stage: deploy-part2
  365. <<: *job
  366. <<: *gce
  367. variables:
  368. <<: *gce_variables
  369. <<: *ubuntu_weave_sep_variables
  370. when: on_success
  371. only: ['triggers']
  372. # More builds for PRs/merges (manual) and triggers (auto)
  373. do_ubuntu-canal-ha:
  374. stage: deploy-part2
  375. <<: *job
  376. <<: *do
  377. variables:
  378. <<: *do_variables
  379. when: manual
  380. except: ['triggers']
  381. only: ['master', /^pr-.*$/]
  382. gce_ubuntu-canal-ha:
  383. stage: deploy-part2
  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. gce_ubuntu-canal-kubeadm:
  393. stage: deploy-part2
  394. <<: *job
  395. <<: *gce
  396. variables:
  397. <<: *gce_variables
  398. <<: *ubuntu_canal_kubeadm_variables
  399. when: manual
  400. except: ['triggers']
  401. only: ['master', /^pr-.*$/]
  402. gce_ubuntu-canal-kubeadm-triggers:
  403. stage: deploy-part2
  404. <<: *job
  405. <<: *gce
  406. variables:
  407. <<: *gce_variables
  408. <<: *ubuntu_canal_kubeadm_variables
  409. when: on_success
  410. only: ['triggers']
  411. gce_centos-weave-kubeadm-triggers:
  412. stage: deploy-part2
  413. <<: *job
  414. <<: *gce
  415. variables:
  416. <<: *gce_variables
  417. <<: *centos_weave_kubeadm_variables
  418. when: on_success
  419. only: ['triggers']
  420. gce_ubuntu-contiv-sep:
  421. stage: deploy-special
  422. <<: *job
  423. <<: *gce
  424. variables:
  425. <<: *gce_variables
  426. <<: *ubuntu_contiv_sep_variables
  427. when: manual
  428. except: ['triggers']
  429. only: ['master', /^pr-.*$/]
  430. gce_coreos-cilium:
  431. stage: deploy-special
  432. <<: *job
  433. <<: *gce
  434. variables:
  435. <<: *gce_variables
  436. <<: *coreos_cilium_variables
  437. when: manual
  438. except: ['triggers']
  439. only: ['master', /^pr-.*$/]
  440. gce_ubuntu-cilium-sep:
  441. stage: deploy-special
  442. <<: *job
  443. <<: *gce
  444. variables:
  445. <<: *gce_variables
  446. <<: *ubuntu_cilium_sep_variables
  447. when: manual
  448. except: ['triggers']
  449. only: ['master', /^pr-.*$/]
  450. gce_rhel7-weave:
  451. stage: deploy-part2
  452. <<: *job
  453. <<: *gce
  454. variables:
  455. <<: *gce_variables
  456. <<: *rhel7_weave_variables
  457. when: manual
  458. except: ['triggers']
  459. only: ['master', /^pr-.*$/]
  460. gce_rhel7-weave-triggers:
  461. stage: deploy-part2
  462. <<: *job
  463. <<: *gce
  464. variables:
  465. <<: *gce_variables
  466. <<: *rhel7_weave_variables
  467. when: on_success
  468. only: ['triggers']
  469. gce_debian8-calico-upgrade:
  470. stage: deploy-part2
  471. <<: *job
  472. <<: *gce
  473. variables:
  474. <<: *gce_variables
  475. <<: *debian8_calico_variables
  476. when: manual
  477. except: ['triggers']
  478. only: ['master', /^pr-.*$/]
  479. gce_debian8-calico-triggers:
  480. stage: deploy-part2
  481. <<: *job
  482. <<: *gce
  483. variables:
  484. <<: *gce_variables
  485. <<: *debian8_calico_variables
  486. when: on_success
  487. only: ['triggers']
  488. gce_coreos-canal:
  489. stage: deploy-part2
  490. <<: *job
  491. <<: *gce
  492. variables:
  493. <<: *gce_variables
  494. <<: *coreos_canal_variables
  495. when: manual
  496. except: ['triggers']
  497. only: ['master', /^pr-.*$/]
  498. gce_coreos-canal-triggers:
  499. stage: deploy-part2
  500. <<: *job
  501. <<: *gce
  502. variables:
  503. <<: *gce_variables
  504. <<: *coreos_canal_variables
  505. when: on_success
  506. only: ['triggers']
  507. gce_rhel7-canal-sep:
  508. stage: deploy-special
  509. <<: *job
  510. <<: *gce
  511. variables:
  512. <<: *gce_variables
  513. <<: *rhel7_canal_sep_variables
  514. when: manual
  515. except: ['triggers']
  516. only: ['master', /^pr-.*$/]
  517. gce_rhel7-canal-sep-triggers:
  518. stage: deploy-part2
  519. <<: *job
  520. <<: *gce
  521. variables:
  522. <<: *gce_variables
  523. <<: *rhel7_canal_sep_variables
  524. when: on_success
  525. only: ['triggers']
  526. gce_centos7-calico-ha:
  527. stage: deploy-special
  528. <<: *job
  529. <<: *gce
  530. variables:
  531. <<: *gce_variables
  532. <<: *centos7_calico_ha_variables
  533. when: manual
  534. except: ['triggers']
  535. only: ['master', /^pr-.*$/]
  536. gce_centos7-calico-ha-triggers:
  537. stage: deploy-part2
  538. <<: *job
  539. <<: *gce
  540. variables:
  541. <<: *gce_variables
  542. <<: *centos7_calico_ha_variables
  543. when: on_success
  544. only: ['triggers']
  545. gce_centos7-kube-router:
  546. stage: deploy-special
  547. <<: *job
  548. <<: *gce
  549. variables:
  550. <<: *gce_variables
  551. <<: *centos7_kube_router_variables
  552. when: manual
  553. except: ['triggers']
  554. only: ['master', /^pr-.*$/]
  555. gce_centos7-multus-calico:
  556. stage: deploy-part2
  557. <<: *job
  558. <<: *gce
  559. variables:
  560. <<: *gce_variables
  561. <<: *centos7_multus_calico_variables
  562. when: manual
  563. except: ['triggers']
  564. only: ['master', /^pr-.*$/]
  565. gce_opensuse-canal:
  566. stage: deploy-part2
  567. <<: *job
  568. <<: *gce
  569. variables:
  570. <<: *gce_variables
  571. <<: *opensuse_canal_variables
  572. when: manual
  573. except: ['triggers']
  574. only: ['master', /^pr-.*$/]
  575. # no triggers yet https://github.com/kubernetes-incubator/kargo/issues/613
  576. gce_coreos-alpha-weave-ha:
  577. stage: deploy-special
  578. <<: *job
  579. <<: *gce
  580. variables:
  581. <<: *gce_variables
  582. <<: *coreos_alpha_weave_ha_variables
  583. when: manual
  584. except: ['triggers']
  585. only: ['master', /^pr-.*$/]
  586. gce_coreos-kube-router:
  587. stage: deploy-special
  588. <<: *job
  589. <<: *gce
  590. variables:
  591. <<: *gce_variables
  592. <<: *coreos_kube_router_variables
  593. when: manual
  594. except: ['triggers']
  595. only: ['master', /^pr-.*$/]
  596. gce_ubuntu-rkt-sep:
  597. stage: deploy-part2
  598. <<: *job
  599. <<: *gce
  600. variables:
  601. <<: *gce_variables
  602. <<: *ubuntu_rkt_sep_variables
  603. when: manual
  604. except: ['triggers']
  605. only: ['master', /^pr-.*$/]
  606. gce_ubuntu-flannel-sep:
  607. stage: deploy-special
  608. <<: *job
  609. <<: *gce
  610. variables:
  611. <<: *gce_variables
  612. <<: *ubuntu_flannel_variables
  613. when: manual
  614. except: ['triggers']
  615. only: ['master', /^pr-.*$/]
  616. gce_ubuntu-kube-router-sep:
  617. stage: deploy-special
  618. <<: *job
  619. <<: *gce
  620. variables:
  621. <<: *gce_variables
  622. <<: *ubuntu_kube_router_variables
  623. when: manual
  624. except: ['triggers']
  625. only: ['master', /^pr-.*$/]
  626. # Premoderated with manual actions
  627. ci-authorized:
  628. <<: *job
  629. stage: moderator
  630. before_script:
  631. - apt-get -y install jq
  632. script:
  633. - /bin/sh scripts/premoderator.sh
  634. except: ['triggers', 'master']
  635. syntax-check:
  636. <<: *job
  637. stage: unit-tests
  638. script:
  639. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check
  640. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root upgrade-cluster.yml -vvv --syntax-check
  641. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root reset.yml -vvv --syntax-check
  642. - 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
  643. except: ['triggers', 'master']
  644. yamllint:
  645. <<: *job
  646. stage: unit-tests
  647. script:
  648. - yamllint roles
  649. except: ['triggers', 'master']
  650. tox-inventory-builder:
  651. stage: unit-tests
  652. <<: *job
  653. script:
  654. - pip install tox
  655. - cd contrib/inventory_builder && tox
  656. when: manual
  657. except: ['triggers', 'master']