Skip to content

Commit

Permalink
Merge pull request #469 from redhatci/certsuite-backwards-compt-v5.3.3
Browse files Browse the repository at this point in the history
certsuite | update oldest compatible version to v5.3.3
  • Loading branch information
ramperher authored Oct 17, 2024
2 parents f433c7e + 5e6003e commit a4c58c0
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 90 deletions.
6 changes: 3 additions & 3 deletions roles/k8s_best_practices_certsuite/tasks/pre-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
- kbpc_kubeconfig|length
fail_msg: "kubeconfig is required to run certsuite"

- name: Fail if certsuite version is lower than v5.2.3
- name: Fail if certsuite version is lower than v5.3.3
when:
- kbpc_version is version("v5.2.3", "<")
- kbpc_version is version("v5.3.3", "<")
- kbpc_version != "HEAD"
ansible.builtin.fail:
msg: "This role is not compatible with certsuite version < v5.2.3"
msg: "This role is not compatible with certsuite version < v5.3.3"

# Just do this in case preflight test suite is used. This happens if using
# preflight label. This check is included as a warning for users in case of not
Expand Down
6 changes: 3 additions & 3 deletions roles/k8s_best_practices_certsuite/tasks/teardown.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
# Always submit these files to DCI:
# - Configuration files - tnf_config.yml (or certsuite_config.yml)
# - Configuration files - certsuite_config.yml
# - Execution logs - certsuite-stdout.log and certsuite.log, if they exist
- name: Copy config and log files related to certsuite execution
ansible.builtin.copy:
Expand All @@ -27,11 +27,11 @@
block:
- name: Define probe daemonset namespace
ansible.builtin.set_fact:
kbpc_probe_ds_ns: "{{ (kbpc_version is version('v5.3.3', '>=') or kbpc_version == 'HEAD') | ternary('certsuite', 'cnf-suite') }}"
kbpc_probe_ds_ns: certsuite

- name: Ensure probe DaemonSet is absent
vars:
kbpc_probe_ds_name: "{{ (kbpc_version is version('v5.3.3', '>=') or kbpc_version == 'HEAD') | ternary('certsuite-debug', 'tnf-debug') }}"
kbpc_probe_ds_name: certsuite-debug
community.kubernetes.k8s:
api_version: v1
kind: DaemonSet
Expand Down
14 changes: 3 additions & 11 deletions roles/k8s_best_practices_certsuite/tasks/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@
mode: '0755'

- name: Template config file
vars:
kbpc_config_file_name: "{{ (kbpc_version is version('v5.3.3', '>=') or kbpc_version == 'HEAD') | ternary('certsuite_config', 'tnf_config') }}"
ansible.builtin.template:
src: "templates/{{ kbpc_config_file_name }}.yml.j2"
dest: "{{ kbpc_certsuite_dir }}/config_files/{{ kbpc_config_file_name }}.yml"
src: "templates/certsuite_config.yml.j2"
dest: "{{ kbpc_certsuite_dir }}/config_files/certsuite_config.yml"
mode: '0755'

# Just do this in case preflight test suite is used.
Expand All @@ -37,7 +35,6 @@
vars:
kbpc_partner_repo: "{{ (kbpc_registry | length) | ternary(kbpc_registry, 'quay.io') }}/{{ kbpc_repo_org_name }}"
kbpc_support_image: "{{ kbpc_support_image_name }}:{{ kbpc_support_image_version }}"
kbpc_config_file_name: "{{ (kbpc_version is version('v5.3.3', '>=') or kbpc_version == 'HEAD') | ternary('certsuite_config', 'tnf_config') }}"
kbpc_container_command: |
./certsuite run \
{% if kbpc_test_labels | length > 0 %}
Expand All @@ -49,14 +46,9 @@
{% endif %}
--output-dir=/usr/certsuite/results \
--offline-db=/usr/offline-db \
--config-file=/usr/certsuite/config/{{ kbpc_config_file_name }}.yml \
--config-file=/usr/certsuite/config/certsuite_config.yml \
--kubeconfig=/usr/certsuite/config/kubeconfig \
{% if kbpc_version is version('v5.3.3', '>=') or kbpc_version == 'HEAD' %}
--certsuite-probe-image={{ kbpc_partner_repo }}/{{ kbpc_support_image }} \
{% else %}
--tnf-image-repository={{ kbpc_partner_repo }} \
--tnf-debug-image={{ kbpc_support_image }} \
{% endif %}
--create-xml-junit-file={{ kbpc_enable_xml_creation }} \
--non-intrusive={{ kbpc_non_intrusive_only }} \
--log-level={{ kbpc_log_level }} \
Expand Down
73 changes: 0 additions & 73 deletions roles/k8s_best_practices_certsuite/templates/tnf_config.yml.j2

This file was deleted.

0 comments on commit a4c58c0

Please sign in to comment.