-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scs-0210-v2 and scs-0214-v1 zuul checks
Signed-off-by: Matej Feder <matej.feder@dnation.cloud>
- Loading branch information
Showing
5 changed files
with
149 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
- name: Download, install, configure, and execute k8s-node-distribution-check check | ||
vars: | ||
check_dir: "{{ ansible_user_dir }}/k8s-node-distribution-check" | ||
python_venv_dir: "{{ ansible_user_dir }}/k8s-node-distribution-check/venv" | ||
block: | ||
- name: Check if `kubeconfig_path` variable is defined | ||
ansible.builtin.fail: | ||
msg: "kubeconfig_path is not defined or empty" | ||
when: kubeconfig_path is not defined or kubeconfig_path == '' | ||
- name: Ensure check directory | ||
ansible.builtin.file: | ||
path: "{{ check_dir }}" | ||
state: directory | ||
mode: 0755 | ||
- name: Download check assets | ||
ansible.builtin.get_url: | ||
url: "https://raw.githubusercontent.com/SovereignCloudStack/standards/main/Tests/{{ item }}" | ||
dest: "{{ check_dir }}/{{ item | basename }}" | ||
loop: | ||
- requirements.txt | ||
- kaas/k8s-node-distribution/k8s-node-distribution-check.py | ||
- kaas/k8s-node-distribution/config.yaml.template | ||
- name: Create config file from the template | ||
Check failure on line 24 in playbooks/tasks/scs_node_distribution.yaml
|
||
command: "mv {{ check_dir }}/config.yaml.template {{ check_dir }}/config.yaml" | ||
- name: Install check requirements | ||
ansible.builtin.pip: | ||
requirements: "{{ check_dir }}/requirements.txt" | ||
virtualenv: "{{ python_venv_dir }}" | ||
- name: Execute k8s-node-distribution check | ||
ansible.builtin.shell: | ||
cmd: | ||
". {{ python_venv_dir }}/bin/activate && | ||
python3 {{ check_dir }}/k8s-node-distribution-check.py -c {{ check_dir }}/config.yaml -k {{ kubeconfig_path }}" | ||
changed_when: false | ||
register: k8s_check_results | ||
- name: Parse check results | ||
ansible.builtin.set_fact: | ||
check_results: "{{ k8s_check_results.stdout }}" | ||
when: k8s_check_results is defined | ||
- name: Print check_results to the STDOUT | ||
ansible.builtin.debug: | ||
msg: "{{ check_results.stdout }}" | ||
when: k8s_check_results is defined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
- name: Download, install, configure, and execute k8s-version-recency check | ||
vars: | ||
check_dir: "{{ ansible_user_dir }}/k8s_version_recency" | ||
python_venv_dir: "{{ ansible_user_dir }}/k8s_version_recency/venv" | ||
block: | ||
- name: Check if `kubeconfig_path` variable is defined | ||
ansible.builtin.fail: | ||
msg: "kubeconfig_path is not defined or empty" | ||
when: kubeconfig_path is not defined or kubeconfig_path == '' | ||
- name: Ensure check directory | ||
ansible.builtin.file: | ||
path: "{{ check_dir }}" | ||
state: directory | ||
mode: 0755 | ||
- name: Download check assets | ||
ansible.builtin.get_url: | ||
url: "https://raw.githubusercontent.com/SovereignCloudStack/standards/main/Tests/{{ item }}" | ||
dest: "{{ check_dir }}/{{ item | basename }}" | ||
loop: | ||
- requirements.txt | ||
- kaas/k8s-version-recency/k8s-version-recency-check.py | ||
- kaas/k8s-version-recency/config.yaml.template | ||
- name: Create config file from the template | ||
Check failure on line 24 in playbooks/tasks/scs_version_policy.yaml
|
||
command: "mv {{ check_dir }}/config.yaml.template {{ check_dir }}/config.yaml" | ||
- name: Install check requirements | ||
ansible.builtin.pip: | ||
requirements: "{{ check_dir }}/requirements.txt" | ||
virtualenv: "{{ python_venv_dir }}" | ||
- name: Execute k8s-version-recency check | ||
ansible.builtin.shell: | ||
cmd: | ||
". {{ python_venv_dir }}/bin/activate && | ||
python3 {{ check_dir }}/k8s-version-recency-check.py -c {{ check_dir }}/config.yaml -k {{ kubeconfig_path }}" | ||
changed_when: false | ||
register: k8s_check_results | ||
- name: Parse check results | ||
ansible.builtin.set_fact: | ||
check_results: "{{ k8s_check_results.stdout }}" | ||
when: k8s_check_results is defined | ||
- name: Print check_results to the STDOUT | ||
ansible.builtin.debug: | ||
msg: "{{ check_results.stdout }}" | ||
when: k8s_check_results is defined |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
- name: Execute sonobouy check mode {{ sonobouy.mode }} | ||
ansible.builtin.command: "make check-{{ sonobouy.mode }}" | ||
register: sonobouy_results | ||
args: | ||
chdir: "{{ project_tf_dir }}" | ||
changed_when: true | ||
- name: Parse sonobouy results | ||
ansible.builtin.set_fact: | ||
check_results: "{{ sonobouy_results.stdout | regex_search('=== Collecting results ===[\\S\\s]*') }}" | ||
when: sonobouy_results is defined |