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



commit e1fc070e6bf4456ec349f67266cc654fa4b9e38a
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 22d159d..ab167b5 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]