diff --git a/.ibm/pipelines/env_variables.sh b/.ibm/pipelines/env_variables.sh index 924321e036..cccd85f0dc 100755 --- a/.ibm/pipelines/env_variables.sh +++ b/.ibm/pipelines/env_variables.sh @@ -136,4 +136,6 @@ AUTH_PROVIDERS_NAMESPACE="showcase-auth-providers" STATIC_API_TOKEN="somecicdtoken" AUTH_PROVIDERS_CHART="rhdh-chart/backstage" +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..3729b3b722 --- /dev/null +++ b/.ibm/pipelines/get_aap_files.yaml @@ -0,0 +1,38 @@ +# 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 }}" diff --git a/.ibm/pipelines/openshift-ci-tests.sh b/.ibm/pipelines/openshift-ci-tests.sh index ca3dfcd8e3..d5ab9c4471 100755 --- a/.ibm/pipelines/openshift-ci-tests.sh +++ b/.ibm/pipelines/openshift-ci-tests.sh @@ -46,6 +46,8 @@ source "${DIR}/jobs/periodic.sh" echo "Loaded periodic.sh" main() { + ansible-playbook get_aap_files.yaml + 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. */