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.

102 lines
2.4 KiB

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. - test
  5. - deploy-part1
  6. - deploy-extended
  7. variables:
  8. KUBESPRAY_VERSION: v2.26.0
  9. FAILFASTCI_NAMESPACE: 'kargo-ci'
  10. GITLAB_REPOSITORY: 'kargo-ci/kubernetes-sigs-kubespray'
  11. ANSIBLE_FORCE_COLOR: "true"
  12. MAGIC: "ci check this"
  13. GS_ACCESS_KEY_ID: $GS_KEY
  14. GS_SECRET_ACCESS_KEY: $GS_SECRET
  15. CONTAINER_ENGINE: docker
  16. SSH_USER: root
  17. GCE_PREEMPTIBLE: "false"
  18. ANSIBLE_KEEP_REMOTE_FILES: "1"
  19. ANSIBLE_CONFIG: ./tests/ansible.cfg
  20. IDEMPOT_CHECK: "false"
  21. RESET_CHECK: "false"
  22. REMOVE_NODE_CHECK: "false"
  23. UPGRADE_TEST: "false"
  24. MITOGEN_ENABLE: "false"
  25. ANSIBLE_VERBOSITY: 2
  26. RECOVER_CONTROL_PLANE_TEST: "false"
  27. RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:]:kube_control_plane[1:]"
  28. TERRAFORM_VERSION: 1.3.7
  29. PIPELINE_IMAGE: "$CI_REGISTRY_IMAGE/pipeline:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}"
  30. before_script:
  31. - ./tests/scripts/rebase.sh
  32. - mkdir -p /.ssh
  33. .job: &job
  34. tags:
  35. - ffci
  36. image: $PIPELINE_IMAGE
  37. artifacts:
  38. when: always
  39. paths:
  40. - cluster-dump/
  41. needs:
  42. - pipeline-image
  43. .job-moderated:
  44. extends: .job
  45. needs:
  46. - pipeline-image
  47. - ci-not-authorized
  48. - check-galaxy-version # lint
  49. - pre-commit # lint
  50. - vagrant-validate # lint
  51. .testcases: &testcases
  52. extends: .job-moderated
  53. retry: 1
  54. interruptible: true
  55. before_script:
  56. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  57. - ./tests/scripts/rebase.sh
  58. - ./tests/scripts/testcases_prepare.sh
  59. script:
  60. - ./tests/scripts/testcases_run.sh
  61. after_script:
  62. - ./tests/scripts/testcases_cleanup.sh
  63. # For failfast, at least 1 job must be defined in .gitlab-ci.yml
  64. # Premoderated with manual actions
  65. ci-not-authorized:
  66. stage: build
  67. before_script: []
  68. after_script: []
  69. rules:
  70. # LGTM or ok-to-test labels
  71. - if: $PR_LABELS =~ /.*,(lgtm|approved|ok-to-test).*|^(lgtm|approved|ok-to-test).*/i
  72. variables:
  73. CI_OK_TO_TEST: '0'
  74. when: always
  75. - if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "trigger"
  76. variables:
  77. CI_OK_TO_TEST: '0'
  78. - if: $CI_COMMIT_BRANCH == "master"
  79. variables:
  80. CI_OK_TO_TEST: '0'
  81. - when: always
  82. variables:
  83. CI_OK_TO_TEST: '1'
  84. script:
  85. - exit $CI_OK_TO_TEST
  86. tags:
  87. - ffci
  88. needs: []
  89. include:
  90. - .gitlab-ci/build.yml
  91. - .gitlab-ci/lint.yml
  92. - .gitlab-ci/terraform.yml
  93. - .gitlab-ci/packet.yml
  94. - .gitlab-ci/vagrant.yml
  95. - .gitlab-ci/molecule.yml