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.

79 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.15.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_14_VERSION: 0.14.10
  34. TERRAFORM_13_VERSION: 0.13.6
  35. before_script:
  36. - ./tests/scripts/rebase.sh
  37. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  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. before_script:
  51. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  52. - ./tests/scripts/rebase.sh
  53. - ./tests/scripts/testcases_prepare.sh
  54. script:
  55. - ./tests/scripts/testcases_run.sh
  56. after_script:
  57. - chronic ./tests/scripts/testcases_cleanup.sh
  58. # For failfast, at least 1 job must be defined in .gitlab-ci.yml
  59. # Premoderated with manual actions
  60. ci-authorized:
  61. extends: .job
  62. stage: moderator
  63. script:
  64. - /bin/sh scripts/premoderator.sh
  65. except: ['triggers', 'master']
  66. # Disable ci moderator
  67. only: []
  68. include:
  69. - .gitlab-ci/lint.yml
  70. - .gitlab-ci/shellcheck.yml
  71. - .gitlab-ci/terraform.yml
  72. - .gitlab-ci/packet.yml
  73. - .gitlab-ci/vagrant.yml