[gnome-build-meta/alatiera/ci-push] CI: only push from protected branches
- From: Jordan Petridis <jpetridis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/alatiera/ci-push] CI: only push from protected branches
- Date: Thu, 20 Sep 2018 18:11:55 +0000 (UTC)
commit f52f1ab4328ef35c06d7716c83e8e61872b64a7f
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 | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c24dcbb..b0270ec 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -104,10 +104,11 @@ before_script:
- 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
+ if [ -n "$GITLAB_SSH_KEY" ]; then
rsync -a repo/ gbm-builder.gnome.org:incoming/repo-${CI_JOB_ID}
ssh gbm-builder.gnome.org flatpak-export/export-flatpak.sh incoming/repo-${CI_JOB_ID} ${BRANCHES}
ssh gbm-builder.gnome.org rm -rf incoming/runtimes-${CI_JOB_ID}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]