File tree Expand file tree Collapse file tree 3 files changed +42
-3
lines changed Expand file tree Collapse file tree 3 files changed +42
-3
lines changed Original file line number Diff line number Diff line change 39
39
script :
40
40
- pip3 install tox
41
41
- tox -e py_func_v4
42
+ - stage : test
43
+ name : cli_func_nightly
44
+ dist : bionic
45
+ python : 3.8
46
+ env : GITLAB_TAG=nightly
47
+ script :
48
+ - pip3 install tox
49
+ - tox -e cli_func_v4
50
+ - stage : test
51
+ name : py_func_nightly
52
+ dist : bionic
53
+ python : 3.8
54
+ env : GITLAB_TAG=nightly
55
+ script :
56
+ - pip3 install tox
57
+ - tox -e py_func_v4
42
58
- stage : test
43
59
name : docs
44
60
dist : bionic
67
83
script :
68
84
- pip3 install tox
69
85
- tox -e py38
86
+ allow_failures :
87
+ - env : IMAGE_TAG=nightly
Original file line number Diff line number Diff line change @@ -156,6 +156,26 @@ To run these tests:
156
156
# run the python API tests:
157
157
./tools/py_functional_tests.sh
158
158
159
+ By default, the tests run against the ``gitlab/gitlab-ce:latest `` image. You can
160
+ override both the image and tag with the ``-i `` and ``-t `` options, or by providing
161
+ either the ``GITLAB_IMAGE `` or ``GITLAB_TAG `` environment variables.
162
+
163
+ This way you can run tests against different versions, such as ``nightly `` for
164
+ features in an upcoming release, or an older release (e.g. ``12.8.0-ce.0 ``).
165
+ The tag must match an exact tag on Docker Hub:
166
+
167
+ .. code-block :: bash
168
+
169
+ # run tests against `nightly` or specific tag
170
+ ./tools/py_functional_tests.sh -t nightly
171
+ ./tools/py_functional_tests.sh -t 12.8.0-ce.0
172
+
173
+ # run tests against the latest gitlab EE image
174
+ ./tools/py_functional_tests.sh -i gitlab/gitlab-ee
175
+
176
+ # override tags with environment variables
177
+ GITLAB_TAG=nightly ./tools/py_functional_tests.sh
178
+
159
179
You can also build a test environment using the following command:
160
180
161
181
.. code-block :: bash
Original file line number Diff line number Diff line change @@ -28,14 +28,15 @@ try() { "$@" || fatal "'$@' failed"; }
28
28
REUSE_CONTAINER=
29
29
NOVENV=
30
30
API_VER=4
31
- GITLAB_IMAGE=" gitlab/gitlab-ce"
32
- GITLAB_TAG=" latest"
31
+ GITLAB_IMAGE=" ${GITLAB_IMAGE :- gitlab/ gitlab-ce} "
32
+ GITLAB_TAG=" ${GITLAB_TAG :- latest} "
33
33
VENV_CMD=" python3 -m venv"
34
- while getopts :knp:a: opt " $@ " ; do
34
+ while getopts :knp:a:i:t: opt " $@ " ; do
35
35
case $opt in
36
36
k) REUSE_CONTAINER=1;;
37
37
n) NOVENV=1;;
38
38
a) API_VER=$OPTARG ;;
39
+ i) GITLAB_IMAGE=$OPTARG ;;
39
40
t) GITLAB_TAG=$OPTARG ;;
40
41
:) fatal " Option -${OPTARG} requires a value" ;;
41
42
' ?' ) fatal " Unknown option: -${OPTARG} " ;;
You can’t perform that action at this time.
0 commit comments