[librsvg: 3/5] ci: Fix up ownership of cargo cache
- From: Sven Neumann <sneumann src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [librsvg: 3/5] ci: Fix up ownership of cargo cache
- Date: Thu, 29 Oct 2020 10:30:26 +0000 (UTC)
commit 371d1b3284c8fbdfa4ba6f6d97a13803a5679001
Author: Sven Neumann <sven svenfoo org>
Date:   Thu Oct 29 09:48:57 2020 +0100
    ci: Fix up ownership of cargo cache
    
    Some builds use sudo, others (namely debian:testing) don't. This
    causes problems with the cargo cache that is shared between builds.
    
    Actually we should remove the need to use sudo in any builds, but
    as a first measure fix up the ownership of the cached files in an
    after_script.
 .gitlab-ci.yml | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d4c4f84d..9c96808d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -49,6 +49,9 @@ stages:
     policy: pull
 
 .recreate_cache:
+  after_script:
+    # Fix up ownership of the cache, not all builds use sudo
+    - sudo chown -R "$(id -u):$(id -g)" ${CI_PROJECT_DIR}/cargo_cache
   cache:
     policy: pull-push
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]