From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp61.i.mail.ru (smtp61.i.mail.ru [217.69.128.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id A4693445320 for ; Thu, 16 Jul 2020 13:11:52 +0300 (MSK) From: "Alexander V. Tikhonov" Date: Thu, 16 Jul 2020 13:11:50 +0300 Message-Id: Subject: [Tarantool-patches] [PATCH v1] gitlab-ci: set cleanup based on docker for all List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kirill Yukhin , Alexander Turenko Cc: tarantool-patches@dev.tarantool.org Set cleanup based on docker for all of the jobs to avoid of fails when the job before change could use docker and reassigned the temporary files in the working directory. If the docker is not available than no need to use it for cleanup and cleanup runs using shell. Follows up #5036 --- Github: https://github.com/tarantool/tarantool/tree/avtikhon/cleanup_gitlab-perf Issue: https://github.com/tarantool/tarantool/issues/5036 .gitlab-ci.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ba88a26a9..1e6904eb6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,13 +9,9 @@ variables: GIT_CLEAN_COMMAND: "git clean -ffdx && git submodule foreach git clean -ffdx && git submodule foreach git status" GIT_CLEAN_FLAGS: none -.shell_before_script_template: &shell_cleanup_script - before_script: - - /bin/bash -c "${GIT_CLEAN_COMMAND}" - .docker_before_script_template: &docker_cleanup_script before_script: - - docker run -w /source -v ${PWD}:/source -i packpack/packpack:el-7 /bin/bash -c "${GIT_CLEAN_COMMAND}" + - /bin/bash -c "docker run -w /source -v ${PWD}:/source -i packpack/packpack:el-7 /bin/bash -c \"${GIT_CLEAN_COMMAND}\" || ( ${GIT_CLEAN_COMMAND} )" # Jobs templates @@ -46,14 +42,14 @@ variables: stage: test tags: - docker_test - <<: *shell_cleanup_script + <<: *docker_cleanup_script .docker_test_clang8_template: &docker_test_clang8_definition image: "${CI_REGISTRY}/${CI_PROJECT_PATH}/testing/debian-buster:latest" stage: test tags: - docker_test - <<: *shell_cleanup_script + <<: *docker_cleanup_script .pack_template: &pack_definition <<: *pack_only_definition @@ -93,7 +89,7 @@ variables: .osx_template: &osx_definition stage: test - <<: *shell_cleanup_script + <<: *docker_cleanup_script script: - ${GITLAB_MAKE} test_osx @@ -114,14 +110,14 @@ variables: paths: - "*_result.txt" - "*_t_version.txt" - <<: *shell_cleanup_script + <<: *docker_cleanup_script script: - ${GITLAB_MAKE} perf_run .perf_cleanup_definition: &perf_cleanup_definition <<: *perf_only_definition stage: cleanup - <<: *shell_cleanup_script + <<: *docker_cleanup_script script: - ${GITLAB_MAKE} perf_cleanup @@ -216,7 +212,7 @@ perf_bootstrap: stage: test tags: - deploy - <<: *shell_cleanup_script + <<: *docker_cleanup_script script: - ${GITLAB_MAKE} perf_prepare after_script: -- 2.17.1