Skip to content
Snippets Groups Projects

Expose the versioned pages site URL during the ci build

All threads resolved!

What does this MR do and why?

Make the CI_PAGES_URL variable always return the full deployment URL, including path_prefix

Currently the CI_PAGES_URL only returns the main pages deployment path. If the user leverages parallel deployments, it does not include the user-specified path_prefix. This MR moves the creation of said variable to models/build.rb where we have access to the job spec to be able to deduct the full deployment URL from (ahead of its deployment). We also leverage the Gitlab::Pages::UrlBuilder that generates the path for real after the pages deployment has been build so we have a SSOT for the deployment URL spec.

Introduce a new variable CI_PAGES_HOSTNAME with the full projects domain, not just the instance default

The existing CI_PAGES_DOMAIN variable always returned the instance's pages domain, not the project's domain. Seeing as this has been there for a while, I thought it safe to keep this behaviour as-is and instead introduce a new variable CI_PAGES_HOSTNAME that returns the full domain.

refactor the Gitlab::Pages::UrlBuilder

The above changes required major changes in the Gitlab::Pages::UrlBuilder, which had organically grown to include more and more functionalities and special use-cases. I took this as an opportunity to refactor the class to a more declarative instead of a functional style. this will allow easier maintenance for future changes such as what might result from #498446

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

Related to #416493 (closed)

Edited by Janis Altherr

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Ghost User
  • mentioned in issue #416493 (closed)

  • Janis Altherr added 1 commit

    added 1 commit

    Compare with previous version

  • Janis Altherr added 3881 commits

    added 3881 commits

    Compare with previous version

  • Janis Altherr resolved all threads

    resolved all threads

  • Janis Altherr changed the description

    changed the description

  • Janis Altherr added 6 commits

    added 6 commits

    • 28d59e51...eb297634 - 4 commits from branch master
    • 80507682 - Fix CI_PAGES_DOMAIN and CI_PAGES_URL for parallel deployments
    • 735c818d - Introduce fix_pages_ci_variables feature flag

    Compare with previous version

  • A deleted user added feature flag label

    added feature flag label

  • Janis Altherr added 275 commits

    added 275 commits

    • 735c818d...f86b0540 - 273 commits from branch master
    • f479e636 - Fix CI_PAGES_DOMAIN and CI_PAGES_URL for parallel deployments
    • 8f7de7a2 - Introduce fix_pages_ci_variables feature flag

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • c6e09ac8 - Drop LegacyUrlBuilder from feature gate

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 4b5de058 - Move slugification to UrlBuilder

    Compare with previous version

  • Janis Altherr marked this merge request as ready

    marked this merge request as ready

  • Janis Altherr added 1 commit

    added 1 commit

    • 3272fb3a - Hardcode return values to remove flakiness

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • e7144894 - Fix CI_PAGES_DOMAIN and CI_PAGES_URL for parallel deployments

    Compare with previous version

  • Author Maintainer

    @ngala would you perform an initial backend review on this?

  • Janis Altherr requested review from @ngala

    requested review from @ngala

  • Naman Jagdish Gala
  • Naman Jagdish Gala
  • Naman Jagdish Gala
  • Naman Jagdish Gala
  • Naman Jagdish Gala requested changes

    requested changes

  • changed milestone to %17.7

  • Janis Altherr added 1 commit

    added 1 commit

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 033d9d96 - Fix accidental self-reference

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 50e2bb8b - Test behavior with FF disabled

    Compare with previous version

  • Janis Altherr added 2 commits

    added 2 commits

    • e4b49dc2 - Add test for namespace_in_path with path_prefix
    • ef9b19bf - Reinstate backwards compatibility

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 391df15d - Reinstate backwards compatibility

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 26c4e814 - Reinstate backwards compatibility

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    Compare with previous version

  • Janis Altherr changed the description

    changed the description

  • Janis Altherr added 1 commit

    added 1 commit

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 828b3436 - Remove spec for removed method

    Compare with previous version

  • Janis Altherr requested review from @ngala

    requested review from @ngala

  • Janis Altherr requested review from @kassio and removed review request for @ngala

    requested review from @kassio and removed review request for @ngala

  • requested review from @msedlakjakubowski

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 2296bec3 - Fix docs to align with functionality

    Compare with previous version

  • Janis Altherr removed review request for @msedlakjakubowski

    removed review request for @msedlakjakubowski

  • Janis Altherr requested review from @pskorupa

    requested review from @pskorupa

  • Janis Altherr removed review request for @kassio

    removed review request for @kassio

  • Janis Altherr requested review from @ngala and removed review request for @pskorupa

    requested review from @ngala and removed review request for @pskorupa

  • Janis Altherr requested review from @ngala

    requested review from @ngala

  • Janis Altherr
  • Janis Altherr added 1 commit

    added 1 commit

    • 4b69e375 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Naman Jagdish Gala approved this merge request

    approved this merge request

  • Janis Altherr requested review from @pskorupa and @grzesiek

    requested review from @pskorupa and @grzesiek

  • Janis Altherr resolved all threads

    resolved all threads

  • Piotr Skorupa approved this merge request

    approved this merge request

  • Kassio Borges
  • Kassio Borges approved this merge request

    approved this merge request

  • mentioned in issue #507423 (closed)

  • requested review from @pedropombeiro

  • Janis Altherr removed review request for @grzesiek

    removed review request for @grzesiek

  • Janis Altherr added 1 commit

    added 1 commit

    Compare with previous version

  • Janis Altherr reset approvals from @kassio and @pskorupa by pushing to the branch

    reset approvals from @kassio and @pskorupa by pushing to the branch

  • Janis Altherr added 1 commit

    added 1 commit

    • 367a767c - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 687b4bb7 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 4aefdb80 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 6af385f2 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • b2b63fd5 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 4544aff2 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • baaa63cd - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    Compare with previous version

  • requested review from @pedropombeiro

  • approved this merge request

  • Before you set this MR to auto-merge

    This merge request will progress on pipeline tiers until it reaches the last tier: pipelinetier-3. We will trigger a new pipeline for each transition to a higher tier.

    Before you set this MR to auto-merge, please check the following:

    • You are the last maintainer of this merge request
    • The latest pipeline for this merge request is pipelinetier-3 (You can find which tier it is in the pipeline name)
    • This pipeline is recent enough (created in the last 8 hours)

    If all the criteria above apply, please set auto-merge for this merge request.

    See pipeline tiers and merging a merge request for more details.

  • E2E Test Result Summary

    allure-report-publisher generated test report!

    e2e-test-on-gdk: :white_check_mark: test report for 08f2cdec

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Verify      | 84     | 0      | 2       | 0     | 86    | ✅     |
    | Create      | 232    | 0      | 4       | 0     | 236   | ✅     |
    | Plan        | 150    | 0      | 0       | 0     | 150   | ✅     |
    | Package     | 50     | 0      | 0       | 0     | 50    | ✅     |
    | Govern      | 136    | 0      | 6       | 0     | 142   | ✅     |
    | Monitor     | 16     | 0      | 0       | 0     | 16    | ✅     |
    | Data Stores | 62     | 0      | 0       | 0     | 62    | ✅     |
    | Secure      | 8      | 0      | 0       | 0     | 8     | ✅     |
    | Release     | 10     | 0      | 0       | 0     | 10    | ✅     |
    | Fulfillment | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Manage      | 2      | 0      | 0       | 0     | 2     | ✅     |
    | Analytics   | 2      | 0      | 0       | 0     | 2     | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 754    | 0      | 12      | 0     | 766   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+

    e2e-test-on-cng: :white_check_mark: test report for 08f2cdec

    expand test summary
    +------------------------------------------------------------------+
    |                          suites summary                          |
    +-------------+--------+--------+---------+-------+-------+--------+
    |             | passed | failed | skipped | flaky | total | result |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Plan        | 86     | 0      | 8       | 0     | 94    | ✅     |
    | Verify      | 49     | 0      | 16      | 0     | 65    | ✅     |
    | Govern      | 84     | 0      | 9       | 1     | 93    | ✅     |
    | Create      | 140    | 0      | 20      | 1     | 160   | ✅     |
    | Data Stores | 33     | 0      | 10      | 0     | 43    | ✅     |
    | Secure      | 2      | 0      | 5       | 0     | 7     | ✅     |
    | Growth      | 0      | 0      | 2       | 0     | 2     | ➖     |
    | Package     | 24     | 0      | 14      | 0     | 38    | ✅     |
    | Configure   | 0      | 0      | 3       | 0     | 3     | ➖     |
    | Release     | 5      | 0      | 1       | 0     | 6     | ✅     |
    | Manage      | 1      | 0      | 9       | 0     | 10    | ✅     |
    | Fulfillment | 2      | 0      | 7       | 1     | 9     | ✅     |
    | Ai-powered  | 0      | 0      | 2       | 0     | 2     | ➖     |
    | Monitor     | 8      | 0      | 12      | 0     | 20    | ✅     |
    | Analytics   | 2      | 0      | 0       | 1     | 2     | ✅     |
    | ModelOps    | 0      | 0      | 1       | 0     | 1     | ➖     |
    +-------------+--------+--------+---------+-------+-------+--------+
    | Total       | 436    | 0      | 119     | 4     | 555   | ✅     |
    +-------------+--------+--------+---------+-------+-------+--------+
  • Janis Altherr requested review from @pskorupa

    requested review from @pskorupa

  • Janis Altherr added 1 commit

    added 1 commit

    Compare with previous version

  • Janis Altherr reset approvals from @pedropombeiro by pushing to the branch

    reset approvals from @pedropombeiro by pushing to the branch

  • Piotr Skorupa approved this merge request

    approved this merge request

  • Janis Altherr added 3803 commits

    added 3803 commits

    • a94e0c49...d168e5f2 - 3802 commits from branch master
    • 6c167333 - Merge branch 'master' into '416493-expose-the-versioned-pages-site-url-during-the-ci-build'

    Compare with previous version

  • Janis Altherr reset approvals from @pskorupa by pushing to the branch

    reset approvals from @pskorupa by pushing to the branch

  • Janis Altherr added 1 commit

    added 1 commit

    Compare with previous version

  • Janis Altherr added 1 commit

    added 1 commit

    • 08f2cdec - Disable code coverage test for overriden method

    Compare with previous version

  • Janis Altherr requested review from @pskorupa

    requested review from @pskorupa

  • requested review from @pedropombeiro

  • Piotr Skorupa approved this merge request

    approved this merge request

  • approved this merge request

  • Pedro Pombeiro (OOO from Feb 17th-21st) enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • resolved all threads

  • Pedro Pombeiro (OOO from Feb 17th-21st) added this merge request to the merge train at position 2

    added this merge request to the merge train at position 2

  • Pedro Pombeiro (OOO from Feb 17th-21st) removed this merge request from the merge train because the pipeline did not succeed. Learn more.

    removed this merge request from the merge train because the pipeline did not succeed. Learn more.

  • Janis Altherr enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • Janis Altherr mentioned in commit 5ac69f51

    mentioned in commit 5ac69f51

  • added workflowstaging label and removed workflowcanary label

  • Janis Altherr mentioned in commit 1221635a

    mentioned in commit 1221635a

  • Janis Altherr mentioned in merge request !175216 (closed)

    mentioned in merge request !175216 (closed)

  • mentioned in issue #508608 (closed)

  • Janis Altherr mentioned in merge request !175256 (merged)

    mentioned in merge request !175256 (merged)

  • mentioned in issue #513154 (closed)

  • Alisa Frunza mentioned in merge request !178174 (merged)

    mentioned in merge request !178174 (merged)

  • Janis Altherr mentioned in merge request !178987 (merged)

    mentioned in merge request !178987 (merged)

  • Please register or sign in to reply
    Loading