From cecc1eb87cf67cdc305997b62ab7ae8066d3613a Mon Sep 17 00:00:00 2001 From: malingatembo Date: Tue, 25 Aug 2026 16:40:13 +0200 Subject: [PATCH 1/7] Add CI job for lightspeed operator deployment Creates lightspeed-operator-deployment-crc job that: - Deploys operator using ci-framework playbook - Uses example LLM endpoint (no real credentials) - Expected to fail on auth verification - Inherits from cifmw-base-crc for CRC cluster provisioning JIRA: OSPRH-33344 --- .zuul.yaml | 2 +- zuul.d/jobs.yaml | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 zuul.d/jobs.yaml diff --git a/.zuul.yaml b/.zuul.yaml index 981ea16..06b5c4d 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -4,5 +4,5 @@ default-branch: main github-check: jobs: - - noop + - lightspeed-operator-deployment-crc diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml new file mode 100644 index 0000000..59ecd01 --- /dev/null +++ b/zuul.d/jobs.yaml @@ -0,0 +1,17 @@ +--- +# CI job for deploying OpenStack Lightspeed operator +- job: + name: lightspeed-operator-deployment-crc + parent: cifmw-base-crc + attempts: 1 + required-projects: + - openstack-k8s-operators/ci-framework + - openstack-k8s-operators/lightspeed-operator + vars: + cifmw_run_hook_pre_test: install-openstack-lightspeed.yml + + cifmw_openstack_lightspeed_llm_endpoint: "https://api.example.com/v1/chat/completions" + cifmw_openstack_lightspeed_model_name: "example-model" + + #TODO: wire up zuul for secret and api token + # cifmw_openstack_lightspeed_api_token: "{{ modelscorp_api_token }}" From 5b1bdf2746f3e464420a9914a6f5b0f950055a7d Mon Sep 17 00:00:00 2001 From: malingatembo Date: Tue, 25 Aug 2026 18:23:45 +0200 Subject: [PATCH 2/7] Add CI job for lightspeed operator deployment creates lightspeed-operator-deployment-crc job that: - deploys operator using ci-framework playbook - expected to fail on auth verification ( uses fake creds for LLM endpoints ) - matches file pattern in openstack-operator (in zuul.d/) Jira: OSPRH-33344 --- .zuul.yaml => zuul.d/projects.yaml | 1 - 1 file changed, 1 deletion(-) rename .zuul.yaml => zuul.d/projects.yaml (99%) diff --git a/.zuul.yaml b/zuul.d/projects.yaml similarity index 99% rename from .zuul.yaml rename to zuul.d/projects.yaml index 06b5c4d..7dacd03 100644 --- a/.zuul.yaml +++ b/zuul.d/projects.yaml @@ -5,4 +5,3 @@ github-check: jobs: - lightspeed-operator-deployment-crc - From 901bac640664357e9db412c3463a85bd35342b3e Mon Sep 17 00:00:00 2001 From: malingatembo Date: Tue, 25 Aug 2026 19:20:06 +0200 Subject: [PATCH 3/7] Add run playbook for lightspeed-operator deployment job Created ci/playbooks/lightspeed/run.yml to execute deployment hook Added run: directive to lightspeed-operator-deployment-crc job Fixes Zuul CONFIG_ERROR: "job does not specify a run playbook" Related: OSPRH-33344 --- ci/playbooks/lightspeed/run.yml | 17 +++++++++++++++++ zuul.d/jobs.yaml | 1 + 2 files changed, 18 insertions(+) create mode 100644 ci/playbooks/lightspeed/run.yml diff --git a/ci/playbooks/lightspeed/run.yml b/ci/playbooks/lightspeed/run.yml new file mode 100644 index 0000000..376d352 --- /dev/null +++ b/ci/playbooks/lightspeed/run.yml @@ -0,0 +1,17 @@ +--- +- name: "Deploy OpenStack Lightspeed Operator" + hosts: "{{ cifmw_zuul_target_host | default('all') }}" + gather_facts: true + tasks: + - name: Filter out host if needed + when: + - cifmw_zuul_target_host is defined + - cifmw_zuul_target_host != 'all' + - inventory_hostname != cifmw_zuul_target_host + ansible.builtin.meta: end_host + + - name: Run Lightspeed deployment hook + when: + - cifmw_run_hook_pre_test is defined + ansible.builtin.include_tasks: + file: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/lightspeed-operator/{{ cifmw_run_hook_pre_test }}" diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 59ecd01..ace480c 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -4,6 +4,7 @@ name: lightspeed-operator-deployment-crc parent: cifmw-base-crc attempts: 1 + run: ci/playbooks/lightspeed/run.yml required-projects: - openstack-k8s-operators/ci-framework - openstack-k8s-operators/lightspeed-operator From 119f40cb459ebb343440cdf17e0187be1c9e4c44 Mon Sep 17 00:00:00 2001 From: malingatembo Date: Wed, 26 Aug 2026 12:49:28 +0200 Subject: [PATCH 4/7] Fix hook execution format for ci-framework integration The previous implementation had incorrect hook variable format and directly included tasks instead of using ci-framework's run_hook role. Changes: - Fixed hook format: Changed from string to proper list structure with name, type, and source fields as expected by run_hook role - Updated run playbook to use run_hook role instead of include_tasks - Added roles directive to make ci-framework roles available - Hook source points to install-openstack-lightspeed.yml in ci-framework/hooks/playbooks/ directory The run_hook role automatically resolves hook sources from ci-framework/hooks/playbooks/ and handles execution, logging, and artifact collection. Fixes: Job failure after 29m execution Related: OSPRH-33344 --- ci/playbooks/lightspeed/run.yml | 10 +++++----- zuul.d/jobs.yaml | 9 +++++++-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/ci/playbooks/lightspeed/run.yml b/ci/playbooks/lightspeed/run.yml index 376d352..86d6ad0 100644 --- a/ci/playbooks/lightspeed/run.yml +++ b/ci/playbooks/lightspeed/run.yml @@ -10,8 +10,8 @@ - inventory_hostname != cifmw_zuul_target_host ansible.builtin.meta: end_host - - name: Run Lightspeed deployment hook - when: - - cifmw_run_hook_pre_test is defined - ansible.builtin.include_tasks: - file: "{{ ansible_user_dir }}/src/github.com/openstack-k8s-operators/lightspeed-operator/{{ cifmw_run_hook_pre_test }}" + - name: Run pre_test hooks + vars: + step: pre_test + ansible.builtin.import_role: + name: run_hook diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index ace480c..d405626 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -7,9 +7,14 @@ run: ci/playbooks/lightspeed/run.yml required-projects: - openstack-k8s-operators/ci-framework - - openstack-k8s-operators/lightspeed-operator + - openstack-k8s-operators/lightspeed-operator + roles: + - zuul: github.com/openstack-k8s-operators/ci-framework vars: - cifmw_run_hook_pre_test: install-openstack-lightspeed.yml + pre_test: + - name: Deploy Lightspeed operator + type: playbook + source: install-openstack-lightspeed.yml cifmw_openstack_lightspeed_llm_endpoint: "https://api.example.com/v1/chat/completions" cifmw_openstack_lightspeed_model_name: "example-model" From 7b204ff8d16425894bfddf1a40151a56ce7edc18 Mon Sep 17 00:00:00 2001 From: malingatembo Date: Wed, 26 Aug 2026 14:27:50 +0200 Subject: [PATCH 5/7] use cifmw-base-crc-openstack parent for collection support in jobs --- zuul.d/jobs.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index d405626..5546796 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -2,14 +2,11 @@ # CI job for deploying OpenStack Lightspeed operator - job: name: lightspeed-operator-deployment-crc - parent: cifmw-base-crc + parent: cifmw-base-crc-openstack attempts: 1 run: ci/playbooks/lightspeed/run.yml required-projects: - - openstack-k8s-operators/ci-framework - openstack-k8s-operators/lightspeed-operator - roles: - - zuul: github.com/openstack-k8s-operators/ci-framework vars: pre_test: - name: Deploy Lightspeed operator From ebf2560054c1787c554c010a04abb154360ecce6 Mon Sep 17 00:00:00 2001 From: malingatembo Date: Wed, 26 Aug 2026 14:54:51 +0200 Subject: [PATCH 6/7] Add content-provider dependency for PR testing Added openstack-k8s-operators-content-provide as a job dependency to make sure that operator is built from pr changes before deployment. Without this the job wouold use the upstream catalogue image instead of testing the actual pr content. follows the pattern by openstack-operator https://github.com/openstack-k8s-operators/openstack-operator/blob/aeda4eda1c71ae34dabc5b458e1340ab755f41a4/zuul.d/jobs.yaml#L35 Related: OSPRH-33344 --- zuul.d/jobs.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 5546796..676eee7 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -5,6 +5,8 @@ parent: cifmw-base-crc-openstack attempts: 1 run: ci/playbooks/lightspeed/run.yml + dependencies: + - openstack-k8s-operators-content-provider required-projects: - openstack-k8s-operators/lightspeed-operator vars: From 011ef9691d76dd9e4f494b1c25294ed98df09a39 Mon Sep 17 00:00:00 2001 From: malingatembo Date: Wed, 26 Aug 2026 18:25:24 +0200 Subject: [PATCH 7/7] Add containt-provider job to github check pipeline The deployment job depends on OpenStack-k8s-operators-content-provider but it was not configured to run in the pipeline. this cased the error: 'Job depends on openstack-k8s-operators-content-provider which was not run' Added content-provider to the jobs list so it runs before deployment, building the operator from PR code and making it available for testing. Fixes: CONFIG_ERROR - dependency not satisfied Related: OSPRH-33344 --- zuul.d/projects.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/zuul.d/projects.yaml b/zuul.d/projects.yaml index 7dacd03..2bfccc9 100644 --- a/zuul.d/projects.yaml +++ b/zuul.d/projects.yaml @@ -4,4 +4,5 @@ default-branch: main github-check: jobs: + - openstack-k8s-operators-content-provider - lightspeed-operator-deployment-crc