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.

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