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.

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