From 2bbf386c0723f466a2782252759da381e567c2c0 Mon Sep 17 00:00:00 2001 From: Nil Gallego Date: Mon, 9 Dec 2024 15:52:13 +0100 Subject: [PATCH] wip --- .ibm/pipelines/get_aap_files.yaml | 24 ++++++++++++++++++++++++ .ibm/pipelines/jobs/ocp-v4-16.sh | 15 +++++++++++++++ .ibm/pipelines/kubernetes-tests.sh | 14 -------------- 3 files changed, 39 insertions(+), 14 deletions(-) diff --git a/.ibm/pipelines/get_aap_files.yaml b/.ibm/pipelines/get_aap_files.yaml index 3729b3b722..393b1f6a6c 100644 --- a/.ibm/pipelines/get_aap_files.yaml +++ b/.ibm/pipelines/get_aap_files.yaml @@ -36,3 +36,27 @@ headers: Authorization: "Bearer {{ access_token }}" dest: "{{ download_path }}" + +- name: Setup Ansible Backstage Plugins + hosts: localhost + vars: + ansible_backstage_plugins_local_dir: "~/plugins" + ansible_backstage_bundle: "/tmp//tmp/ansible-automation-platform-setup-bundle.tar.gz" + + tasks: + - name: Create Plugins Directory + file: + path: "{{ ansible_backstage_plugins_local_dir }}" + state: directory + mode: '0755' + + - name: Set Dynamic Plugin Root Directory + set_fact: + dynamic_plugin_root_dir: "{{ ansible_backstage_plugins_local_dir }}" + + - name: Extract Ansible Backstage Bundle + unarchive: + src: "{{ ansible_backstage_bundle }}" + dest: "{{ dynamic_plugin_root_dir }}" + excludes: "*code*" + remote_src: yes diff --git a/.ibm/pipelines/jobs/ocp-v4-16.sh b/.ibm/pipelines/jobs/ocp-v4-16.sh index c8c8f8ed4f..7aadb42373 100644 --- a/.ibm/pipelines/jobs/ocp-v4-16.sh +++ b/.ibm/pipelines/jobs/ocp-v4-16.sh @@ -1,6 +1,21 @@ #!/bin/sh + +install_ansible(){ + if [[ -x "$(command -v ansible)" ]]; then + echo "Ansible is already installed." + else + echo "Installing Ansible client" + apt install ansible -y + echo "Ansible client installed successfully." + fi +} + handle_ocp_4_16() { + + install_ansible + ansible --version + K8S_CLUSTER_URL=$(cat /tmp/secrets/RHDH_OS_1_CLUSTER_URL) K8S_CLUSTER_TOKEN=$(cat /tmp/secrets/RHDH_OS_1_CLUSTER_TOKEN) diff --git a/.ibm/pipelines/kubernetes-tests.sh b/.ibm/pipelines/kubernetes-tests.sh index cddb721214..dee82da93f 100755 --- a/.ibm/pipelines/kubernetes-tests.sh +++ b/.ibm/pipelines/kubernetes-tests.sh @@ -60,20 +60,6 @@ install_helm() { fi } -install_ansible(){ - if [[ -x "$(command -v ansible)" ]]; then - echo "Ansible is already installed." - else - echo "Installing Ansible client" - apt install ansible -y - echo "Ansible client installed successfully." - fi -} - -install_ansible -ansible --version - - install_helm # check installed helm version