Skip to content

Run e2e smoke tests on GDK in master and MRs

Mark Lapierre requested to merge ml-run-e2e-tests-on-gdk into master

What does this MR do and why?

Runs the QA e2e smoke tests using GDK in docker, in scheduled master and MR pipelines (like package-and-test).

  • Adds CI config to build images and run tests on master and in MRs
  • Resets admin password on first use before setting license via the API

Closes #383318 (closed)

Pipeline changes

  • A CI variable QA_RUN_TESTS_ON_GDK must be set to true (or yes or 1) otherwise the following jobs won't be included. I've added the variable (in https://gitlab.com/gitlab-org/gitlab/-/settings/ci_cd) but it can be removed (or edited) to disable the new pipeline and jobs
  • build-qa-on-gdk-master-image will run in master scheduled pipelines as per the rules specified in .build-images:rules:build-qa-on-gdk-master-image. It creates a docker image with GDK installed and updated so that it's ready to be used in MRs.
  • e2e:test-on-gdk is a new child pipeline that will run the e2e smoke tests in MRs, similar to e2e:package-and-test, but it will also run in scheduled master pipelines (to confirm that the docker image passes the tests on master).
    • In that child pipeline test-on-gdk-smoke will run the smoke tests automatically, allowed to fail.
    • test-on-gdk-full includes manual jobs that can be triggered to run the full suite.

Tests of the pipeline changes

Jobs not included when QA_RUN_TESTS_ON_GDK wasn't set:

Jobs included when the variable is set:

How to set up and validate locally

If docker is running via a VM (e.g., on a Mac), make sure it has at least 8gb memory available.

You might also need to increase fs.inotify.max_user_watches, e.g.:

sysctl -n -w fs.inotify.max_user_watches=524288

You can build and run the docker image using the following commands:

> docker build --add-host gdk.test:127.0.0.1 -t tests-on-gdk -f qa/gdk/Dockerfile .
> docker run --add-host gdk.test:127.0.0.1 --shm-size=2gb \
    --volume /var/run/docker.sock:/var/run/docker.sock:z \
    tests-on-gdk ml-run-e2e-tests-on-gdk "--tag smoke"

Note: several environment variables are needed to get all the tests to pass, but without them enough should pass to confirm that it's running.

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 Mark Lapierre

Merge request reports

Loading