Skip to content

Commit 7487ff5

Browse files
committed
Add hooks before running kuttl from operator target
Add a hook to run before calling the kuttl tests in the job variant that runs them from the operator target (wihtout using install_yamls).
1 parent f4603a7 commit 7487ff5

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

ci/playbooks/kuttl/run-kuttl-from-operator-targets.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
- name: Run pre_kuttl_from_operator hooks
2+
vars:
3+
step: pre_kuttl_from_operator
4+
ansible.builtin.import_playbook: ./hooks.yml
5+
16
- hosts: controller
27
vars:
38
project_name: "github.com/openstack-k8s-operators/{{ operator_name }}"

docs/source/usage/01_usage.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ If you want to list multiple hooks, you have to use the following parameter name
123123
- `post_admin_setup`: before admin setup
124124
- `pre_tests`: before running tests
125125
- `post_tests`: after running tests
126+
- `pre_kuttl_from_operator`: before running kuttl test when calling them from
127+
the operator's make target
126128

127129
Since we're already providing hooks as list, you may want to just add one or two hooks
128130
using your own environment file. Parameter structure is simple: `PREFIX_HOOKNAME: {hook struct}`

0 commit comments

Comments
 (0)