Reimplement Flatpak publishing

This commit is contained in:
Georges Basile Stavracas Neto
2019-09-30 12:19:06 -03:00
parent 18814e014d
commit c3fb16bb1b
+17 -53
View File
@@ -1,74 +1,38 @@
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
variables:
GIT_SUBMODULE_STRATEGY: normal
BUNDLE: "org.gnome.Calendar.Devel.flatpak"
stages:
- flatpak
- deploy
- review
variables:
# File name of the resulting Flatpak bundle
BUNDLE: "gnome-calendar-git.flatpak"
flatpak:
flatpak:master:
extends: .flatpak
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
stage: flatpak
variables:
# Replace with your manifest path
MANIFEST_PATH: "build-aux/flatpak/org.gnome.Calendar.json"
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
# Replace with your application name, as written in the manifest
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
FLATPAK_MODULE: "gnome-calendar"
# Make sure to keep this in sync with the Flatpak manifest, all arguments
# are passed except the config-args because we build it ourselves
MESON_ARGS: "-Dtracing=true -Dprofile=development"
APP_ID: "org.gnome.Calendar.Devel"
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}
# Generate a Flatpak bundle
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID}
# Run automatic tests inside the Flatpak env
- xvfb-run -a -s "-screen 0 1024x768x24" flatpak build app ninja -C _build test
artifacts:
paths:
- ${BUNDLE}
- _build/meson-logs/meson-log.txt
- _build/meson-logs/testlog.txt
expire_in: 30 days
cache:
paths:
- .flatpak-builder/cache
review:
extends: .review
stage: review
dependencies:
- flatpak
script:
- echo "Generating flatpak deployment"
artifacts:
paths:
- ${BUNDLE}
expire_in: 20 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/gnome-calendar
- tags
- flatpak:master
stop_review:
extends: .stop_review
stage: review
script:
- echo "Stopping flatpak deployment"
when: manual
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
except:
- master@GNOME/gnome-calendar
- tags
flatpak:nightly:
extends: .publish_nightly
dependencies:
- flatpak:master