[gnome-build-meta/alatiera/push-master: 6/12] .gitlab-ci.yml: only push the for the current arch/flatpak branch



commit 6b0e7a19325b1a58cbdf55be20f26b2afe90a30a
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Thu Sep 13 21:56:44 2018 +0100

    .gitlab-ci.yml: only push the for the current arch/flatpak branch
    
    This allows concurrent jobs for different architectures to proceed safely

 .gitlab-ci.yml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 046bcf3..352433f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -112,11 +112,14 @@ before_script:
         flatpak build-export --arch="${ARCH}" --files=files repo/ "runtimes/${runtime}" "${FLATPAK_BRANCH}"
       done
 
+    # Push only our branches to avoid races with jobs for other arches/flatpak branches
+    - BRANCHES=$(find repo/refs/heads/ -type f | grep "${ARCH}/${FLATPAK_BRANCH}" | sed s,repo/refs/heads/,,)
+
     # push the resulting runtimes to gbm.gnome.org
     # FIXME: Only push from protected branches
     - |
       if [[ ${CI_COMMIT_REF_NAME} == "staging-3-30" ]]; then
-        ostree-push/ostree-push.sh --repo repo/ gbm-builder.gnome.org:public_html/repo/
+        ostree-push/ostree-push.sh --repo repo/ gbm-builder.gnome.org:public_html/repo/ ${BRANCHES}
       fi
 
   # Store all the downloaded git and ostree repos in the distributed cache.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]