[citemplates/abderrahim/repo-artifact: 1/2] start a new version of the flatpak CI template
- From: Abderrahim Kitouni <akitouni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [citemplates/abderrahim/repo-artifact: 1/2] start a new version of the flatpak CI template
- Date: Mon, 22 Jul 2019 20:21:09 +0000 (UTC)
commit 5e7b46b0d3f3ec536b2cc1a7738caa664e1a5727
Author: Abderrahim Kitouni <akitouni gnome org>
Date: Mon Jul 22 20:54:01 2019 +0100
start a new version of the flatpak CI template
We're going to introduce breaking changes
flatpak/flatpak_ci_initiative_v1.yml | 94 ++++++++++++++++++++++++++++++++++++
1 file changed, 94 insertions(+)
---
diff --git a/flatpak/flatpak_ci_initiative_v1.yml b/flatpak/flatpak_ci_initiative_v1.yml
new file mode 100644
index 0000000..65743a9
--- /dev/null
+++ b/flatpak/flatpak_ci_initiative_v1.yml
@@ -0,0 +1,94 @@
+.flatpak:
+ image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
+ stage: 'test'
+ script:
+ - flatpak-builder --stop-at=${FLATPAK_MODULE} flatpak_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 flatpak_app meson --prefix=/app ${MESON_ARGS} _build
+ - flatpak build flatpak_app ninja -C _build install
+ - flatpak-builder --finish-only --repo=repo ${BRANCH:+--default-branch=$BRANCH} flatpak_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
+ ${TEST_BUILD_ARGS}
+ flatpak_app
+ dbus-run-session
+ meson test -C _build --no-stdsplit --print-errorlogs ${TEST_RUN_ARGS}
+
+ # Generate a Flatpak bundle
+ - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH}
+ 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'
+
+.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$/
+
+.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$/
+
+.publish_nightly:
+ image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/flat-manager-client'
+ stage: 'deploy'
+ script:
+ - ostree init --repo repo --mode archive
+ - |
+ for BUNDLE in ${BUNDLES}; do
+ flatpak build-import-bundle repo ${BUNDLE}
+ done
+
+ - BUILD_ID=$(flat-manager-client create ${FLAT_MANAGER_URL} ${FLATPAK_REPO})
+ - flat-manager-client push --commit --publish --wait ${BUILD_ID} repo/ || result=$?
+ - flat-manager-client purge ${BUILD_ID}
+ - exit $result
+ variables:
+ FLAT_MANAGER_URL: https://gbm.gnome.org/
+ FLATPAK_REPO: nightly
+ only:
+ refs:
+ - master
+ variables:
+ - $REPO_TOKEN
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]