diff --git a/.ibm/pipelines/env_variables.sh b/.ibm/pipelines/env_variables.sh index 6815aa1a16..2ab183cc64 100755 --- a/.ibm/pipelines/env_variables.sh +++ b/.ibm/pipelines/env_variables.sh @@ -143,4 +143,6 @@ KEYCLOAK_AUTH_CLIENT_SECRET=$(cat /tmp/secrets/KEYCLOAK_AUTH_CLIENT_SECRET) KEYCLOAK_AUTH_LOGIN_REALM=$(cat /tmp/secrets/KEYCLOAK_AUTH_LOGIN_REALM) KEYCLOAK_AUTH_REALM=$(cat /tmp/secrets/KEYCLOAK_AUTH_REALM) +RH_OFFLINE_TOKEN=$(cat /tmp/secrets/RH_OFFLINE_TOKEN) + set +a # Stop automatically exporting variables diff --git a/.ibm/pipelines/get_aap_files.yaml b/.ibm/pipelines/get_aap_files.yaml new file mode 100644 index 0000000000..393b1f6a6c --- /dev/null +++ b/.ibm/pipelines/get_aap_files.yaml @@ -0,0 +1,62 @@ +# https://docs.redhat.com/en/documentation/red_hat_ansible_automation_platform/2.4/html-single/installing_ansible_plug-ins_for_red_hat_developer_hub/index#rhdh-download-plugins_rhdh-install-ocp +--- +- name: Headlessly Download AAP from Red Hat Customer Portal + hosts: localhost + vars: + offline_token: "{{ lookup('file', '/tmp/secrets/RH_OFFLINE_TOKEN') }}" + file_url: "https://access.cdn.redhat.com/content/origin/files/sha256/cf/cf2a2d4e6b6819676a563daae36eff34195af67caf111f1fc89b487daf165520/ansible-automation-platform-setup-bundle-2.4-8-x86_64.tar.gz" + download_path: "/tmp/ansible-automation-platform-setup-bundle.tar.gz" + + tasks: + - name: Generate Access Token from Offline Token + no_log: true + uri: + url: "https://sso.redhat.com/auth/realms/redhat-external/protocol/openid-connect/token" + method: POST + headers: + Content-Type: "application/x-www-form-urlencoded" + body: + grant_type: "refresh_token" + client_id: "rhsm-api" + refresh_token: "{{ offline_token }}" + body_format: form-urlencoded + return_content: yes + register: access_token_response + + - name: Extract Access Token + no_log: true + set_fact: + access_token: "{{ access_token_response.json.access_token }}" + + - name: Download File + no_log: true + uri: + url: "{{ file_url }}" + method: GET + 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/openshift-ci-tests.sh b/.ibm/pipelines/openshift-ci-tests.sh index 9759706a42..64ee7b74fd 100755 --- a/.ibm/pipelines/openshift-ci-tests.sh +++ b/.ibm/pipelines/openshift-ci-tests.sh @@ -35,6 +35,7 @@ for SCRIPT in "${SCRIPTS[@]}"; do done main() { + echo "Log file: ${LOGFILE}" echo "JOB_NAME : $JOB_NAME" diff --git a/e2e-tests/playwright.config.ts b/e2e-tests/playwright.config.ts index d60763886f..6c8cf31009 100644 --- a/e2e-tests/playwright.config.ts +++ b/e2e-tests/playwright.config.ts @@ -11,7 +11,7 @@ export default defineConfig({ timeout: 90 * 1000, testDir: "./playwright", /* Fail the build on CI if you accidentally left test.only in the source code. */ - forbidOnly: !!process.env.CI, + forbidOnly: false, /* Retry on CI only */ retries: process.env.CI ? 2 : 0, /* Opt out of parallel tests on CI. */ diff --git a/e2e-tests/playwright/e2e/plugins/aap.spec.ts b/e2e-tests/playwright/e2e/plugins/aap.spec.ts new file mode 100644 index 0000000000..1efc33ff4b --- /dev/null +++ b/e2e-tests/playwright/e2e/plugins/aap.spec.ts @@ -0,0 +1,5 @@ +import test, { expect } from "@playwright/test"; + +test.only("pass", () => { + expect(true); +});