[geary/wip/794700-lazy-load-conversations: 3/19] Import standard GNOME Flatpak CI config rather than copy/pasting it



commit 2c817f9ee42b9a2c1f8d7fbee403b0b953b14222
Author: Michael Gratton <mike vee net>
Date:   Wed Jan 16 11:09:40 2019 +1100

    Import standard GNOME Flatpak CI config rather than copy/pasting it

 .gitlab-ci.yml | 105 ++++++++++-----------------------------------------------
 1 file changed, 18 insertions(+), 87 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7cfb1054..f892e8de 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,10 +2,13 @@
 # Geary CI config.
 #
 
-stages:
-  - build
+include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
 
 variables:
+  # Flatpak CI vars
+  BUNDLE: geary-dev.flatpak
+
+  # Build
   BUILD_DIR: build
   CONFIG_CMD: meson --buildtype=debug build
   BUILD_CMD: ninja -v -C $BUILD_DIR
@@ -31,18 +34,6 @@ variables:
                libmessaging-menu-dev libunity-dev libjson-glib-dev
   UBUNTU_TEST_DEPS: xauth xvfb
 
-  # Flatpak vars
-  APP_ID: org.gnome.Geary
-  BUNDLE: geary-dev.flatpak
-  FLATPAK_MODULE: geary
-  GIT_SUBMODULE_STRATEGY: normal
-  MANIFEST_PATH: org.gnome.Geary.json
-  RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo";
-
-stages:
-  - build
-  - deploy
-
 fedora:
   stage: build
   image: fedora:latest
@@ -78,80 +69,20 @@ deb-package:
 
 flatpak:
   image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
-  stage: 'build'
-  script:
-    - flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
-    # Make sure to keep this in sync with the Flatpak manifest, all arguments
-    # are passed except the config-args because we build it ourselves
-    - flatpak build app meson --prefix=/app ${MESON_ARGS} _build
-    - flatpak build app ninja -C _build install
-    - flatpak-builder --finish-only --repo=repo app ${MANIFEST_PATH}
-    # Run automatic tests inside the Flatpak env
-    - >
-      xvfb-run -a -s "-screen 0 1024x768x24"
-      flatpak build
-      --env=LANG=C.UTF-8
-      --env=NO_AT_BRIDGE=1
-      app
-      dbus-run-session
-      meson test -C _build --no-stdsplit --print-errorlogs
-    # Generate a Flatpak bundle
-    - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID}
-  artifacts:
-    when: 'always'
-    paths:
-      - "${BUNDLE}"
-      - '_build/meson-logs/meson-log.txt'
-      - '_build/meson-logs/testlog.txt'
-    expire_in: 2 days
-  cache:
-    key: "$CI_JOB_NAME"
-    paths:
-      - '.flatpak-builder/downloads'
-      - '.flatpak-builder/git'
-  except:
-    variables:
-      # Don't run for translation commits
-      - $CI_COMMIT_TITLE =~ /^Update.*translation$/
+  variables:
+    APP_ID: org.gnome.Geary
+    FLATPAK_MODULE: geary
+    MANIFEST_PATH: org.gnome.Geary.json
+    MESON_ARGS: "-Dprofile=Devel"
+    RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo";
+  extends: .flatpak
 
 review:
-  stage: 'deploy'
-  script:
-    - echo "Generating Flatpak deployment"
-  artifacts:
-    paths:
-      - "${BUNDLE}"
-    expire_in: 30 days
-  environment:
-    name: review/$CI_COMMIT_REF_NAME
-    url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
-    on_stop: stop_review
-  except:
-    refs:
-      - 'tags'
-      # No need to run on the upstream master branch either
-      - 'master'
-      # don't run on stable branches
-      - /^gnome-\d-\d\d$/
-    variables:
-      # Don't run for translation commits
-      - $CI_COMMIT_TITLE =~ /^Update.*translation$/
+    stage: deploy
+    dependencies:
+      - flatpak
+    extends: .review
 
 stop_review:
-  stage: 'deploy'
-  script:
-    - echo "Stopping Flatpak deployment"
-  when: 'manual'
-  environment:
-    name: review/$CI_COMMIT_REF_NAME
-    action: 'stop'
-  except:
-    refs:
-      - 'tags'
-      # No need to run on the upstream master branch either
-      - 'master'
-      # don't run on stable branches
-      - /^gnome-\d-\d\d$/
-    variables:
-      # Don't run for translation commits
-      - $CI_COMMIT_TITLE =~ /^Update.*translation$/
+    stage: deploy
+    extends: .stop_review


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