From ae01de893d940cc061ebe5336c65236ddcd401f7 Mon Sep 17 00:00:00 2001 From: William Salmon Date: Fri, 24 Jul 2020 09:11:51 +0100 Subject: Create template for remote tests This moves boiler plate for remote tests in to a template to make maintenance easier. --- .gitlab-ci.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to '.gitlab-ci.yml') diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 25b426b3d..58a6ed3c3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -171,10 +171,9 @@ tests-fedora-update-deps: - su buildstream -c "${TEST_COMMAND}" -tests-remote-execution: +.compose-test-boilerplate: &remote-test allow_failure: true image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:31-${DOCKER_IMAGE_VERSION} - <<: *tests before_script: - dnf install -y docker docker-compose - docker-compose --file ${COMPOSE_MANIFEST} up --detach @@ -184,6 +183,10 @@ tests-remote-execution: - docker-compose --file ${COMPOSE_MANIFEST} down services: - docker:stable-dind + +tests-remote-execution: + <<: *tests + <<: *remote-test variables: DOCKER_HOST: tcp://docker:2375 DOCKER_DRIVER: overlay2 @@ -196,18 +199,8 @@ tests-remote-execution: PYTEST_ARGS: "--color=yes --remote-execution" tests-remote-cache: - allow_failure: true - image: registry.gitlab.com/buildstream/buildstream-docker-images/testsuite-fedora:31-${DOCKER_IMAGE_VERSION} <<: *tests - before_script: - - dnf install -y docker docker-compose - - docker-compose --file ${COMPOSE_MANIFEST} up --detach - after_script: - - docker-compose --file ${COMPOSE_MANIFEST} stop - - docker-compose --file ${COMPOSE_MANIFEST} logs - - docker-compose --file ${COMPOSE_MANIFEST} down - services: - - docker:stable-dind + <<: *remote-test variables: DOCKER_HOST: tcp://docker:2375 DOCKER_DRIVER: overlay2 -- cgit v1.2.1