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.

82 lines
2.2 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
  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.18.0
  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. CI_TEST_SETTING: "./tests/common/_kubespray_test_settings.yml"
  19. GS_ACCESS_KEY_ID: $GS_KEY
  20. GS_SECRET_ACCESS_KEY: $GS_SECRET
  21. CONTAINER_ENGINE: docker
  22. SSH_USER: root
  23. GCE_PREEMPTIBLE: "false"
  24. ANSIBLE_KEEP_REMOTE_FILES: "1"
  25. ANSIBLE_CONFIG: ./tests/ansible.cfg
  26. ANSIBLE_INVENTORY: ./inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
  27. IDEMPOT_CHECK: "false"
  28. RESET_CHECK: "false"
  29. UPGRADE_TEST: "false"
  30. MITOGEN_ENABLE: "false"
  31. ANSIBLE_LOG_LEVEL: "-vv"
  32. RECOVER_CONTROL_PLANE_TEST: "false"
  33. RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:],kube_control_plane[1:]"
  34. TERRAFORM_VERSION: 1.0.8
  35. ANSIBLE_MAJOR_VERSION: "2.10"
  36. before_script:
  37. - ./tests/scripts/rebase.sh
  38. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  39. - python -m pip uninstall -y ansible ansible-base ansible-core
  40. - python -m pip install -r tests/requirements-${ANSIBLE_MAJOR_VERSION}.txt
  41. - mkdir -p /.ssh
  42. .job: &job
  43. tags:
  44. - packet
  45. image: quay.io/kubespray/kubespray:$KUBESPRAY_VERSION
  46. artifacts:
  47. when: always
  48. paths:
  49. - cluster-dump/
  50. .testcases: &testcases
  51. <<: *job
  52. retry: 1
  53. before_script:
  54. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  55. - ./tests/scripts/rebase.sh
  56. - ./tests/scripts/testcases_prepare.sh
  57. script:
  58. - ./tests/scripts/testcases_run.sh
  59. after_script:
  60. - chronic ./tests/scripts/testcases_cleanup.sh
  61. # For failfast, at least 1 job must be defined in .gitlab-ci.yml
  62. # Premoderated with manual actions
  63. ci-authorized:
  64. extends: .job
  65. stage: moderator
  66. script:
  67. - /bin/sh scripts/premoderator.sh
  68. except: ['triggers', 'master']
  69. # Disable ci moderator
  70. only: []
  71. include:
  72. - .gitlab-ci/lint.yml
  73. - .gitlab-ci/shellcheck.yml
  74. - .gitlab-ci/terraform.yml
  75. - .gitlab-ci/packet.yml
  76. - .gitlab-ci/vagrant.yml