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.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
8 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.25.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_JOB_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. PIPELINE_IMAGE: "$CI_REGISTRY_IMAGE/pipeline:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}"
  38. before_script:
  39. - ./tests/scripts/rebase.sh
  40. - mkdir -p /.ssh
  41. .job: &job
  42. tags:
  43. - packet
  44. image: $PIPELINE_IMAGE
  45. artifacts:
  46. when: always
  47. paths:
  48. - cluster-dump/
  49. .testcases: &testcases
  50. <<: *job
  51. retry: 1
  52. interruptible: true
  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/build.yml
  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