Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add checks for not set sto and sgo bundle paths #447

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/stf-run-ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ choose to override:
| `__local_build_enabled` | {true,false} | true | Whether to deploy STF from local built artifacts. Also see `working_branch`, `sg_branch`, `sgo_branch` |
| `__deploy_from_bundles_enabled` | {true,false} | false | Whether to deploy STF from OLM bundles (TODO: compat with `__local_build_enabled`) |
| `__deploy_from_index_enabled` | {true,false} | false | Whether to deploy STF from locally built bundles and index image. |
| `__service_telemetry_bundle_image_path` | <image_path> | <none> | Image path to Service Telemetry Operator bundle |
| `__smart_gateway_bundle_image_path` | <image_path> | <none> | Image path to Smart Gateway Operator bundle |
| `__service_telemetry_bundle_image_path` | <image_path> | `quay.io/infrawatch-operators/service-telemetry-operator-bundle:nightly-head` | Image path to Service Telemetry Operator bundle |
| `__smart_gateway_bundle_image_path` | <image_path> | `quay.io/infrawatch-operators/smart-gateway-operator-bundle:nightly-head` | Image path to Smart Gateway Operator bundle |
| `prometheus_webhook_snmp_branch` | <git_branch> | master | Which Prometheus Webhook SNMP git branch to checkout |
| `sgo_branch` | <git_branch> | master | Which Smart Gateway Operator git branch to checkout |
| `sg_core_branch` | <git_branch> | master | Which Smart Gateway Core git branch to checkout |
Expand Down
4 changes: 2 additions & 2 deletions build/stf-run-ci/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ __service_telemetry_observability_strategy: use_redhat
__service_telemetry_transports_certificates_endpoint_cert_duration: 70080h
__service_telemetry_transports_certificates_ca_cert_duration: 70080h
__internal_registry_path: image-registry.openshift-image-registry.svc:5000
__service_telemetry_bundle_image_path:
__smart_gateway_bundle_image_path:
__service_telemetry_bundle_image_path: "quay.io/infrawatch-operators/service-telemetry-operator-bundle:nightly-head"
__smart_gateway_bundle_image_path: "quay.io/infrawatch-operators/smart-gateway-operator-bundle:nightly-head"

default_operator_registry_image_base: registry.redhat.io/openshift4/ose-operator-registry
default_operator_registry_image_tag: v4.12
Expand Down
8 changes: 8 additions & 0 deletions build/stf-run-ci/tasks/setup_stf_from_bundles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@
tags:
- bundle_registry_tls_ca

- name: "Ensure that the bundle paths are set."
ansible.builtin.assert:
that:
- '__smart_gateway_bundle_image_path is defined and __smart_gateway_bundle_image_path != None'
- '__service_telemetry_bundle_image_path is defined and __service_telemetry_bundle_image_path != None'
fail_msg: "Bundle path(s) not set. __smart_gateway_bundle_image_path is '{{ __smart_gateway_bundle_image_path }}' and __service_telemetry_bundle_image_path is '{{ __service_telemetry_bundle_image_path }}'. Both values need to be set."
success_msg: "Bundle paths are defined and not None"

- name: Deploy SGO via OLM bundle
shell:
cmd: "{{ base_dir }}/working/operator-sdk run bundle {{__smart_gateway_bundle_image_path}} {% if pull_secret is defined %}--pull-secret-name=pull-secret --ca-secret-name=registry-tls-ca{% endif %} --namespace={{ namespace }} --timeout 600s"
Expand Down