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.

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