Enable gitlab_pages to package-and-qa
What does this MR do and why?
Enable gitlab_pages to package-and-qa so we are able to run Pages E2E Tests against it.
- We add a new scenario called 'gitlab-pages' to which those tagged
gitlab_pages
will run tests against. - we enabled Pages
- Add an entry to the host file of the gitlab instance inside the test instance, so that the test instance will be able to access the external page
Related Gitlab MR: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/98860 to enable the Spec.
How to set up and validate locally
On CI/CD:
You can also checkout a test branch and edit the Gemfile
to change to the gitlab-qa
line to install via the Gitlab-QA branch.
in the qa/gemfile
:
gem 'gitlab-qa', git: 'https://gitlab.com/gitlab-org/gitlab-qa.git', branch: 'jz-enable-gitlab-pages'
Make sure to also bundle install
and commit the Gemfile.lock
as well.
Make a new draft MR.
Set that draft MR to check the status of the pipeline.
In the pipeline, check the ee:gitlab-pages
from the package-and-qa
job and make sure it's running the correct spec and passes
Proof of successful running ee:gitlab-pages job: https://gitlab.com/gitlab-org/gitlab/-/jobs/3199909502
Locally:
Alternatively - build the docker image locally of the Gitlab MR of jz-update-gl-pages-e2e-spec
.
From gdk/gitlab
run docker build -t gitlab/gitlab-ce-qa:jason-test --file ./qa/Dockerfile ./
use the QA_IMAGE of (GitlabPages) to test with the updated image to make sure it gets picked up https://gitlab.com/gitlab-org/gitlab-qa/-/blob/master/docs/what_tests_can_be_run.md#specifying-the-gitlab-qa-image-to-use
Run the qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb
Alternatively:
When the existing MR gets merged in:
bundle exec ./exe/gitlab-qa Test::Integration::GitlabPages EE --no-teardown -- qa/specs/features/browser_ui/3_create/pages/new_static_page_spec.rb
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.