[gnome-tour/alatiera/update-ci-template] ci: Update to use the CI Template
- From: Jordan Petridis <jpetridis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-tour/alatiera/update-ci-template] ci: Update to use the CI Template
- Date: Mon, 27 Jan 2020 16:48:28 +0000 (UTC)
commit cfcef3517afb158c8331377ec2ac794d6ed57987
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 | 87 ++++++++++------------------------------------------------
1 file changed, 14 insertions(+), 73 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2ccdd86..093dc84 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,83 +1,24 @@
-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'
# 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]