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.

672 lines
16 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
contiv network support (#1914) * Add Contiv support Contiv is a network plugin for Kubernetes and Docker. It supports vlan/vxlan/BGP/Cisco ACI technologies. It support firewall policies, multiple networks and bridging pods onto physical networks. * Update contiv version to 1.1.4 Update contiv version to 1.1.4 and added SVC_SUBNET in contiv-config. * Load openvswitch module to workaround on CentOS7.4 * Set contiv cni version to 0.1.0 Correct contiv CNI version to 0.1.0. * Use kube_apiserver_endpoint for K8S_API_SERVER Use kube_apiserver_endpoint as K8S_API_SERVER to make contiv talks to a available endpoint no matter if there's a loadbalancer or not. * Make contiv use its own etcd Before this commit, contiv is using a etcd proxy mode to k8s etcd, this work fine when the etcd hosts are co-located with contiv etcd proxy, however the k8s peering certs are only in etcd group, as a result the etcd-proxy is not able to peering with the k8s etcd on etcd group, plus the netplugin is always trying to find the etcd endpoint on localhost, this will cause problem for all netplugins not runnign on etcd group nodes. This commit make contiv uses its own etcd, separate from k8s one. on kube-master nodes (where net-master runs), it will run as leader mode and on all rest nodes it will run as proxy mode. * Use cp instead of rsync to copy cni binaries Since rsync has been removed from hyperkube, this commit changes it to use cp instead. * Make contiv-etcd able to run on master nodes * Add rbac_enabled flag for contiv pods * Add contiv into CNI network plugin lists * migrate contiv test to tests/files Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> * Add required rules for contiv netplugin * Better handling json return of fwdMode * Make contiv etcd port configurable * Use default var instead of templating * roles/download/defaults/main.yml: use contiv 1.1.7 Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
6 years ago
contiv network support (#1914) * Add Contiv support Contiv is a network plugin for Kubernetes and Docker. It supports vlan/vxlan/BGP/Cisco ACI technologies. It support firewall policies, multiple networks and bridging pods onto physical networks. * Update contiv version to 1.1.4 Update contiv version to 1.1.4 and added SVC_SUBNET in contiv-config. * Load openvswitch module to workaround on CentOS7.4 * Set contiv cni version to 0.1.0 Correct contiv CNI version to 0.1.0. * Use kube_apiserver_endpoint for K8S_API_SERVER Use kube_apiserver_endpoint as K8S_API_SERVER to make contiv talks to a available endpoint no matter if there's a loadbalancer or not. * Make contiv use its own etcd Before this commit, contiv is using a etcd proxy mode to k8s etcd, this work fine when the etcd hosts are co-located with contiv etcd proxy, however the k8s peering certs are only in etcd group, as a result the etcd-proxy is not able to peering with the k8s etcd on etcd group, plus the netplugin is always trying to find the etcd endpoint on localhost, this will cause problem for all netplugins not runnign on etcd group nodes. This commit make contiv uses its own etcd, separate from k8s one. on kube-master nodes (where net-master runs), it will run as leader mode and on all rest nodes it will run as proxy mode. * Use cp instead of rsync to copy cni binaries Since rsync has been removed from hyperkube, this commit changes it to use cp instead. * Make contiv-etcd able to run on master nodes * Add rbac_enabled flag for contiv pods * Add contiv into CNI network plugin lists * migrate contiv test to tests/files Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> * Add required rules for contiv netplugin * Better handling json return of fwdMode * Make contiv etcd port configurable * Use default var instead of templating * roles/download/defaults/main.yml: use contiv 1.1.7 Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
6 years ago
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
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. .coreos_cilium_variables: &coreos_cilium_variables
  230. # stage: deploy-special
  231. MOVED_TO_GROUP_VARS: "true"
  232. .ubuntu_cilium_sep_variables: &ubuntu_cilium_sep_variables
  233. # stage: deploy-special
  234. MOVED_TO_GROUP_VARS: "true"
  235. .rhel7_weave_variables: &rhel7_weave_variables
  236. # stage: deploy-part1
  237. MOVED_TO_GROUP_VARS: "true"
  238. .centos7_flannel_addons_variables: &centos7_flannel_addons_variables
  239. # stage: deploy-part2
  240. MOVED_TO_GROUP_VARS: "true"
  241. .debian8_calico_variables: &debian8_calico_variables
  242. # stage: deploy-part2
  243. MOVED_TO_GROUP_VARS: "true"
  244. .coreos_canal_variables: &coreos_canal_variables
  245. # stage: deploy-part2
  246. MOVED_TO_GROUP_VARS: "true"
  247. .rhel7_canal_sep_variables: &rhel7_canal_sep_variables
  248. # stage: deploy-special
  249. MOVED_TO_GROUP_VARS: "true"
  250. .ubuntu_weave_sep_variables: &ubuntu_weave_sep_variables
  251. # stage: deploy-special
  252. MOVED_TO_GROUP_VARS: "true"
  253. .centos7_calico_ha_variables: &centos7_calico_ha_variables
  254. # stage: deploy-special
  255. MOVED_TO_GROUP_VARS: "true"
  256. .coreos_alpha_weave_ha_variables: &coreos_alpha_weave_ha_variables
  257. # stage: deploy-special
  258. MOVED_TO_GROUP_VARS: "true"
  259. .ubuntu_rkt_sep_variables: &ubuntu_rkt_sep_variables
  260. # stage: deploy-part1
  261. MOVED_TO_GROUP_VARS: "true"
  262. .ubuntu_vault_sep_variables: &ubuntu_vault_sep_variables
  263. # stage: deploy-part1
  264. MOVED_TO_GROUP_VARS: "true"
  265. .ubuntu_flannel_variables: &ubuntu_flannel_variables
  266. # stage: deploy-special
  267. MOVED_TO_GROUP_VARS: "true"
  268. # Builds for PRs only (premoderated by unit-tests step) and triggers (auto)
  269. ### PR JOBS PART1
  270. gce_coreos-calico-aio:
  271. stage: deploy-part1
  272. <<: *job
  273. <<: *gce
  274. variables:
  275. <<: *coreos_calico_aio_variables
  276. <<: *gce_variables
  277. when: on_success
  278. except: ['triggers']
  279. only: [/^pr-.*$/]
  280. ### PR JOBS PART2
  281. gce_centos7-flannel-addons:
  282. stage: deploy-part2
  283. <<: *job
  284. <<: *gce
  285. variables:
  286. <<: *gce_variables
  287. <<: *centos7_flannel_addons_variables
  288. when: on_success
  289. except: ['triggers']
  290. only: [/^pr-.*$/]
  291. gce_ubuntu-weave-sep:
  292. stage: deploy-part2
  293. <<: *job
  294. <<: *gce
  295. variables:
  296. <<: *gce_variables
  297. <<: *ubuntu_weave_sep_variables
  298. when: on_success
  299. except: ['triggers']
  300. only: [/^pr-.*$/]
  301. ### MANUAL JOBS
  302. gce_coreos-calico-sep-triggers:
  303. stage: deploy-part2
  304. <<: *job
  305. <<: *gce
  306. variables:
  307. <<: *gce_variables
  308. <<: *coreos_calico_aio_variables
  309. when: on_success
  310. only: ['triggers']
  311. gce_ubuntu-canal-ha-triggers:
  312. stage: deploy-part2
  313. <<: *job
  314. <<: *gce
  315. variables:
  316. <<: *gce_variables
  317. <<: *ubuntu_canal_ha_variables
  318. when: on_success
  319. only: ['triggers']
  320. gce_centos7-flannel-addons-triggers:
  321. stage: deploy-part2
  322. <<: *job
  323. <<: *gce
  324. variables:
  325. <<: *gce_variables
  326. <<: *centos7_flannel_addons_variables
  327. when: on_success
  328. only: ['triggers']
  329. gce_ubuntu-weave-sep-triggers:
  330. stage: deploy-part2
  331. <<: *job
  332. <<: *gce
  333. variables:
  334. <<: *gce_variables
  335. <<: *ubuntu_weave_sep_variables
  336. when: on_success
  337. only: ['triggers']
  338. # More builds for PRs/merges (manual) and triggers (auto)
  339. do_ubuntu-canal-ha:
  340. stage: deploy-part2
  341. <<: *job
  342. <<: *do
  343. variables:
  344. <<: *do_variables
  345. when: manual
  346. except: ['triggers']
  347. only: ['master', /^pr-.*$/]
  348. gce_ubuntu-canal-ha:
  349. stage: deploy-part2
  350. <<: *job
  351. <<: *gce
  352. variables:
  353. <<: *gce_variables
  354. <<: *ubuntu_canal_ha_variables
  355. when: manual
  356. except: ['triggers']
  357. only: ['master', /^pr-.*$/]
  358. gce_ubuntu-canal-kubeadm:
  359. stage: deploy-part2
  360. <<: *job
  361. <<: *gce
  362. variables:
  363. <<: *gce_variables
  364. <<: *ubuntu_canal_kubeadm_variables
  365. when: manual
  366. except: ['triggers']
  367. only: ['master', /^pr-.*$/]
  368. gce_ubuntu-canal-kubeadm-triggers:
  369. stage: deploy-part2
  370. <<: *job
  371. <<: *gce
  372. variables:
  373. <<: *gce_variables
  374. <<: *ubuntu_canal_kubeadm_variables
  375. when: on_success
  376. only: ['triggers']
  377. gce_centos-weave-kubeadm:
  378. stage: deploy-part2
  379. <<: *job
  380. <<: *gce
  381. variables:
  382. <<: *gce_variables
  383. <<: *centos_weave_kubeadm_variables
  384. when: manual
  385. except: ['triggers']
  386. only: ['master', /^pr-.*$/]
  387. gce_centos-weave-kubeadm-triggers:
  388. stage: deploy-part2
  389. <<: *job
  390. <<: *gce
  391. variables:
  392. <<: *gce_variables
  393. <<: *centos_weave_kubeadm_variables
  394. when: on_success
  395. only: ['triggers']
  396. gce_ubuntu-contiv-sep:
  397. stage: deploy-special
  398. <<: *job
  399. <<: *gce
  400. variables:
  401. <<: *gce_variables
  402. <<: *ubuntu_contiv_sep_variables
  403. when: manual
  404. except: ['triggers']
  405. only: ['master', /^pr-.*$/]
  406. gce_coreos-cilium:
  407. stage: deploy-special
  408. <<: *job
  409. <<: *gce
  410. variables:
  411. <<: *gce_variables
  412. <<: *coreos_cilium_variables
  413. when: manual
  414. except: ['triggers']
  415. only: ['master', /^pr-.*$/]
  416. gce_ubuntu-cilium-sep:
  417. stage: deploy-special
  418. <<: *job
  419. <<: *gce
  420. variables:
  421. <<: *gce_variables
  422. <<: *ubuntu_cilium_sep_variables
  423. when: manual
  424. except: ['triggers']
  425. only: ['master', /^pr-.*$/]
  426. gce_rhel7-weave:
  427. stage: deploy-part2
  428. <<: *job
  429. <<: *gce
  430. variables:
  431. <<: *gce_variables
  432. <<: *rhel7_weave_variables
  433. when: manual
  434. except: ['triggers']
  435. only: ['master', /^pr-.*$/]
  436. gce_rhel7-weave-triggers:
  437. stage: deploy-part2
  438. <<: *job
  439. <<: *gce
  440. variables:
  441. <<: *gce_variables
  442. <<: *rhel7_weave_variables
  443. when: on_success
  444. only: ['triggers']
  445. gce_debian8-calico-upgrade:
  446. stage: deploy-part2
  447. <<: *job
  448. <<: *gce
  449. variables:
  450. <<: *gce_variables
  451. <<: *debian8_calico_variables
  452. when: manual
  453. except: ['triggers']
  454. only: ['master', /^pr-.*$/]
  455. gce_debian8-calico-triggers:
  456. stage: deploy-part2
  457. <<: *job
  458. <<: *gce
  459. variables:
  460. <<: *gce_variables
  461. <<: *debian8_calico_variables
  462. when: on_success
  463. only: ['triggers']
  464. gce_coreos-canal:
  465. stage: deploy-part2
  466. <<: *job
  467. <<: *gce
  468. variables:
  469. <<: *gce_variables
  470. <<: *coreos_canal_variables
  471. when: manual
  472. except: ['triggers']
  473. only: ['master', /^pr-.*$/]
  474. gce_coreos-canal-triggers:
  475. stage: deploy-part2
  476. <<: *job
  477. <<: *gce
  478. variables:
  479. <<: *gce_variables
  480. <<: *coreos_canal_variables
  481. when: on_success
  482. only: ['triggers']
  483. gce_rhel7-canal-sep:
  484. stage: deploy-special
  485. <<: *job
  486. <<: *gce
  487. variables:
  488. <<: *gce_variables
  489. <<: *rhel7_canal_sep_variables
  490. when: manual
  491. except: ['triggers']
  492. only: ['master', /^pr-.*$/,]
  493. gce_rhel7-canal-sep-triggers:
  494. stage: deploy-part2
  495. <<: *job
  496. <<: *gce
  497. variables:
  498. <<: *gce_variables
  499. <<: *rhel7_canal_sep_variables
  500. when: on_success
  501. only: ['triggers']
  502. gce_centos7-calico-ha:
  503. stage: deploy-special
  504. <<: *job
  505. <<: *gce
  506. variables:
  507. <<: *gce_variables
  508. <<: *centos7_calico_ha_variables
  509. when: manual
  510. except: ['triggers']
  511. only: ['master', /^pr-.*$/]
  512. gce_centos7-calico-ha-triggers:
  513. stage: deploy-part2
  514. <<: *job
  515. <<: *gce
  516. variables:
  517. <<: *gce_variables
  518. <<: *centos7_calico_ha_variables
  519. when: on_success
  520. only: ['triggers']
  521. # no triggers yet https://github.com/kubernetes-incubator/kargo/issues/613
  522. gce_coreos-alpha-weave-ha:
  523. stage: deploy-special
  524. <<: *job
  525. <<: *gce
  526. variables:
  527. <<: *gce_variables
  528. <<: *coreos_alpha_weave_ha_variables
  529. when: manual
  530. except: ['triggers']
  531. only: ['master', /^pr-.*$/]
  532. gce_ubuntu-rkt-sep:
  533. stage: deploy-part2
  534. <<: *job
  535. <<: *gce
  536. variables:
  537. <<: *gce_variables
  538. <<: *ubuntu_rkt_sep_variables
  539. when: manual
  540. except: ['triggers']
  541. only: ['master', /^pr-.*$/]
  542. gce_ubuntu-vault-sep:
  543. stage: deploy-part2
  544. <<: *job
  545. <<: *gce
  546. variables:
  547. <<: *gce_variables
  548. <<: *ubuntu_vault_sep_variables
  549. when: manual
  550. except: ['triggers']
  551. only: ['master', /^pr-.*$/]
  552. gce_ubuntu-flannel-sep:
  553. stage: deploy-special
  554. <<: *job
  555. <<: *gce
  556. variables:
  557. <<: *gce_variables
  558. <<: *ubuntu_flannel_variables
  559. when: manual
  560. except: ['triggers']
  561. only: ['master', /^pr-.*$/]
  562. # Premoderated with manual actions
  563. ci-authorized:
  564. <<: *job
  565. stage: moderator
  566. before_script:
  567. - apt-get -y install jq
  568. script:
  569. - /bin/sh scripts/premoderator.sh
  570. except: ['triggers', 'master']
  571. syntax-check:
  572. <<: *job
  573. stage: unit-tests
  574. script:
  575. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root cluster.yml -vvv --syntax-check
  576. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root upgrade-cluster.yml -vvv --syntax-check
  577. - ansible-playbook -i inventory/local-tests.cfg -u root -e ansible_ssh_user=root -b --become-user=root reset.yml -vvv --syntax-check
  578. - 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
  579. except: ['triggers', 'master']
  580. yamllint:
  581. <<: *job
  582. stage: unit-tests
  583. script:
  584. - yamllint roles
  585. except: ['triggers', 'master']
  586. tox-inventory-builder:
  587. stage: unit-tests
  588. <<: *job
  589. script:
  590. - pip install tox
  591. - cd contrib/inventory_builder && tox
  592. when: manual
  593. except: ['triggers', 'master']