diff --git a/.renovaterc.json b/.renovaterc.json index ea63c6cef..29fffb8f5 100644 --- a/.renovaterc.json +++ b/.renovaterc.json @@ -23,6 +23,17 @@ "depNameTemplate": "gitlab/gitlab-ee", "datasourceTemplate": "docker", "versioningTemplate": "loose" + }, + { + "fileMatch": [ + "(^|/)tests\\/functional\\/fixtures\\/\\.env$" + ], + "matchStrings": [ + "GITLAB_RUNNER_TAG=(?.*?)\n" + ], + "depNameTemplate": "gitlab/gitlab-runner", + "datasourceTemplate": "docker", + "versioningTemplate": "loose" } ], "packageRules": [ diff --git a/tests/functional/cli/test_cli_artifacts.py b/tests/functional/cli/test_cli_artifacts.py index f0e6f213f..589486844 100644 --- a/tests/functional/cli/test_cli_artifacts.py +++ b/tests/functional/cli/test_cli_artifacts.py @@ -1,3 +1,4 @@ +import logging import subprocess import textwrap import time @@ -24,12 +25,22 @@ @pytest.fixture(scope="module") def job_with_artifacts(gitlab_runner, project): + start_time = time.time() + project.files.create(data) jobs = None while not jobs: time.sleep(0.5) jobs = project.jobs.list(scope="success") + if time.time() - start_time < 60: + continue + logging.error("job never succeeded") + for job in project.jobs.list(): + job = project.jobs.get(job.id) + logging.info(f"{job.status} job: {job.pformat()}") + logging.info(f"job log:\n{job.trace()}\n") + pytest.fail("Fixture 'job_with_artifact' failed") return project.jobs.get(jobs[0].id) diff --git a/tests/functional/fixtures/.env b/tests/functional/fixtures/.env index f333de1a1..b687e0add 100644 --- a/tests/functional/fixtures/.env +++ b/tests/functional/fixtures/.env @@ -1,2 +1,4 @@ GITLAB_IMAGE=gitlab/gitlab-ee GITLAB_TAG=17.7.1-ee.0 +GITLAB_RUNNER_IMAGE=gitlab/gitlab-runner +GITLAB_RUNNER_TAG=v17.7.1 diff --git a/tests/functional/fixtures/docker-compose.yml b/tests/functional/fixtures/docker-compose.yml index e79fdf06a..550ec156c 100644 --- a/tests/functional/fixtures/docker-compose.yml +++ b/tests/functional/fixtures/docker-compose.yml @@ -45,7 +45,7 @@ services: - gitlab-network gitlab-runner: - image: gitlab/gitlab-runner:latest + image: '${GITLAB_RUNNER_IMAGE}:${GITLAB_RUNNER_TAG}' container_name: 'gitlab-runner-test' depends_on: - gitlab diff --git a/tox.ini b/tox.ini index dd691879f..c8b0f71ec 100644 --- a/tox.ini +++ b/tox.ini @@ -21,6 +21,8 @@ passenv = GITHUB_WORKSPACE GITLAB_IMAGE GITLAB_TAG + GITLAB_RUNNER_IMAGE + GITLAB_RUNNER_TAG NO_COLOR PWD PY_COLORS