From c9d5014cb12fa32e844443899b38d36b2fdbcd23 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Mon, 11 Sep 2023 19:23:24 +0100 Subject: [PATCH] [skip_clone] Add a clone_repos: true to stf-run-ci --- build/stf-run-ci/defaults/main.yml | 1 + build/stf-run-ci/tasks/main.yml | 1 + ci/deploy_stf.yml | 12 +++++++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/build/stf-run-ci/defaults/main.yml b/build/stf-run-ci/defaults/main.yml index 20f04d3d9..23de210b7 100644 --- a/build/stf-run-ci/defaults/main.yml +++ b/build/stf-run-ci/defaults/main.yml @@ -68,5 +68,6 @@ prometheus_webhook_snmp_repository: https://github.com/infrawatch/prometheus-web base_dir: '' +clone_repos: true setup_bundle_registry_auth: true setup_bundle_registry_tls_ca: true diff --git a/build/stf-run-ci/tasks/main.yml b/build/stf-run-ci/tasks/main.yml index f8b6e0d88..198d0cafb 100644 --- a/build/stf-run-ci/tasks/main.yml +++ b/build/stf-run-ci/tasks/main.yml @@ -89,6 +89,7 @@ - create_builds block: - name: Setup supporting repositories + when: clone_repos ansible.builtin.include_tasks: clone_repos.yml tags: - clone diff --git a/ci/deploy_stf.yml b/ci/deploy_stf.yml index 0f4fd6fae..f3ab9a7f5 100644 --- a/ci/deploy_stf.yml +++ b/ci/deploy_stf.yml @@ -1,17 +1,27 @@ --- - name: "Deploy STF" hosts: controller + become: true + environment: + PATH: "{{ ansible_env.PATH }}:{{ ansible_env.HOME }}/.local/bin/" tasks: + - name: "Set value for zuul dict when it is not defined (e.g. for testing outside zuul)" + when: not zuul is defined + ansible.builtin.set_fact: + zuul: { project: { src_dir: "repos/stf-verify-containers/service-telemetry-operator" }} + - name: "Set the sto_dir if it isn't already set" ansible.builtin.set_fact: - sto_dir: '{{ ansible_env.HOME }}/{{ zuul.project.src_dir }}' + sto_dir: '/opt/ci/service-telemetry-operator/' when: sto_dir | default('') | length == 0 + # ansible-playbook -e __service_telemetry_storage_ephemeral_enabled=true -e __local_build_enabled=false -e __deploy_from_bundles_enabled=true -e __service_telemetry_bundle_image_path=quay.io/infrawatch-operators/service-telemetry-operator-bundle:nightly-head -e __smart_gateway_bundle_image_path=quay.io/infrawatch-operators/smart-gateway-operator-bundle:nightly-head --skip-tags bundle_registry_tls_ca --skip-tags bundle_registry_auth build/run-ci.yaml # from: https://github.com/infrawatch/service-telemetry-operator/pull/437 - name: "Deploy STF from the created bundles" ansible.builtin.import_role: name: '../build/stf-run-ci' vars: + clone_repos: false __service_telemetry_storage_ephemeral_enabled: true __local_build_enabled: false __deploy_from_bundles_enabled: true