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.

84 lines
2.3 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.19.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. 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. REMOVE_NODE_CHECK: "false"
  30. UPGRADE_TEST: "false"
  31. MITOGEN_ENABLE: "false"
  32. ANSIBLE_LOG_LEVEL: "-vv"
  33. RECOVER_CONTROL_PLANE_TEST: "false"
  34. RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:],kube_control_plane[1:]"
  35. TERRAFORM_VERSION: 1.0.8
  36. ANSIBLE_MAJOR_VERSION: "2.11"
  37. before_script:
  38. - ./tests/scripts/rebase.sh
  39. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  40. - python -m pip uninstall -y ansible ansible-base ansible-core
  41. - python -m pip install -r tests/requirements-${ANSIBLE_MAJOR_VERSION}.txt
  42. - mkdir -p /.ssh
  43. .job: &job
  44. tags:
  45. - packet
  46. image: quay.io/kubespray/kubespray:$KUBESPRAY_VERSION
  47. artifacts:
  48. when: always
  49. paths:
  50. - cluster-dump/
  51. .testcases: &testcases
  52. <<: *job
  53. retry: 1
  54. before_script:
  55. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  56. - ./tests/scripts/rebase.sh
  57. - ./tests/scripts/testcases_prepare.sh
  58. script:
  59. - ./tests/scripts/testcases_run.sh
  60. after_script:
  61. - chronic ./tests/scripts/testcases_cleanup.sh
  62. # For failfast, at least 1 job must be defined in .gitlab-ci.yml
  63. # Premoderated with manual actions
  64. ci-authorized:
  65. extends: .job
  66. stage: moderator
  67. script:
  68. - /bin/sh scripts/premoderator.sh
  69. except: ['triggers', 'master']
  70. # Disable ci moderator
  71. only: []
  72. include:
  73. - .gitlab-ci/lint.yml
  74. - .gitlab-ci/shellcheck.yml
  75. - .gitlab-ci/terraform.yml
  76. - .gitlab-ci/packet.yml
  77. - .gitlab-ci/vagrant.yml
  78. - .gitlab-ci/molecule.yml