Skip to content

Commit

Permalink
Experiment with different ways to get the crc status
Browse files Browse the repository at this point in the history
  • Loading branch information
elfiesmelfie committed Nov 29, 2023
1 parent 6184bab commit 73659d3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .zuul.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,11 @@
- stf-crc-ocp_413-nightly_bundles
- stf-crc-ocp_413-local_build
- stf-crc-ocp_413-local_build-index_deploy

- project:
name: infrawatch/service-telemetry-operator
#templates:
# - stf-crc-jobs
github-check:
jobs:
- stf-crc-ocp_413-nightly_bundles
- stf-crc-ocp414
27 changes: 24 additions & 3 deletions ci/post-debug_crc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,14 @@
- name: "Get the cache dir for crc"
ansible.builtin.shell:
cmd: |
crc status | grep "Cache Directory" | cut -d: -f2
crc status | grep "Cache Directory" | cut -d' ' -f3
register: cache_dir

- name: Get crc status in json format
ansible.builtin.shell:
cmd: |
crc status -o json
- name: "Show the contents of of cache dir"
ansible.builtin.shell:
cmd: |
Expand All @@ -36,7 +41,12 @@
- name: "Set the name for kubeconfig"
ansible.builtin.set_fact:
kubeconfig: "{{ cache_dir.stdout | trim }}/{{ crc_ocp_bundle | basename | splitext | first }}/kubeconfig"
kubeconfig: "{{ cache_dir.stdout }}/{{ crc_ocp_bundle | basename | splitext | first }}/kubeconfig"

- name: Get oc status from crc
ansible.builtin.shell:
cmd:
crc status -o json

- name: "Get oc status"
ansible.builtin.shell:
Expand All @@ -48,6 +58,18 @@
delay: 6
until: output.rc == 0

- name: Get oc status from crc
ansible.builtin.shell:
cmd:
crc status -o json
register: crc_status

- ansible.builtin.debug:
var: crc_status | from_json

- ansible.builtin.set_fact:
crc_status_json: "{{ crc_status | from_json }}"

- name: "Link the KUBECONFIG file to ~/.kube/config"
ansible.builtin.shell:
cmd: |
Expand All @@ -59,4 +81,3 @@
ansible.builtin.shell:
cmd: |
oc status

0 comments on commit 73659d3

Please sign in to comment.