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.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. 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