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.

88 lines
2.4 KiB

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
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
8 years ago
8 years ago
8 years ago
8 years ago
  1. ---
  2. stages:
  3. - build
  4. - unit-tests
  5. - deploy-part1
  6. - moderator
  7. - deploy-part2
  8. - deploy-part3
  9. - deploy-special
  10. variables:
  11. KUBESPRAY_VERSION: v2.22.1
  12. FAILFASTCI_NAMESPACE: 'kargo-ci'
  13. GITLAB_REPOSITORY: 'kargo-ci/kubernetes-sigs-kubespray'
  14. ANSIBLE_FORCE_COLOR: "true"
  15. MAGIC: "ci check this"
  16. TEST_ID: "$CI_PIPELINE_ID-$CI_JOB_ID"
  17. CI_TEST_VARS: "./tests/files/${CI_JOB_NAME}.yml"
  18. CI_TEST_REGISTRY_MIRROR: "./tests/common/_docker_hub_registry_mirror.yml"
  19. CI_TEST_SETTING: "./tests/common/_kubespray_test_settings.yml"
  20. GS_ACCESS_KEY_ID: $GS_KEY
  21. GS_SECRET_ACCESS_KEY: $GS_SECRET
  22. CONTAINER_ENGINE: docker
  23. SSH_USER: root
  24. GCE_PREEMPTIBLE: "false"
  25. ANSIBLE_KEEP_REMOTE_FILES: "1"
  26. ANSIBLE_CONFIG: ./tests/ansible.cfg
  27. ANSIBLE_INVENTORY: ./inventory/sample/${CI_JOB_NAME}-${BUILD_NUMBER}.ini
  28. IDEMPOT_CHECK: "false"
  29. RESET_CHECK: "false"
  30. REMOVE_NODE_CHECK: "false"
  31. UPGRADE_TEST: "false"
  32. MITOGEN_ENABLE: "false"
  33. ANSIBLE_LOG_LEVEL: "-vv"
  34. RECOVER_CONTROL_PLANE_TEST: "false"
  35. RECOVER_CONTROL_PLANE_TEST_GROUPS: "etcd[2:],kube_control_plane[1:]"
  36. TERRAFORM_VERSION: 1.3.7
  37. PIPELINE_IMAGE: "$CI_REGISTRY_IMAGE/pipeline:${CI_PIPELINE_ID}-${CI_COMMIT_SHORT_SHA}"
  38. before_script:
  39. - ./tests/scripts/rebase.sh
  40. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  41. - python -m pip uninstall -y ansible ansible-base ansible-core
  42. - python -m pip install -r tests/requirements.txt
  43. - ansible-galaxy install -r tests/requirements.yml
  44. - mkdir -p /.ssh
  45. .job: &job
  46. tags:
  47. - packet
  48. image: $PIPELINE_IMAGE
  49. artifacts:
  50. when: always
  51. paths:
  52. - cluster-dump/
  53. .testcases: &testcases
  54. <<: *job
  55. retry: 1
  56. interruptible: true
  57. before_script:
  58. - update-alternatives --install /usr/bin/python python /usr/bin/python3 1
  59. - ./tests/scripts/rebase.sh
  60. - ./tests/scripts/testcases_prepare.sh
  61. script:
  62. - ./tests/scripts/testcases_run.sh
  63. after_script:
  64. - chronic ./tests/scripts/testcases_cleanup.sh
  65. # For failfast, at least 1 job must be defined in .gitlab-ci.yml
  66. # Premoderated with manual actions
  67. ci-authorized:
  68. extends: .job
  69. stage: moderator
  70. script:
  71. - /bin/sh scripts/premoderator.sh
  72. except: ['triggers', 'master']
  73. # Disable ci moderator
  74. only: []
  75. include:
  76. - .gitlab-ci/build.yml
  77. - .gitlab-ci/lint.yml
  78. - .gitlab-ci/shellcheck.yml
  79. - .gitlab-ci/terraform.yml
  80. - .gitlab-ci/packet.yml
  81. - .gitlab-ci/vagrant.yml
  82. - .gitlab-ci/molecule.yml