2019-04-17 23:32:03 +08:00
|
|
|
---
|
2019-04-16 20:35:05 +08:00
|
|
|
yamllint:
|
|
|
|
extends: .job
|
|
|
|
stage: unit-tests
|
2020-03-14 01:29:22 +08:00
|
|
|
tags: [light]
|
2019-12-11 16:10:05 +08:00
|
|
|
variables:
|
|
|
|
LANG: C.UTF-8
|
2019-04-16 20:35:05 +08:00
|
|
|
script:
|
2019-04-20 21:15:41 +08:00
|
|
|
- yamllint --strict .
|
2019-04-16 20:35:05 +08:00
|
|
|
except: ['triggers', 'master']
|
|
|
|
|
2019-05-03 02:24:21 +08:00
|
|
|
vagrant-validate:
|
|
|
|
extends: .job
|
|
|
|
stage: unit-tests
|
2020-03-14 01:29:22 +08:00
|
|
|
tags: [light]
|
2019-12-17 23:11:59 +08:00
|
|
|
variables:
|
2023-01-27 13:28:25 +08:00
|
|
|
VAGRANT_VERSION: 2.3.4
|
2019-05-03 02:24:21 +08:00
|
|
|
script:
|
2019-12-17 23:11:59 +08:00
|
|
|
- ./tests/scripts/vagrant-validate.sh
|
2019-05-03 02:24:21 +08:00
|
|
|
except: ['triggers', 'master']
|
|
|
|
|
2019-04-16 20:35:05 +08:00
|
|
|
ansible-lint:
|
|
|
|
extends: .job
|
|
|
|
stage: unit-tests
|
2020-03-14 01:29:22 +08:00
|
|
|
tags: [light]
|
2022-01-11 16:45:16 +08:00
|
|
|
script:
|
|
|
|
- ansible-lint -v
|
2019-04-16 20:35:05 +08:00
|
|
|
except: ['triggers', 'master']
|
|
|
|
|
2023-12-06 10:05:24 +08:00
|
|
|
jinja-syntax-check:
|
|
|
|
extends: .job
|
|
|
|
stage: unit-tests
|
|
|
|
tags: [light]
|
|
|
|
script:
|
|
|
|
- "find -name '*.j2' -exec tests/scripts/check-templates.py {} +"
|
|
|
|
except: ['triggers', 'master']
|
|
|
|
|
2019-04-16 20:35:05 +08:00
|
|
|
syntax-check:
|
|
|
|
extends: .job
|
|
|
|
stage: unit-tests
|
2020-03-14 01:29:22 +08:00
|
|
|
tags: [light]
|
2019-04-20 21:37:40 +08:00
|
|
|
variables:
|
|
|
|
ANSIBLE_INVENTORY: inventory/local-tests.cfg
|
|
|
|
ANSIBLE_REMOTE_USER: root
|
|
|
|
ANSIBLE_BECOME: "true"
|
|
|
|
ANSIBLE_BECOME_USER: root
|
|
|
|
ANSIBLE_VERBOSITY: "3"
|
2019-04-16 20:35:05 +08:00
|
|
|
script:
|
2019-04-20 21:37:40 +08:00
|
|
|
- ansible-playbook --syntax-check cluster.yml
|
2023-03-27 17:25:55 +08:00
|
|
|
- ansible-playbook --syntax-check playbooks/cluster.yml
|
2019-04-20 21:37:40 +08:00
|
|
|
- ansible-playbook --syntax-check upgrade-cluster.yml
|
2023-04-24 22:09:02 +08:00
|
|
|
- ansible-playbook --syntax-check playbooks/upgrade_cluster.yml
|
2019-04-20 21:37:40 +08:00
|
|
|
- ansible-playbook --syntax-check reset.yml
|
2023-03-27 17:25:55 +08:00
|
|
|
- ansible-playbook --syntax-check playbooks/reset.yml
|
2019-04-20 21:37:40 +08:00
|
|
|
- ansible-playbook --syntax-check extra_playbooks/upgrade-only-k8s.yml
|
2019-04-16 20:35:05 +08:00
|
|
|
except: ['triggers', 'master']
|
|
|
|
|
2023-03-27 17:25:55 +08:00
|
|
|
collection-build-install-sanity-check:
|
|
|
|
extends: .job
|
|
|
|
stage: unit-tests
|
|
|
|
tags: [light]
|
|
|
|
variables:
|
|
|
|
ANSIBLE_COLLECTIONS_PATH: "./ansible_collections"
|
|
|
|
script:
|
|
|
|
- ansible-galaxy collection build
|
|
|
|
- ansible-galaxy collection install kubernetes_sigs-kubespray-$(grep "^version:" galaxy.yml | awk '{print $2}').tar.gz
|
|
|
|
- ansible-galaxy collection list $(egrep -i '(name:\s+|namespace:\s+)' galaxy.yml | awk '{print $2}' | tr '\n' '.' | sed 's|\.$||g') | grep "^kubernetes_sigs.kubespray"
|
|
|
|
- test -f ansible_collections/kubernetes_sigs/kubespray/playbooks/cluster.yml
|
|
|
|
- test -f ansible_collections/kubernetes_sigs/kubespray/playbooks/reset.yml
|
|
|
|
except: ['triggers', 'master']
|
|
|
|
|
2019-04-16 20:35:05 +08:00
|
|
|
tox-inventory-builder:
|
|
|
|
stage: unit-tests
|
2020-03-14 01:29:22 +08:00
|
|
|
tags: [light]
|
2019-04-16 20:35:05 +08:00
|
|
|
extends: .job
|
2019-12-05 17:48:32 +08:00
|
|
|
before_script:
|
|
|
|
- ./tests/scripts/rebase.sh
|
2019-04-16 20:35:05 +08:00
|
|
|
script:
|
2019-12-05 17:48:32 +08:00
|
|
|
- pip3 install tox
|
2019-04-16 20:35:05 +08:00
|
|
|
- cd contrib/inventory_builder && tox
|
|
|
|
except: ['triggers', 'master']
|
2019-12-04 23:22:57 +08:00
|
|
|
|
|
|
|
markdownlint:
|
|
|
|
stage: unit-tests
|
2020-03-14 01:29:22 +08:00
|
|
|
tags: [light]
|
2019-12-04 23:22:57 +08:00
|
|
|
image: node
|
|
|
|
before_script:
|
2020-12-22 20:44:26 +08:00
|
|
|
- npm install -g markdownlint-cli@0.22.0
|
2019-12-04 23:22:57 +08:00
|
|
|
script:
|
2021-01-08 02:16:53 +08:00
|
|
|
- markdownlint $(find . -name '*.md' | grep -vF './.git') --ignore docs/_sidebar.md --ignore contrib/dind/README.md
|
2020-04-24 00:51:11 +08:00
|
|
|
|
2022-06-29 15:14:05 +08:00
|
|
|
check-readme-versions:
|
|
|
|
stage: unit-tests
|
|
|
|
tags: [light]
|
|
|
|
image: python:3
|
|
|
|
script:
|
|
|
|
- tests/scripts/check_readme_versions.sh
|
|
|
|
|
2023-03-27 17:25:55 +08:00
|
|
|
check-galaxy-version:
|
|
|
|
stage: unit-tests
|
|
|
|
tags: [light]
|
|
|
|
image: python:3
|
|
|
|
script:
|
|
|
|
- tests/scripts/check_galaxy_version.sh
|
|
|
|
|
2022-10-07 17:21:53 +08:00
|
|
|
check-typo:
|
|
|
|
stage: unit-tests
|
|
|
|
tags: [light]
|
|
|
|
image: python:3
|
|
|
|
script:
|
|
|
|
- tests/scripts/check_typo.sh
|
|
|
|
|
2020-04-24 00:51:11 +08:00
|
|
|
ci-matrix:
|
|
|
|
stage: unit-tests
|
|
|
|
tags: [light]
|
|
|
|
image: python:3
|
|
|
|
script:
|
|
|
|
- tests/scripts/md-table/test.sh
|