-
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
4 changed files
with
100 additions
and
19 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,40 @@ | ||
--- | ||
- name: Download, install, configure, and execute SCS KaaS compliance check | ||
vars: | ||
check_dir: "{{ ansible_user_dir }}/scs-compliance" | ||
python_venv_dir: "{{ ansible_user_dir }}/scs-compliance/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: Get SCS KaaS compliance check assets | ||
ansible.builtin.git: | ||
repo: https://github.com/SovereignCloudStack/standards.git | ||
dest: "{{ check_dir }}" | ||
single_branch: yes | ||
Check warning on line 20 in playbooks/tasks/scs_compliance.yaml
|
||
version: main | ||
- name: Install check requirements | ||
ansible.builtin.pip: | ||
requirements: "{{ check_dir }}/Tests/requirements.txt" | ||
virtualenv: "{{ python_venv_dir }}" | ||
- name: Execute k8s-node-distribution check | ||
ansible.builtin.shell: | ||
cmd: | ||
". {{ python_venv_dir }}/bin/activate && | ||
python3 {{ check_dir }}/Tests/scs-compliance-check.py Tests/scs-compatible-kaas.yaml kaas -s KaaS_V1 -a kubeconfig={{ kubeconfig_path }}" | ||
changed_when: false | ||
register: scs_compliance_results | ||
- name: Parse SCS KaaS compliance results | ||
ansible.builtin.set_fact: | ||
scs_compliance_results_parsed: "{{ scs_compliance_results.stdout }}" | ||
when: scs_compliance_results is defined | ||
- name: Print check_results to the STDOUT | ||
ansible.builtin.debug: | ||
msg: "{{ scs_compliance_results_parsed.stdout }}" | ||
when: scs_compliance_results_parsed 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: | ||
sonobouy_results_parsed: "{{ sonobouy_results.stdout | regex_search('=== Collecting results ===[\\S\\s]*') }}" | ||
when: sonobouy_results is defined |