[fractal/bilelmoussaoui/ci-nightly: 14/17] Gitlab CI: use template
- From: Jordan Petridis <jpetridis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [fractal/bilelmoussaoui/ci-nightly: 14/17] Gitlab CI: use template
- Date: Fri, 27 Sep 2019 14:22:47 +0000 (UTC)
commit 068d1512c3b325e9f82e0843ee24ad2d093a9868
Author: Bilal Elmoussaoui <bil elmoussaoui gmail com>
Date: Mon Sep 23 10:14:29 2019 +0000
Gitlab CI: use template
This allows publishing nightlies.
.gitlab-ci.yml | 76 +++++++++++++---------------------------------------------
1 file changed, 16 insertions(+), 60 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a5831786..8afd85ef 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,14 +1,11 @@
+include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
+
stages:
- check
- - test
- - review
- deploy
variables:
BUNDLE: "org.gnome.FractalDevel.flatpak"
- MANIFEST_PATH: "flatpak/org.gnome.Fractal.json"
- FLATPAK_MODULE: "fractal"
- DBUS_ID: "org.gnome.FractalDevel"
.flatpak_cache_template: &flatpak_cache
cache:
@@ -32,66 +29,25 @@ check:
- cargo fmt --all -- --check
flatpak:
- image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
- stage: "test"
- script:
- - flatpak-builder --stop-at=${FLATPAK_MODULE} --force-clean app ${MANIFEST_PATH}
-
- # Build the flatpak repo
- - flatpak-builder --run app ${MANIFEST_PATH} meson --prefix=/app -Dprofile=development _build
- - flatpak-builder --run app ${MANIFEST_PATH} ninja -C _build install
-
- # Run the tests
- - |
- xvfb-run -a -s "-screen 0 1024x768x24" \
- flatpak-builder --run \
- --env=CARGO_HOME="target/cargo-home" \
- --env=CARGO_TARGET_DIR="target_test/" \
- app ${MANIFEST_PATH} \
- ninja -C _build test
-
- # Create a flatpak bundle
- - flatpak-builder --finish-only app ${MANIFEST_PATH}
- - flatpak build-export repo app
- - flatpak build-bundle repo ${BUNDLE} ${DBUS_ID}
-
- artifacts:
- paths:
- - "${BUNDLE}"
- expire_in: 2 days
- <<: *flatpak_cache
-
+ extends: '.flatpak'
+ image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
+ variables:
+ RUNTIME_REPO: 'https://nightly.gnome.org/gnome-nightly.flatpakrepo'
+ MANIFEST_PATH: "flatpak/org.gnome.Fractal.json"
+ FLATPAK_MODULE: "fractal"
+ APP_ID: "org.gnome.FractalDevel"
+ MESON_ARGS: '-Dprofile=development'
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
- except:
- - master@GNOME/fractal
- - tags
+ dependencies:
+ - 'flatpak'
+ extends: '.review'
stop_review:
- stage: review
- script:
- - echo "Stopping flatpak deployment"
- when: manual
- environment:
- name: "review/${CI_COMMIT_REF_NAME}"
- action: stop
- except:
- - master@GNOME/fractal
- - tags
+ extends: '.stop_review'
+nightly:
+ extends: '.publish_nightly'
pages:
image: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/rust_bundle:master"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]