diff --git a/docker/Dockerfile b/docker/Dockerfile index 5885659c80..9cd85e896a 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -121,6 +121,10 @@ RUN \ -e "s/(\"Last Commit\": \"(.+)\")/\1, \"Build Time\": \"$now\"/" && \ cat packages/app/src/build-metadata.json; echo +# Replace ${RHDH_DOCS_VERSION:-latest} placeholder with actual version (major.minor) from package.json +RUN RHDH_DOCS_VERSION=$(node -p "require('./package.json').version.split('.').slice(0,2).join('.')") && \ + sed -i "s/\${RHDH_DOCS_VERSION:-latest}/$RHDH_DOCS_VERSION/g" dynamic-plugins.default.yaml + # suppress git warnings about dubious ownership in repository at '/opt/app-root/src' when building RUN echo "=== YARN BUILD ==="; FAILED=0; \ git config --global --add safe.directory /opt/app-root/src; \ diff --git a/dynamic-plugins.default.yaml b/dynamic-plugins.default.yaml index ad1c59be2c..a7e6ca4d00 100644 --- a/dynamic-plugins.default.yaml +++ b/dynamic-plugins.default.yaml @@ -504,7 +504,7 @@ plugins: cta: text: Learn more textKey: steps.setupAuthentication.ctaTitle - link: https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/html/authentication_in_red_hat_developer_hub/ + link: https://docs.redhat.com/en/documentation/red_hat_developer_hub/${RHDH_DOCS_VERSION}/html/authentication_in_red_hat_developer_hub/ - title: Configure RBAC titleKey: steps.configureRbac.title icon: Rbac @@ -524,7 +524,7 @@ plugins: cta: text: Learn more textKey: steps.configureGit.ctaTitle - link: https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/html/integrating_red_hat_developer_hub_with_github/ + link: https://docs.redhat.com/en/documentation/red_hat_developer_hub/${RHDH_DOCS_VERSION}/html/integrating_red_hat_developer_hub_with_github/ - title: Manage plugins titleKey: steps.managePlugins.title icon: Plugins diff --git a/e2e-tests/playwright/e2e/plugins/quick-start.spec.ts b/e2e-tests/playwright/e2e/plugins/quick-start.spec.ts index 62ec45f4ac..7732cd905a 100644 --- a/e2e-tests/playwright/e2e/plugins/quick-start.spec.ts +++ b/e2e-tests/playwright/e2e/plugins/quick-start.spec.ts @@ -42,17 +42,19 @@ test.describe("Test Quick Start plugin", () => { await uiHelper.verifyText("We'll guide you through a few quick steps"); await uiHelper.verifyText("Not started"); await uiHelper.clickButtonByText("Set up authentication"); + // URL version is replaced at build time from package.json (e.g., "1.9") await uiHelper.verifyButtonURL( "Learn more", - "https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/html/authentication_in_red_hat_developer_hub/", + "docs.redhat.com/en/documentation/red_hat_developer_hub/", { exact: false }, ); await uiHelper.clickButtonByText("Configure RBAC"); await uiHelper.verifyButtonURL("Manage access", "/rbac"); await uiHelper.clickButtonByText("Configure Git"); + // URL version is replaced at build time from package.json (e.g., "1.9") await uiHelper.verifyButtonURL( "Learn more", - "https://docs.redhat.com/en/documentation/red_hat_developer_hub/latest/html/integrating_red_hat_developer_hub_with_github/", + "docs.redhat.com/en/documentation/red_hat_developer_hub/", { exact: false }, ); await uiHelper.clickButtonByText("Manage plugins");