Run e2e smoke tests on GDK in master and MRs
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 totrue
(oryes
or1
) 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 toe2e: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.
- In that child pipeline
Tests of the pipeline changes
Jobs not included when QA_RUN_TESTS_ON_GDK
wasn't set:
- In this MR: https://gitlab.com/gitlab-org/gitlab/-/pipelines/779253535
- In !111999 (closed) which forces the docker image build job to run in the MR (instead of only in a sheduled pipeline): https://gitlab.com/gitlab-org/gitlab/-/pipelines/779255267
Jobs included when the variable is set:
- In this MR: https://gitlab.com/gitlab-org/gitlab/-/pipelines/779256730
- In !111999 (closed): https://gitlab.com/gitlab-org/gitlab/-/pipelines/779256752
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.
-
I have evaluated the MR acceptance checklist for this MR.