summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorentin Noël <corentin.noel@collabora.com>2023-03-05 21:55:20 +0100
committerCorentin Noël <tintou@noel.tf>2023-03-06 16:24:57 +0100
commitd0a7e4425df9d52fb0f95979a5b8df9e4ba60d7c (patch)
tree63f9cb78f9528e20e32c3840289fb81bb6cc0d54
parent3e607447faaae64c61bfbbea5bcf3a2a34ded3fe (diff)
downloadevolution-data-server-d0a7e4425df9d52fb0f95979a5b8df9e4ba60d7c.tar.gz
M!115 - ci: Run the CI for the current commit
Amend the flatpak manifest on the fly to use the correct commit in the CI. Allows to actually run the CI against different branches than the default one. Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/merge_requests/115
-rw-r--r--.gitlab-ci.yml4
1 files changed, 4 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6094bc64d..1bb0505ae 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -17,6 +17,10 @@ flatpak:
- export CCACHE_BASEDIR="$PWD"
- export CCACHE_DIR="$PWD/ccache"
script:
+ - jq -M '(.modules[] | select(.name=="evolution-data-server")).sources[0].url = env.CI_REPOSITORY_URL' ${MANIFEST_PATH} > tmp.json && mv tmp.json ${MANIFEST_PATH}
+ - jq -M 'del((.modules[] | select(.name=="evolution-data-server")).sources[0].branch)' ${MANIFEST_PATH} > tmp.json && mv tmp.json ${MANIFEST_PATH}
+ - jq -M '(.modules[] | select(.name=="evolution-data-server")).sources[0].commit = env.CI_COMMIT_SHA' ${MANIFEST_PATH} > tmp.json && mv tmp.json ${MANIFEST_PATH}
+
- >
xvfb-run -a -s "-screen 0 1024x768x24"
flatpak-builder --keep-build-dirs --user --disable-rofiles-fuse flatpak_app --repo=repo --ccache ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH}