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.

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