diff --git a/build/stf-run-ci/tasks/setup_stf_from_bundles.yml b/build/stf-run-ci/tasks/setup_stf_from_bundles.yml index fd5423dd3..9acd0fa77 100644 --- a/build/stf-run-ci/tasks/setup_stf_from_bundles.yml +++ b/build/stf-run-ci/tasks/setup_stf_from_bundles.yml @@ -7,13 +7,16 @@ name: pull-secret register: pull_secret + - debug: + msg: "{{ pull_secret }}" + - name: Decode docker config json set_fact: dockerconfigjson: "{{ pull_secret.resources[0].data['.dockerconfigjson'] | b64decode }}" - name: Merge registry creds into auth section of docker config set_fact: - new_dockerauths: "{{ dockerconfigjson['auths'] | combine( { + new_dockerauths: "{{ dockerconfigjson['auths'] | default({}) | combine( { pull_secret_registry:{ 'auth': (pull_secret_user ~ ':' ~ pull_secret_pass) | b64encode } diff --git a/ci/deploy_stf.yml b/ci/deploy_stf.yml index 96c605631..d119b732d 100644 --- a/ci/deploy_stf.yml +++ b/ci/deploy_stf.yml @@ -1,7 +1,25 @@ --- - hosts: controller tasks: - - name: "Deploy STF object" + - set_fact: + sto_dir: '{{ ansible_env.HOME }}/{{ zuul.project.src_dir }}' + when: sto_dir | default('') | length == 0 + + - name: "Deploy STF" + ansible.builtin.import_role: + name: '../build/stf-run-ci' + vars: + __deploy_stf: true + # This could be passed as a job param, e.g. to test deploy from bundles/index + __deploy_from_bundles_enabled: true + __local_build_enabled: false + __service_telemetry_snmptraps_enabled: true + __service_telemetry_storage_ephemeral_enabled: true + __working_branch: master + base_dir: "{{ sto_dir }}/build" + sgo_branch: "add_logs_to_generate_bundle" + + - name: "Check that the STF deployment was successful" ansible.builtin.shell: cmd: | OCP_PROJECT=service-telemetry VALIDATION_SCOPE=use_redhat ./build/validate_deployment.sh