Tarantool development patches archive
 help / color / mirror / Atom feed
From: "Alexander V. Tikhonov" <avtikhon@tarantool.org>
To: Kirill Yukhin <kyukhin@tarantool.org>,
	Alexander Turenko <alexander.turenko@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org
Subject: [Tarantool-patches] [PATCH v1] gitlab-ci: set cleanup based on docker for all
Date: Thu, 16 Jul 2020 13:11:50 +0300	[thread overview]
Message-ID: <eb09e1ec17ee1fb3c21abc2d10736ab4cfb62851.1594816569.git.avtikhon@tarantool.org> (raw)

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

             reply	other threads:[~2020-07-16 10:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-16 10:11 Alexander V. Tikhonov [this message]
2020-07-22  6:46 Alexander V. Tikhonov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eb09e1ec17ee1fb3c21abc2d10736ab4cfb62851.1594816569.git.avtikhon@tarantool.org \
    --to=avtikhon@tarantool.org \
    --cc=alexander.turenko@tarantool.org \
    --cc=kyukhin@tarantool.org \
    --cc=tarantool-patches@dev.tarantool.org \
    --subject='Re: [Tarantool-patches] [PATCH v1] gitlab-ci: set cleanup based on docker for all' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox