[gnome-tour/alatiera/update-ci-template] ci: update to use the CI Template



commit bfa7f8e23b33c69aab2069579c0943470c872b22
Author: Jordan Petridis <jpetridis gnome org>
Date:   Mon Jan 27 16:48:14 2020 +0000

    ci: update to use the CI Template
    
    https://gitlab.gnome.org/GNOME/Initiatives/wikis/DevOps-with-Flatpak
    
    Close #5

 .gitlab-ci.yml | 91 +++++++++++-----------------------------------------------
 1 file changed, 17 insertions(+), 74 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2ccdd86..d9994a9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,83 +1,27 @@
-stages:
-  - lint
-  - test
-  - review
-
-variables:
-    BUNDLE: "gnome-tour-nightly.flatpak"
+include:
+  - project: 'gnome/citemplates'
+    file: 'flatpak/flatpak-ci-initiative-sdk-extensions.yml'
+    # ref: ''
 
 flatpak:
-    image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
-    stage: "test"
-    variables:
-        MANIFEST_PATH: "build-aux/org.gnome.TourDevel.json"
-        FLATPAK_MODULE: "gnome-tour"
-        MESON_ARGS: "-Dprofile=development"
-        APP_ID: "org.gnome.TourDevel"
-
-    script:
-        - flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
-        # Build the flatpak repo
-        - flatpak-builder --run app ${MANIFEST_PATH} meson --prefix=/app ${MESON_ARGS} _build
-        - flatpak-builder --run app ${MANIFEST_PATH} ninja -C _build install
-
-        # Run the tests
-        - flatpak-builder --finish-only app ${MANIFEST_PATH}
-        - >
-          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
-
-        # Create a flatpak bundle
-        - flatpak build-export repo app
-        - flatpak build-bundle repo ${BUNDLE} ${APP_ID}
-
-    artifacts:
-        paths:
-            - $BUNDLE
-        expire_in: 5 days
-
-    cache:
-        key: "flatpak"
-        paths:
-          - .flatpak-builder/downloads/
-          - .flatpak-builder/git/
-          - target/
-          - target_test/
-
-review:
-    stage: review
-    dependencies:
-        - flatpak
-    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
-
-stop_review:
-    stage: review
-    script:
-        - echo "Stopping flatpak deployment"
-    when: manual
-    environment:
-        name: review/$CI_COMMIT_REF_NAME
-        action: stop
+  image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master'
+  variables:
+    BUNDLE: "org.gnome.TourDevel.flatpak"
+    MANIFEST_PATH: "build-aux/org.gnome.TourDevel.json"
+    FLATPAK_MODULE: "gnome-tour"
+    MESON_ARGS: "-Dprofile=development"
+    APP_ID: "org.gnome.TourDevel"
+    RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo";
+  extends: '.flatpak'
+
+nightly:
+  extends: '.publish_nightly'
 
 # Configure and run rustfmt
 # Exits and builds fails if on bad format
 rustfmt:
   image: "rust:slim"
-  stage: "lint"
+  stage: ".pre"
   script:
     - rustup component add rustfmt
     # Create blank versions of our configured files
@@ -87,4 +31,3 @@ rustfmt:
     - rustc -Vv && cargo -Vv
     - cargo fmt --version
     - cargo fmt --all -- --color=always --check
-


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