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.

657 lines
16 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
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. IDEMPOT_CHECK: "false"
  23. RESET_CHECK: "false"
  24. UPGRADE_TEST: "false"
  25. KUBEADM_ENABLED: "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:latest
  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 kargo 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 ba0a03a8ba2d97a73d06242ec4bb3c7e2012e58c
  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-incubator/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 inventory/sample/hosts.ini
  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_python_interpreter=${PYPATH}
  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 inventory/sample/hosts.ini
  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_python_interpreter=${PYPATH}
  119. -e ansible_ssh_user=${SSH_USER}
  120. -e local_release_dir=${PWD}/downloads
  121. --limit "all:!fake_hosts"
  122. $PLAYBOOK;
  123. fi
  124. # Tests Cases
  125. ## Test Master API
  126. - >
  127. 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
  128. -e "{kubeadm_enabled: ${KUBEADM_ENABLED}}"
  129. ## Ping the between 2 pod
  130. - 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
  131. ## Advanced DNS checks
  132. - 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
  133. ## Idempotency checks 1/5 (repeat deployment)
  134. - >
  135. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  136. ansible-playbook
  137. -i inventory/sample/hosts.ini
  138. -b --become-user=root
  139. --private-key=${HOME}/.ssh/id_rsa
  140. -u $SSH_USER
  141. ${SSH_ARGS}
  142. ${LOG_LEVEL}
  143. -e @${CI_TEST_VARS}
  144. -e ansible_python_interpreter=${PYPATH}
  145. -e local_release_dir=${PWD}/downloads
  146. --limit "all:!fake_hosts"
  147. cluster.yml;
  148. fi
  149. ## Idempotency checks 2/5 (Advanced DNS checks)
  150. - >
  151. if [ "${IDEMPOT_CHECK}" = "true" ]; then
  152. ansible-playbook
  153. -i inventory/sample/hosts.ini
  154. -b --become-user=root
  155. --private-key=${HOME}/.ssh/id_rsa
  156. -u $SSH_USER
  157. ${SSH_ARGS}
  158. ${LOG_LEVEL}
  159. -e @${CI_TEST_VARS}
  160. --limit "all:!fake_hosts"
  161. tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  162. fi
  163. ## Idempotency checks 3/5 (reset deployment)
  164. - >
  165. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  166. ansible-playbook
  167. -i inventory/sample/hosts.ini
  168. -b --become-user=root
  169. --private-key=${HOME}/.ssh/id_rsa
  170. -u $SSH_USER
  171. ${SSH_ARGS}
  172. ${LOG_LEVEL}
  173. -e @${CI_TEST_VARS}
  174. -e ansible_python_interpreter=${PYPATH}
  175. -e reset_confirmation=yes
  176. --limit "all:!fake_hosts"
  177. reset.yml;
  178. fi
  179. ## Idempotency checks 4/5 (redeploy after reset)
  180. - >
  181. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  182. ansible-playbook
  183. -i inventory/sample/hosts.ini
  184. -b --become-user=root
  185. --private-key=${HOME}/.ssh/id_rsa
  186. -u $SSH_USER
  187. ${SSH_ARGS}
  188. ${LOG_LEVEL}
  189. -e @${CI_TEST_VARS}
  190. -e ansible_python_interpreter=${PYPATH}
  191. -e local_release_dir=${PWD}/downloads
  192. --limit "all:!fake_hosts"
  193. cluster.yml;
  194. fi
  195. ## Idempotency checks 5/5 (Advanced DNS checks)
  196. - >
  197. if [ "${IDEMPOT_CHECK}" = "true" -a "${RESET_CHECK}" = "true" ]; then
  198. ansible-playbook -i inventory/sample/hosts.ini -e ansible_python_interpreter=${PYPATH}
  199. -u $SSH_USER -e ansible_ssh_user=$SSH_USER $SSH_ARGS -b --become-user=root
  200. --limit "all:!fake_hosts"
  201. tests/testcases/040_check-network-adv.yml $LOG_LEVEL;
  202. fi
  203. after_script:
  204. - cd tests && make delete-${CI_PLATFORM} -s ; cd -
  205. .gce: &gce
  206. <<: *testcases
  207. variables:
  208. <<: *gce_variables
  209. .do: &do
  210. variables:
  211. <<: *do_variables
  212. <<: *testcases
  213. # Test matrix. Leave the comments for markup scripts.
  214. .coreos_calico_aio_variables: &coreos_calico_aio_variables
  215. # stage: deploy-part1
  216. MOVED_TO_GROUP_VARS: "true"
  217. .ubuntu_canal_ha_variables: &ubuntu_canal_ha_variables
  218. # stage: deploy-part1
  219. UPGRADE_TEST: "graceful"
  220. .centos_weave_kubeadm_variables: &centos_weave_kubeadm_variables
  221. # stage: deploy-part1
  222. UPGRADE_TEST: "graceful"
  223. .ubuntu_canal_kubeadm_variables: &ubuntu_canal_kubeadm_variables
  224. # stage: deploy-part1
  225. MOVED_TO_GROUP_VARS: "true"
  226. .ubuntu_contiv_sep_variables: &ubuntu_contiv_sep_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. .debian8_calico_variables: &debian8_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. .coreos_alpha_weave_ha_variables: &coreos_alpha_weave_ha_variables
  254. # stage: deploy-special
  255. MOVED_TO_GROUP_VARS: "true"
  256. .ubuntu_rkt_sep_variables: &ubuntu_rkt_sep_variables
  257. # stage: deploy-part1
  258. MOVED_TO_GROUP_VARS: "true"
  259. .ubuntu_vault_sep_variables: &ubuntu_vault_sep_variables
  260. # stage: deploy-part1
  261. MOVED_TO_GROUP_VARS: "true"
  262. .ubuntu_flannel_variables: &ubuntu_flannel_variables
  263. # stage: deploy-special
  264. MOVED_TO_GROUP_VARS: "true"
  265. # Builds for PRs only (premoderated by unit-tests step) and triggers (auto)
  266. ### PR JOBS PART1
  267. gce_coreos-calico-aio:
  268. stage: deploy-part1
  269. <<: *job
  270. <<: *gce
  271. variables:
  272. <<: *coreos_calico_aio_variables
  273. <<: *gce_variables
  274. when: on_success
  275. except: ['triggers']
  276. only: [/^pr-.*$/]
  277. ### PR JOBS PART2
  278. gce_centos7-flannel-addons:
  279. stage: deploy-part2
  280. <<: *job
  281. <<: *gce
  282. variables:
  283. <<: *gce_variables
  284. <<: *centos7_flannel_addons_variables
  285. when: on_success
  286. except: ['triggers']
  287. only: [/^pr-.*$/]
  288. gce_ubuntu-weave-sep:
  289. stage: deploy-part2
  290. <<: *job
  291. <<: *gce
  292. variables:
  293. <<: *gce_variables
  294. <<: *ubuntu_weave_sep_variables
  295. when: on_success
  296. except: ['triggers']
  297. only: [/^pr-.*$/]
  298. ### MANUAL JOBS
  299. gce_coreos-calico-sep-triggers:
  300. stage: deploy-part2
  301. <<: *job
  302. <<: *gce
  303. variables:
  304. <<: *gce_variables
  305. <<: *coreos_calico_aio_variables
  306. when: on_success
  307. only: ['triggers']
  308. gce_ubuntu-canal-ha-triggers:
  309. stage: deploy-part2
  310. <<: *job
  311. <<: *gce
  312. variables:
  313. <<: *gce_variables
  314. <<: *ubuntu_canal_ha_variables
  315. when: on_success
  316. only: ['triggers']
  317. gce_centos7-flannel-addons-triggers:
  318. stage: deploy-part2
  319. <<: *job
  320. <<: *gce
  321. variables:
  322. <<: *gce_variables
  323. <<: *centos7_flannel_addons_variables
  324. when: on_success
  325. only: ['triggers']
  326. gce_ubuntu-weave-sep-triggers:
  327. stage: deploy-part2
  328. <<: *job
  329. <<: *gce
  330. variables:
  331. <<: *gce_variables
  332. <<: *ubuntu_weave_sep_variables
  333. when: on_success
  334. only: ['triggers']
  335. # More builds for PRs/merges (manual) and triggers (auto)
  336. do_ubuntu-canal-ha:
  337. stage: deploy-part2
  338. <<: *job
  339. <<: *do
  340. variables:
  341. <<: *do_variables
  342. when: manual
  343. except: ['triggers']
  344. only: ['master', /^pr-.*$/]
  345. gce_ubuntu-canal-ha:
  346. stage: deploy-part2
  347. <<: *job
  348. <<: *gce
  349. variables:
  350. <<: *gce_variables
  351. <<: *ubuntu_canal_ha_variables
  352. when: manual
  353. except: ['triggers']
  354. only: ['master', /^pr-.*$/]
  355. gce_ubuntu-canal-kubeadm:
  356. stage: deploy-part2
  357. <<: *job
  358. <<: *gce
  359. variables:
  360. <<: *gce_variables
  361. <<: *ubuntu_canal_kubeadm_variables
  362. when: manual
  363. except: ['triggers']
  364. only: ['master', /^pr-.*$/]
  365. gce_ubuntu-canal-kubeadm-triggers:
  366. stage: deploy-part2
  367. <<: *job
  368. <<: *gce
  369. variables:
  370. <<: *gce_variables
  371. <<: *ubuntu_canal_kubeadm_variables
  372. when: on_success
  373. only: ['triggers']
  374. gce_centos-weave-kubeadm:
  375. stage: deploy-part2
  376. <<: *job
  377. <<: *gce
  378. variables:
  379. <<: *gce_variables
  380. <<: *centos_weave_kubeadm_variables
  381. when: manual
  382. except: ['triggers']
  383. only: ['master', /^pr-.*$/]
  384. gce_centos-weave-kubeadm-triggers:
  385. stage: deploy-part2
  386. <<: *job
  387. <<: *gce
  388. variables:
  389. <<: *gce_variables
  390. <<: *centos_weave_kubeadm_variables
  391. when: on_success
  392. only: ['triggers']
  393. gce_ubuntu-contiv-sep:
  394. stage: deploy-special
  395. <<: *job
  396. <<: *gce
  397. variables:
  398. <<: *gce_variables
  399. <<: *ubuntu_contiv_sep_variables
  400. when: manual
  401. except: ['triggers']
  402. only: ['master', /^pr-.*$/]
  403. gce_ubuntu-cilium-sep:
  404. stage: deploy-special
  405. <<: *job
  406. <<: *gce
  407. variables:
  408. <<: *gce_variables
  409. <<: *ubuntu_cilium_sep_variables
  410. when: manual
  411. except: ['triggers']
  412. only: ['master', /^pr-.*$/]
  413. gce_rhel7-weave:
  414. stage: deploy-part2
  415. <<: *job
  416. <<: *gce
  417. variables:
  418. <<: *gce_variables
  419. <<: *rhel7_weave_variables
  420. when: manual
  421. except: ['triggers']
  422. only: ['master', /^pr-.*$/]
  423. gce_rhel7-weave-triggers:
  424. stage: deploy-part2
  425. <<: *job
  426. <<: *gce
  427. variables:
  428. <<: *gce_variables
  429. <<: *rhel7_weave_variables
  430. when: on_success
  431. only: ['triggers']
  432. gce_debian8-calico-upgrade:
  433. stage: deploy-part2
  434. <<: *job
  435. <<: *gce
  436. variables:
  437. <<: *gce_variables
  438. <<: *debian8_calico_variables
  439. when: manual
  440. except: ['triggers']
  441. only: ['master', /^pr-.*$/]
  442. gce_debian8-calico-triggers:
  443. stage: deploy-part2
  444. <<: *job
  445. <<: *gce
  446. variables:
  447. <<: *gce_variables
  448. <<: *debian8_calico_variables
  449. when: on_success
  450. only: ['triggers']
  451. gce_coreos-canal:
  452. stage: deploy-part2
  453. <<: *job
  454. <<: *gce
  455. variables:
  456. <<: *gce_variables
  457. <<: *coreos_canal_variables
  458. when: manual
  459. except: ['triggers']
  460. only: ['master', /^pr-.*$/]
  461. gce_coreos-canal-triggers:
  462. stage: deploy-part2
  463. <<: *job
  464. <<: *gce
  465. variables:
  466. <<: *gce_variables
  467. <<: *coreos_canal_variables
  468. when: on_success
  469. only: ['triggers']
  470. gce_rhel7-canal-sep:
  471. stage: deploy-special
  472. <<: *job
  473. <<: *gce
  474. variables:
  475. <<: *gce_variables
  476. <<: *rhel7_canal_sep_variables
  477. when: manual
  478. except: ['triggers']
  479. only: ['master', /^pr-.*$/,]
  480. gce_rhel7-canal-sep-triggers:
  481. stage: deploy-part2
  482. <<: *job
  483. <<: *gce
  484. variables:
  485. <<: *gce_variables
  486. <<: *rhel7_canal_sep_variables
  487. when: on_success
  488. only: ['triggers']
  489. gce_centos7-calico-ha:
  490. stage: deploy-special
  491. <<: *job
  492. <<: *gce
  493. variables:
  494. <<: *gce_variables
  495. <<: *centos7_calico_ha_variables
  496. when: manual
  497. except: ['triggers']
  498. only: ['master', /^pr-.*$/]
  499. gce_centos7-calico-ha-triggers:
  500. stage: deploy-part2
  501. <<: *job
  502. <<: *gce
  503. variables:
  504. <<: *gce_variables
  505. <<: *centos7_calico_ha_variables
  506. when: on_success
  507. only: ['triggers']
  508. # no triggers yet https://github.com/kubernetes-incubator/kargo/issues/613
  509. gce_coreos-alpha-weave-ha:
  510. stage: deploy-special
  511. <<: *job
  512. <<: *gce
  513. variables:
  514. <<: *gce_variables
  515. <<: *coreos_alpha_weave_ha_variables
  516. when: manual
  517. except: ['triggers']
  518. only: ['master', /^pr-.*$/]
  519. gce_ubuntu-rkt-sep:
  520. stage: deploy-part2
  521. <<: *job
  522. <<: *gce
  523. variables:
  524. <<: *gce_variables
  525. <<: *ubuntu_rkt_sep_variables
  526. when: manual
  527. except: ['triggers']
  528. only: ['master', /^pr-.*$/]
  529. gce_ubuntu-vault-sep:
  530. stage: deploy-part2
  531. <<: *job
  532. <<: *gce
  533. variables:
  534. <<: *gce_variables
  535. <<: *ubuntu_vault_sep_variables
  536. when: manual
  537. except: ['triggers']
  538. only: ['master', /^pr-.*$/]
  539. gce_ubuntu-flannel-sep:
  540. stage: deploy-special
  541. <<: *job
  542. <<: *gce
  543. variables:
  544. <<: *gce_variables
  545. <<: *ubuntu_flannel_variables
  546. when: manual
  547. except: ['triggers']
  548. only: ['master', /^pr-.*$/]
  549. # Premoderated with manual actions
  550. ci-authorized:
  551. <<: *job
  552. stage: moderator
  553. before_script:
  554. - apt-get -y install jq
  555. script:
  556. - /bin/sh scripts/premoderator.sh
  557. except: ['triggers', 'master']
  558. syntax-check:
  559. <<: *job
  560. stage: unit-tests
  561. script:
  562. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check
  563. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root upgrade-cluster.yml -vvv --syntax-check
  564. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root reset.yml -vvv --syntax-check
  565. - 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
  566. except: ['triggers', 'master']
  567. yamllint:
  568. <<: *job
  569. stage: unit-tests
  570. script:
  571. - yamllint roles
  572. except: ['triggers', 'master']
  573. tox-inventory-builder:
  574. stage: unit-tests
  575. <<: *job
  576. script:
  577. - pip install tox
  578. - cd contrib/inventory_builder && tox
  579. when: manual
  580. except: ['triggers', 'master']