Skip to content

Add frontend files for GitLab Pages Pipeline Wizard

Janis Altherr requested to merge prepare-pages-for-pipeline-wizard into master

What does this MR do and why?

This commit introduces two changes:

  1. the frontend files needed for an onboarding view for Pages that will enable the user to configure their .gitlab-ci.yml file directly in the UI.
  2. A GraphQL Mutation that enables the frontend to toggle the onboarding_complete setting in project_pages_metadata

Note: These interfaces are not yet visible to the user as Rails does not yet render the /new path. !78276 (merged) will subsequently introduce this. This MR is to reduce the MR size of !78276 (merged).

Screenshots or screen recordings

Note: These interfaces are not yet visible to the user as Rails does not yet render the /new path

Step 1

Screenshot_2022-06-23_at_15.19.43

Step 2

Screenshot_2022-06-23_at_15.19.59

Step 3

Screenshot_2022-06-23_at_15.18.29

Step 4 (Commit step)

Screenshot_2022-06-23_at_15.19.24

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Note that this MR does not yet expose the new feature. To validate, I recommend checking out the follow-up MR !78276 (merged). See the detailed steps below:

  1. check out the use-pipeline-wizard-for-pages branch

  2. Enable the feature flag with echo "Feature.enable(:use_pipeline_wizard_for_pages)" | rails c

  3. Open a repository that you have owner access to.

  4. Go to Settings > Pages.

  5. Use the Pipeline wizard, click "commit" at the end

  6. See the page reloading to waiting state

  7. Confirm the waiting state is still there after a page reload

  8. If you

    • have your runner set up correctly
    • work in an actual static site app repo (e.g. an Astro app)
    • and have used actual, real settings during the wizard set up a page reload will show the pages settings after reload instead of the "waiting" view.

    alternatively, simulate a successful deploy with the console by running rails c, then:

    project = Project.find(<project-id>)
    project.pages_metadatum.update(deployed: true)

    (note that this will not actually deploy your pages site)

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Janis Altherr

Merge request reports