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.

71 lines
1.8 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. ---
  2. stages:
  3. - unit-tests
  4. - deploy-part1
  5. - moderator
  6. - deploy-part2
  7. - deploy-special
  8. variables:
  9. FAILFASTCI_NAMESPACE: 'kargo-ci'
  10. GITLAB_REPOSITORY: 'kargo-ci/kubernetes-sigs-kubespray'
  11. # DOCKER_HOST: tcp://localhost:2375
  12. ANSIBLE_FORCE_COLOR: "true"
  13. MAGIC: "ci check this"
  14. TEST_ID: "$CI_PIPELINE_ID-$CI_BUILD_ID"
  15. CI_TEST_VARS: "./tests/files/${CI_JOB_NAME}.yml"
  16. GS_ACCESS_KEY_ID: $GS_KEY
  17. GS_SECRET_ACCESS_KEY: $GS_SECRET
  18. CONTAINER_ENGINE: docker
  19. SSH_USER: root
  20. GCE_PREEMPTIBLE: "false"
  21. ANSIBLE_KEEP_REMOTE_FILES: "1"
  22. ANSIBLE_CONFIG: ./tests/ansible.cfg
  23. ANSIBLE_INVENTORY: ./inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
  24. IDEMPOT_CHECK: "false"
  25. RESET_CHECK: "false"
  26. UPGRADE_TEST: "false"
  27. LOG_LEVEL: "-vv"
  28. before_script:
  29. - ./tests/scripts/rebase.sh
  30. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  31. - python -m pip install -r tests/requirements.txt
  32. - mkdir -p /.ssh
  33. .job: &job
  34. tags:
  35. - packet
  36. variables:
  37. KUBESPRAY_VERSION: v2.12.0
  38. image: quay.io/kubespray/kubespray:$KUBESPRAY_VERSION
  39. .testcases: &testcases
  40. <<: *job
  41. services:
  42. - docker:dind
  43. before_script:
  44. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  45. - ./tests/scripts/rebase.sh
  46. - ./tests/scripts/testcases_prepare.sh
  47. script:
  48. - ./tests/scripts/testcases_run.sh
  49. after_script:
  50. - ./tests/scripts/testcases_cleanup.sh
  51. # For failfast, at least 1 job must be defined in .gitlab-ci.yml
  52. # Premoderated with manual actions
  53. ci-authorized:
  54. extends: .job
  55. stage: moderator
  56. script:
  57. - /bin/sh scripts/premoderator.sh
  58. except: ['triggers', 'master']
  59. # Disable ci moderator
  60. only: []
  61. include:
  62. - .gitlab-ci/lint.yml
  63. - .gitlab-ci/shellcheck.yml
  64. - .gitlab-ci/terraform.yml
  65. - .gitlab-ci/packet.yml