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.

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