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.

103 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.27.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. variables:
  43. ANSIBLE_STDOUT_CALLBACK: "debug"
  44. .job-moderated:
  45. extends: .job
  46. needs:
  47. - pipeline-image
  48. - ci-not-authorized
  49. - check-galaxy-version # lint
  50. - pre-commit # lint
  51. - vagrant-validate # lint
  52. .testcases: &testcases
  53. extends: .job-moderated
  54. retry: 1
  55. interruptible: true
  56. before_script:
  57. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  58. - ./tests/scripts/rebase.sh
  59. - ./tests/scripts/testcases_prepare.sh
  60. script:
  61. - ./tests/scripts/testcases_run.sh
  62. after_script:
  63. - ./tests/scripts/testcases_cleanup.sh
  64. # For failfast, at least 1 job must be defined in .gitlab-ci.yml
  65. # Premoderated with manual actions
  66. ci-not-authorized:
  67. stage: build
  68. before_script: []
  69. after_script: []
  70. rules:
  71. # LGTM or ok-to-test labels
  72. - if: $PR_LABELS =~ /.*,(lgtm|approved|ok-to-test).*|^(lgtm|approved|ok-to-test).*/i
  73. variables:
  74. CI_OK_TO_TEST: '0'
  75. when: always
  76. - if: $CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "trigger"
  77. variables:
  78. CI_OK_TO_TEST: '0'
  79. - if: $CI_COMMIT_BRANCH == "master"
  80. variables:
  81. CI_OK_TO_TEST: '0'
  82. - when: always
  83. variables:
  84. CI_OK_TO_TEST: '1'
  85. script:
  86. - exit $CI_OK_TO_TEST
  87. tags:
  88. - ffci
  89. needs: []
  90. include:
  91. - .gitlab-ci/build.yml
  92. - .gitlab-ci/lint.yml
  93. - .gitlab-ci/terraform.yml
  94. - .gitlab-ci/packet.yml
  95. - .gitlab-ci/vagrant.yml
  96. - .gitlab-ci/molecule.yml