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.

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