Skip to content

Commit 42369d4

Browse files
committed
[ci] Add playbook to run test-operator role and expand CloudKitty workflow
Add playbook for running test-operator locally and enhance CloudKitty test configuration to run multiple test suites. The workflow now includes tests from separate branches (ck_tests and updates_to_alexy_chargeback_fvt) to verify CloudKitty functionality.
1 parent 300d070 commit 42369d4

File tree

2 files changed

+29
-19
lines changed

2 files changed

+29
-19
lines changed

ci/test-running-test-operator.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
- hosts: localhost
3+
gather_facts: true
4+
vars:
5+
cifmw_openshift_kubeconfig: "{{ ansible_env.HOME }}/.kube/config"
6+
cifmw_path: "{{ ansible_env.PATH }}"
7+
vars_files:
8+
- vars-cloudkitty-fvt.yml
9+
roles:
10+
# To run locally, create a volume with the expected version of the teste in it, and configure the CR to clone from the local repo.
11+
- cifmw.general.test_operator
12+
# Need to show the logs somehow.

ci/vars-cloudkitty-fvt.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
11
---
22
cifmw_test_operator_stages:
3-
#- name: tempest
4-
# type: tempest
53
- name: cloudkitty-ansible
64
type: ansibletest
7-
#test_vars:
8-
# This is not suitable for doing anything in the pod.
9-
# This would be a suitable location to prepare a new volume to copy the local changes into.
10-
# pre_test_stage_hooks:
11-
# - name: Copy ansible.cfg into tempest dir
12-
# source: ci/copy_ansible_cfg_into_pod.yaml
13-
# type: playbook
14-
155

166
cifmw_test_operator_ansibletest_config: |
177
# This is a copy of ci/ansible-tests-cloudkitty
@@ -31,9 +21,6 @@ cifmw_test_operator_ansibletest_config: |
3121
storageClass: crc-csi-hostpath-provisioner
3222
computeSSHKeySecretName: dataplane-ansible-ssh-private-key-secret
3323
workloadSSHKeySecretName: dataplane-ansible-ssh-private-key-secret
34-
# hack to get the ansiblecfg file from fvt/ci being used.. alternative is to copy it to ANSIBLE_DIR/ansible.cfg or ~/.ansible.cfg or /etc/ansible/ansible.cfg
35-
#ansibleExtraVars: |
36-
# ANSIBLE_CONFIG=$ANSIBLE_DIR/feature-verification-tests/ci/ansible.cfg
3724
ansibleVarFiles: |
3825
cifmw_openshift_kubeconfig: ~/.kube.config
3926
cifmw_path: "{{ ansible_env.PATH }}:/var/lib/ansible/bin"
@@ -48,6 +35,7 @@ cifmw_test_operator_ansibletest_config: |
4835
# mount the logs volume onto the FVT output dir.
4936
# alternatively, add a post-step to copy the files from the output dir
5037
# into the dir that the volume is mounted to. i.e. /var/lib/AnsibleTests/external_files
38+
# OR configure the output dir in fvt/ansible.cfg, which is used by the ansibletest pods
5139
- extraVol:
5240
- mounts:
5341
- name: test-operator-logs
@@ -65,16 +53,26 @@ cifmw_test_operator_ansibletest_config: |
6553
[local]
6654
localhost
6755
workflow:
68-
#- stepName: copy-ansible-cfg
69-
# ansiblePlaybookPath: ci/copy_ansible_cfg_into_pod.yaml
70-
- stepName: cloudkitty
56+
- stepName: cloudkitty-elfie
7157
ansiblePlaybookPath: ci/run_cloudkitty_tests.yml
58+
ansibleGitRepo: http://github.com/elfiesmelfie/feature-verification-tests
59+
ansibleGitBranch: ck_tests
60+
ansibleCollections: 'git+https://github.com/elfiesmelfie/feature-verification-tests.git,ck_tests'
61+
- stepName: cloudkitty-alexy
62+
ansiblePlaybookPath: ci/chargeback_tests.yml
63+
ansibleGitRepo: http://github.com/elfiesmelfie/feature-verification-tests
64+
#ansibleGitRepo: http://github.com/infrawatch/feature-verification-tests
65+
#ansibleGitBranch: alexy_chargeback_fvt
66+
ansibleGitBranch: updates_to_alexy_chargeback_fvt
67+
ansibleCollections: 'git+https://github.com/infrawatch/feature-verification-tests.git,alexy_chargeback_fvt'
7268
debug: true
73-
#- stepName: verify-metrics
74-
# ansiblePlaybookPath: ci/run_verify_metrics_osp18.yml
75-
# debug: true
69+
# TODO: Update the report_results to also check for errors, since failures and errors are reported separately
70+
# - stepName: verify-metrics
71+
# ansiblePlaybookPath: ci/run_verify_metrics_osp18.yml
72+
# debug: true
7673
# TODO: Check the output of this pod and try fix the failing task.
7774
# OR: add pre-run tasks to update the output dir for the custom_junit plugin
7875
- stepName: report-results
7976
ansiblePlaybookPath: ci/report_result.yml
77+
ansibleGitBranch: update_report_results
8078
debug: true

0 commit comments

Comments
 (0)