Skip to content

Commit

Permalink
[ci] Add a deploy stage for STF
Browse files Browse the repository at this point in the history
This playbook will deploy the built STF images from bundles
  • Loading branch information
elfiesmelfie committed Jun 29, 2023
1 parent b992dca commit c432e8c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
5 changes: 4 additions & 1 deletion build/stf-run-ci/tasks/setup_stf_from_bundles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
20 changes: 19 additions & 1 deletion ci/deploy_stf.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit c432e8c

Please sign in to comment.