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

  1. ---
  2. .molecule:
  3. tags: [ffci-vm-med]
  4. only: [/^pr-.*$/]
  5. except: ['triggers']
  6. image: quay.io/kubespray/vm-kubespray-ci:v13
  7. services: []
  8. stage: deploy-part1
  9. needs: []
  10. # - ci-not-authorized
  11. variables:
  12. VAGRANT_DEFAULT_PROVIDER: "libvirt"
  13. VAGRANT_HOME: "$CI_PROJECT_DIR/.vagrant.d"
  14. PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
  15. before_script:
  16. - mkdir -p $VAGRANT_HOME
  17. - groups
  18. - python3 -m venv citest
  19. - source citest/bin/activate
  20. - vagrant plugin expunge --reinstall --force --no-tty
  21. - vagrant plugin install vagrant-libvirt
  22. - pip install --no-compile --no-cache-dir pip -U
  23. - pip install --no-compile --no-cache-dir -r $CI_PROJECT_DIR/requirements.txt
  24. - pip install --no-compile --no-cache-dir -r $CI_PROJECT_DIR/tests/requirements.txt
  25. - ./tests/scripts/rebase.sh
  26. - ./tests/scripts/vagrant_clean.sh
  27. script:
  28. - ./tests/scripts/molecule_run.sh
  29. after_script:
  30. - ./tests/scripts/molecule_logs.sh
  31. artifacts:
  32. when: always
  33. paths:
  34. - molecule_logs/
  35. cache:
  36. key: $CI_JOB_NAME_SLUG
  37. paths:
  38. - .vagrant.d/boxes
  39. - .cache/pip
  40. policy: pull-push # TODO: change to "pull" when not on main
  41. # CI template for periodic CI jobs
  42. # Enabled when PERIODIC_CI_ENABLED var is set
  43. .molecule_periodic:
  44. only:
  45. variables:
  46. - $PERIODIC_CI_ENABLED
  47. allow_failure: true
  48. extends: .molecule
  49. molecule_full:
  50. extends: .molecule_periodic
  51. molecule_no_container_engines:
  52. extends: .molecule
  53. script:
  54. - ./tests/scripts/molecule_run.sh -e container-engine
  55. when: on_success
  56. molecule_docker:
  57. extends: .molecule
  58. script:
  59. - ./tests/scripts/molecule_run.sh -i container-engine/cri-dockerd
  60. when: on_success
  61. molecule_containerd:
  62. extends: .molecule
  63. script:
  64. - ./tests/scripts/molecule_run.sh -i container-engine/containerd
  65. when: on_success
  66. molecule_cri-o:
  67. extends: .molecule
  68. stage: deploy-part1
  69. script:
  70. - ./tests/scripts/molecule_run.sh -i container-engine/cri-o
  71. allow_failure: true
  72. when: on_success
  73. # # Stage 3 container engines don't get as much attention so allow them to fail
  74. # molecule_kata:
  75. # extends: .molecule
  76. # stage: deploy-extended
  77. # script:
  78. # - ./tests/scripts/molecule_run.sh -i container-engine/kata-containers
  79. # when: manual
  80. # # FIXME: this test is broken (perma-failing)
  81. molecule_gvisor:
  82. extends: .molecule
  83. stage: deploy-extended
  84. script:
  85. - ./tests/scripts/molecule_run.sh -i container-engine/gvisor
  86. when: manual
  87. # FIXME: this test is broken (perma-failing)
  88. molecule_youki:
  89. extends: .molecule
  90. stage: deploy-extended
  91. script:
  92. - ./tests/scripts/molecule_run.sh -i container-engine/youki
  93. when: manual
  94. # FIXME: this test is broken (perma-failing)