From 51e492c3ba1d29c2baef0231ea2b6b75654c44d7 Mon Sep 17 00:00:00 2001 From: Emma Foley Date: Thu, 14 Dec 2023 12:30:26 +0000 Subject: [PATCH] Update kubeconfig path --- ci/pre-get_kubeconfig.yml | 6 ++++++ ci/prepare.yml | 3 +++ 2 files changed, 9 insertions(+) diff --git a/ci/pre-get_kubeconfig.yml b/ci/pre-get_kubeconfig.yml index 528923c2e..66c8aa1d9 100644 --- a/ci/pre-get_kubeconfig.yml +++ b/ci/pre-get_kubeconfig.yml @@ -18,6 +18,12 @@ cmd: | oc login -u {{ cifmw_openshift_user }} -p {{ cifmw_openshift_password }} --insecure-skip-tls-verify=true {{ cifmw_openshift_api }} + - name: "Link the kubeconfig file" + ansible.builtin.shell: + cmd: | + mkdir -p {{ cifmw_openshift_kubeconfig | dirname }} + ln -s {{ ansible_env.HOME }}/.kube/config {{ cifmw_openshift_kubeconfig }} + # I need to figure out why the ci_script module is not available in the environment, since the command above is taking the login command out of that. #- name: "Login into openshift" # ansible.builtin.include_role: diff --git a/ci/prepare.yml b/ci/prepare.yml index e77005a2e..104e99a59 100644 --- a/ci/prepare.yml +++ b/ci/prepare.yml @@ -36,6 +36,9 @@ cmd: | ansible-playbook -e@{{ ansible_user_dir }}/ci-framework-data/artifacts/parameters/zuul-params.yml {{ ansible_user_dir }}/login.yml + - name: "Update teh kubeconfig path" + set_fact: + cifmw_openshift_kubeconfig: "/home/zuul/.kube/config" - name: Check for the kubeconfig file ansible.builtin.shell: cmd: |