Skip to content

Commit

Permalink
[stf-run-ci] Fail if bundle paths are unset when setting up from bundles
Browse files Browse the repository at this point in the history
  • Loading branch information
elfiesmelfie committed Jul 5, 2023
1 parent acc4194 commit b3422ae
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions build/stf-run-ci/tasks/setup_stf_from_bundles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,14 +85,37 @@
# - bundle_registry_tls_ca

- debug:
msg: "SG bundle path: {{ __smart_gateway_bundle_image_path }}"
msg: "SG bundle path: '{{ __smart_gateway_bundle_image_path }}'"
- debug:
msg: "STO bundle path: {{ __service_telemetry_bundle_image_path}}"
msg: "STO bundle path: '{{ __service_telemetry_bundle_image_path }}'"

- debug:
msg: "__service_telemetry_bundle_image_path length: {{ __service_telemetry_bundle_image_path | length }}"
ignore_errors: true

- debug:
msg: "__smart_gateway_bundle_image_path length: {{ __smart_gateway_bundle_image_path | length }}"
ignore_errors: true
- debug:
msg: "Is __smart_gateway_bundle_image_path defined: {{ __smart_gateway_bundle_image_path is defined }}"
ignore_errors: true

- debug:
msg: "Is __service_telemetry_bundle_image_path defined: {{ __service_telemetry_bundle_image_path is defined }}"
ignore_errors: true

- name: "Ensure that the bundle paths are set."
assert:
that:
- '__smart_gateway_bundle_image_path is not None'
- '__service_telemetry_bundle_image_path is not 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 of non-zero length"

- name: Deploy SGO via OLM bundle
shell:
cmd: "{{ base_dir }}/working/operator-sdk-v1.5.0 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"
cmd: "{{ base_dir }}/working/operator-sdk-v1.5.0 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"

- name: Deploy STO via OLM bundle
shell:
cmd: "{{ base_dir }}/working/operator-sdk-v1.5.0 run bundle {{ __service_telemetry_bundle_image_path}} {% if pull_secret is defined %}--pull-secret-name=pull-secret --ca-secret-name=registry-tls-ca{% endif %} --namespace={{ namespace }} --timeout 600s"
cmd: "{{ base_dir }}/working/operator-sdk-v1.5.0 run bundle {{ __service_telemetry_bundle_image_path }} {% if pull_secret is defined %}--pull-secret-name=pull-secret --ca-secret-name=registry-tls-ca{% endif %} --namespace={{ namespace }} --timeout 600s"

0 comments on commit b3422ae

Please sign in to comment.