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.

75 lines
1.9 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.13.2
  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. GS_ACCESS_KEY_ID: $GS_KEY
  18. GS_SECRET_ACCESS_KEY: $GS_SECRET
  19. CONTAINER_ENGINE: docker
  20. SSH_USER: root
  21. GCE_PREEMPTIBLE: "false"
  22. ANSIBLE_KEEP_REMOTE_FILES: "1"
  23. ANSIBLE_CONFIG: ./tests/ansible.cfg
  24. ANSIBLE_INVENTORY: ./inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
  25. IDEMPOT_CHECK: "false"
  26. RESET_CHECK: "false"
  27. UPGRADE_TEST: "false"
  28. MITOGEN_ENABLE: "false"
  29. ANSIBLE_LOG_LEVEL: "-vv"
  30. RECOVER_CONTROL_PLANE_TEST: "false"
  31. RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:],kube-master[1:]"
  32. before_script:
  33. - ./tests/scripts/rebase.sh
  34. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  35. - python -m pip install -r tests/requirements.txt
  36. - mkdir -p /.ssh
  37. .job: &job
  38. tags:
  39. - packet
  40. image: quay.io/kubespray/kubespray:$KUBESPRAY_VERSION
  41. artifacts:
  42. paths:
  43. - cluster-dump/
  44. .testcases: &testcases
  45. <<: *job
  46. before_script:
  47. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  48. - ./tests/scripts/rebase.sh
  49. - ./tests/scripts/testcases_prepare.sh
  50. script:
  51. - ./tests/scripts/testcases_run.sh
  52. after_script:
  53. - chronic ./tests/scripts/testcases_cleanup.sh
  54. # For failfast, at least 1 job must be defined in .gitlab-ci.yml
  55. # Premoderated with manual actions
  56. ci-authorized:
  57. extends: .job
  58. stage: moderator
  59. script:
  60. - /bin/sh scripts/premoderator.sh
  61. except: ['triggers', 'master']
  62. # Disable ci moderator
  63. only: []
  64. include:
  65. - .gitlab-ci/lint.yml
  66. - .gitlab-ci/shellcheck.yml
  67. - .gitlab-ci/terraform.yml
  68. - .gitlab-ci/packet.yml
  69. - .gitlab-ci/vagrant.yml