[commit: ghc] wip/cleanup-darwin: gitlab-ci: Use build cleanup logic on Darwin as well (26f9681)
git at git.haskell.org
git at git.haskell.org
Mon Jan 21 15:57:00 UTC 2019
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/cleanup-darwin
Link : http://ghc.haskell.org/trac/ghc/changeset/26f9681dba0de127d0da8318af6486ed1c78e6d3/ghc
>---------------------------------------------------------------
commit 26f9681dba0de127d0da8318af6486ed1c78e6d3
Author: Ben Gamari <ben at smart-cactus.org>
Date: Mon Jan 21 10:55:48 2019 -0500
gitlab-ci: Use build cleanup logic on Darwin as well
We use the shell executor on Darwin as well as Windows.
See https://gitlab.com/gitlab-org/gitlab-runner/issues/3856.
>---------------------------------------------------------------
26f9681dba0de127d0da8318af6486ed1c78e6d3
.gitlab-ci.yml | 23 ++++++++++++++++++++---
1 file changed, 20 insertions(+), 3 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 162c19c..28c5a7b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -369,8 +369,8 @@ validate-x86_64-windows:
tags:
- x86_64-windows
-# Note [Cleanup on Windows]
-# ~~~~~~~~~~~~~~~~~~~~~~~~~
+# Note [Cleaning up after shell executor]
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# As noted in [1], gitlab-runner's shell executor doesn't clean up its working
# directory after builds. Unfortunately, we are forced to use the shell executor
@@ -380,7 +380,7 @@ validate-x86_64-windows:
#
# [1] https://gitlab.com/gitlab-org/gitlab-runner/issues/3856
-# See Note [Cleanup on Windows]
+# See Note [Cleanup after shell executor]
cleanup-windows:
stage: cleanup
tags:
@@ -398,6 +398,23 @@ cleanup-windows:
- rmdir /S /Q %BUILD_DIR%/*
- exit /b 0
+# See Note [Cleanup after shell executor]
+cleanup-darwin:
+ stage: cleanup
+ tags:
+ - x86_64-darwin
+ when: always
+ before_script:
+ - echo "Time to clean up"
+ script:
+ - echo "Let's go"
+ after_script:
+ - BUILD_DIR=$CI_PROJECT_DIR
+ - echo "Cleaning $BUILD_DIR"
+ - cd $HOME
+ - rm -Rf $BUILD_DIR
+ - exit 0
+
############################################################
# Validation via CircleCI
############################################################
More information about the ghc-commits
mailing list