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.

115 lines
3.1 KiB

Upgrade ansible (#10190) * project: update all dependencies including ansible Upgrade to ansible 7.x and ansible-core 2.14.x. There seems to be issue with ansible 8/ansible-core 2.15 so we remain on those versions for now. It's quite a big bump already anyway. Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * tests: install aws galaxy collection Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * ansible-lint: disable various rules after ansible upgrade Temporarily disable a bunch of linting action following ansible upgrade. Those should be taken care of separately. Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: resolve deprecated-module ansible-lint error Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: resolve no-free-form ansible-lint error Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: resolve schema[meta] ansible-lint error Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: resolve schema[playbook] ansible-lint error Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: resolve schema[tasks] ansible-lint error Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: resolve risky-file-permissions ansible-lint error Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: resolve risky-shell-pipe ansible-lint error Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: remove deprecated warn args Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: use fqcn for non builtin tasks Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: resolve syntax-check[missing-file] for contrib playbook Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> * project: use arithmetic inside jinja to fix ansible 6 upgrade Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch> --------- Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@proton.ch>
1 year ago
  1. ---
  2. yamllint:
  3. extends: .job
  4. stage: unit-tests
  5. tags: [light]
  6. variables:
  7. LANG: C.UTF-8
  8. script:
  9. - yamllint --strict .
  10. except: ['triggers', 'master']
  11. vagrant-validate:
  12. extends: .job
  13. stage: unit-tests
  14. tags: [light]
  15. variables:
  16. VAGRANT_VERSION: 2.3.4
  17. script:
  18. - ./tests/scripts/vagrant-validate.sh
  19. except: ['triggers', 'master']
  20. ansible-lint:
  21. extends: .job
  22. stage: unit-tests
  23. tags: [light]
  24. script:
  25. - ansible-lint -v
  26. except: ['triggers', 'master']
  27. syntax-check:
  28. extends: .job
  29. stage: unit-tests
  30. tags: [light]
  31. variables:
  32. ANSIBLE_INVENTORY: inventory/local-tests.cfg
  33. ANSIBLE_REMOTE_USER: root
  34. ANSIBLE_BECOME: "true"
  35. ANSIBLE_BECOME_USER: root
  36. ANSIBLE_VERBOSITY: "3"
  37. script:
  38. - ansible-playbook --syntax-check cluster.yml
  39. - ansible-playbook --syntax-check playbooks/cluster.yml
  40. - ansible-playbook --syntax-check upgrade-cluster.yml
  41. - ansible-playbook --syntax-check playbooks/upgrade_cluster.yml
  42. - ansible-playbook --syntax-check reset.yml
  43. - ansible-playbook --syntax-check playbooks/reset.yml
  44. - ansible-playbook --syntax-check extra_playbooks/upgrade-only-k8s.yml
  45. except: ['triggers', 'master']
  46. collection-build-install-sanity-check:
  47. extends: .job
  48. stage: unit-tests
  49. tags: [light]
  50. variables:
  51. ANSIBLE_COLLECTIONS_PATH: "./ansible_collections"
  52. script:
  53. - ansible-galaxy collection build
  54. - ansible-galaxy collection install kubernetes_sigs-kubespray-$(grep "^version:" galaxy.yml | awk '{print $2}').tar.gz
  55. - ansible-galaxy collection list $(egrep -i '(name:\s+|namespace:\s+)' galaxy.yml | awk '{print $2}' | tr '\n' '.' | sed 's|\.$||g') | grep "^kubernetes_sigs.kubespray"
  56. - test -f ansible_collections/kubernetes_sigs/kubespray/playbooks/cluster.yml
  57. - test -f ansible_collections/kubernetes_sigs/kubespray/playbooks/reset.yml
  58. except: ['triggers', 'master']
  59. tox-inventory-builder:
  60. stage: unit-tests
  61. tags: [light]
  62. extends: .job
  63. before_script:
  64. - ./tests/scripts/rebase.sh
  65. - apt-get update && apt-get install -y python3-pip
  66. - update-alternatives --install /usr/bin/python python /usr/bin/python3 10
  67. - python -m pip uninstall -y ansible ansible-base ansible-core
  68. - python -m pip install -r tests/requirements.txt
  69. - ansible-galaxy install -r tests/requirements.yml
  70. script:
  71. - pip3 install tox
  72. - cd contrib/inventory_builder && tox
  73. except: ['triggers', 'master']
  74. markdownlint:
  75. stage: unit-tests
  76. tags: [light]
  77. image: node
  78. before_script:
  79. - npm install -g markdownlint-cli@0.22.0
  80. script:
  81. - markdownlint $(find . -name '*.md' | grep -vF './.git') --ignore docs/_sidebar.md --ignore contrib/dind/README.md
  82. check-readme-versions:
  83. stage: unit-tests
  84. tags: [light]
  85. image: python:3
  86. script:
  87. - tests/scripts/check_readme_versions.sh
  88. check-galaxy-version:
  89. stage: unit-tests
  90. tags: [light]
  91. image: python:3
  92. script:
  93. - tests/scripts/check_galaxy_version.sh
  94. check-typo:
  95. stage: unit-tests
  96. tags: [light]
  97. image: python:3
  98. script:
  99. - tests/scripts/check_typo.sh
  100. ci-matrix:
  101. stage: unit-tests
  102. tags: [light]
  103. image: python:3
  104. script:
  105. - tests/scripts/md-table/test.sh