[gnome-build-meta/alatiera/ci-push] CI: only push from protected branches



commit 18d0f9daf474c27f13cf9ebcbe6dc0881528ab07
Author: Jordan Petridis <jpetridis gnome org>
Date:   Sat Sep 15 14:06:23 2018 +0300

    CI: only push from protected branches
    
    This assumes that there will be no branch name collisions
    between protected branches.
    
    Close #60

 .gitlab-ci.yml | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index aa0a2d7..b82084e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -115,11 +115,12 @@ before_script:
     # 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
+    # Push the resulting runtimes to gbm.gnome.org
+    # Assume there will be no branch name collisions,
+    # the ssh key is available only on 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/ ${BRANCHES}
+      if [ -z "$GITLAB_SSH_KEY" ]; then
+        ostree-releng-scripts/rsync-repos --src repo/ --dest gbm-builder.gnome.org:public_html/repo/
       fi
 
     - ${BST} -o arch "${ARCH}" build core.bst


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