[citemplates/alatiera/publish_beta] flatpak: add a publish_beta template job




commit 1b6f041bb16b1dfacda6be9bb3c62821f257201f
Author: Jordan Petridis <jordan centricular com>
Date:   Fri Aug 20 23:44:30 2021 +0300

    flatpak: add a publish_beta template job
    
    This is not meant to be used as part of every CI pipeline, but
    instead on special occasions like when tagging a beta release.
    
    Ideally there are special requirments for pushing to flathub-beta
    that you need to make sure you follow if you want to use this.
    Whats needed is the following:
    
    * Ask a sysadmin to add a FLATHUB_BETA_TOKEN to your project and
      make sure your branch is protected
    * Make sure you application depends on a runtime found in Flathub
      or Flathub beta. You shouldn't use this with the Nightly runtime.
    * Make sure your 'branch' in the Flatpak manifest is beta
    * Change only: and when: yaml keys to fit your needs
    
    Close #6

 flatpak/flatpak_ci_initiative.yml | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)
---
diff --git a/flatpak/flatpak_ci_initiative.yml b/flatpak/flatpak_ci_initiative.yml
index 2d75351..c8b2913 100644
--- a/flatpak/flatpak_ci_initiative.yml
+++ b/flatpak/flatpak_ci_initiative.yml
@@ -78,3 +78,41 @@
       - $CI_DEFAULT_BRANCH
     variables:
       - $REPO_TOKEN
+
+# This is not meant to be used as part of every CI pipeline, but
+# instead on special occasions like when tagging a beta release.
+#
+# Ideally there are special requirments for pushing to flathub-beta
+# that you need to make sure you follow if you want to use this.
+# Whats needed is the following:
+#
+# * Ask a sysadmin to add a FLATHUB_BETA_TOKEN to your project and
+#   make sure your branch is protected
+# * Make sure you application depends on a runtime found in Flathub
+#   or Flathub beta. You shouldn't use this with the Nightly runtime.
+# * Make sure your 'branch' in the Flatpak manifest is beta
+# * Change only: and when: yaml keys to fit your needs
+.publish_beta:
+  image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/flat-manager-client'
+  stage: 'deploy'
+  timeout: '100m'
+  script:
+    - tar xf repo.tar
+    - export REPO_TOKEN=$FLATHUB_BETA_TOKEN
+    - flatpak build-update-repo --generate-static-deltas repo/
+    - BUILD_ID=$(flat-manager-client create ${FLAT_MANAGER_URL} ${FLATPAK_REPO})
+    - flat-manager-client push --commit --publish --wait ${BUILD_ID} repo/ || result=$?
+    - flat-manager-client purge ${BUILD_ID}
+    - exit $result
+  when: 'manual'
+  variables:
+    FLAT_MANAGER_URL: 'https://hub.flathub.org'
+    FLATPAK_REPO: 'beta'
+  only:
+    refs:
+      - 'master'
+      - 'main'
+      - 'mainline'
+      - $CI_DEFAULT_BRANCH
+    variables:
+      - $FLATHUB_BETA_TOKEN


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