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.

77 lines
2.0 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
  1. ---
  2. stages:
  3. - unit-tests
  4. - deploy-part1
  5. - moderator
  6. - deploy-part2
  7. - deploy-part3
  8. - deploy-special
  9. variables:
  10. KUBESPRAY_VERSION: v2.15.1
  11. FAILFASTCI_NAMESPACE: 'kargo-ci'
  12. GITLAB_REPOSITORY: 'kargo-ci/kubernetes-sigs-kubespray'
  13. ANSIBLE_FORCE_COLOR: "true"
  14. MAGIC: "ci check this"
  15. TEST_ID: "$CI_PIPELINE_ID-$CI_BUILD_ID"
  16. CI_TEST_VARS: "./tests/files/${CI_JOB_NAME}.yml"
  17. CI_TEST_REGISTRY_MIRROR: "./tests/common/_docker_hub_registry_mirror.yml"
  18. GS_ACCESS_KEY_ID: $GS_KEY
  19. GS_SECRET_ACCESS_KEY: $GS_SECRET
  20. CONTAINER_ENGINE: docker
  21. SSH_USER: root
  22. GCE_PREEMPTIBLE: "false"
  23. ANSIBLE_KEEP_REMOTE_FILES: "1"
  24. ANSIBLE_CONFIG: ./tests/ansible.cfg
  25. ANSIBLE_INVENTORY: ./inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
  26. IDEMPOT_CHECK: "false"
  27. RESET_CHECK: "false"
  28. UPGRADE_TEST: "false"
  29. MITOGEN_ENABLE: "false"
  30. ANSIBLE_LOG_LEVEL: "-vv"
  31. RECOVER_CONTROL_PLANE_TEST: "false"
  32. RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:],kube_control_plane[1:]"
  33. before_script:
  34. - ./tests/scripts/rebase.sh
  35. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  36. - python -m pip install -r tests/requirements.txt
  37. - mkdir -p /.ssh
  38. .job: &job
  39. tags:
  40. - packet
  41. image: quay.io/kubespray/kubespray:$KUBESPRAY_VERSION
  42. artifacts:
  43. when: always
  44. paths:
  45. - cluster-dump/
  46. .testcases: &testcases
  47. <<: *job
  48. before_script:
  49. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  50. - ./tests/scripts/rebase.sh
  51. - ./tests/scripts/testcases_prepare.sh
  52. script:
  53. - ./tests/scripts/testcases_run.sh
  54. after_script:
  55. - chronic ./tests/scripts/testcases_cleanup.sh
  56. # For failfast, at least 1 job must be defined in .gitlab-ci.yml
  57. # Premoderated with manual actions
  58. ci-authorized:
  59. extends: .job
  60. stage: moderator
  61. script:
  62. - /bin/sh scripts/premoderator.sh
  63. except: ['triggers', 'master']
  64. # Disable ci moderator
  65. only: []
  66. include:
  67. - .gitlab-ci/lint.yml
  68. - .gitlab-ci/shellcheck.yml
  69. - .gitlab-ci/terraform.yml
  70. - .gitlab-ci/packet.yml
  71. - .gitlab-ci/vagrant.yml