[gnome-build-meta/abderrahim/ci-improvements] WIP: only install bst/flat-manager in jobs that need them
- From: Abderrahim Kitouni <akitouni src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/abderrahim/ci-improvements] WIP: only install bst/flat-manager in jobs that need them
- Date: Fri, 19 Apr 2019 16:16:15 +0000 (UTC)
commit 1e05c74c495fc4e0895cd2c196c831717c35f861
Author: Abderrahim Kitouni <akitouni gnome org>
Date: Fri Apr 19 17:08:06 2019 +0100
WIP: only install bst/flat-manager in jobs that need them
.gitlab-ci.yml | 69 ++++++++++++++++++++++++++++++++--------------------------
1 file changed, 38 insertions(+), 31 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 6f708d6e..504e944e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,28 +24,28 @@ stages:
before_script:
- # Use specific version of BuildStream
- - git clone https://gitlab.com/BuildStream/buildstream.git
- - git -C buildstream/ checkout $BST_SHA
- - pip3 install buildstream/
-
- # install bst-external nedded for the flatpak_image plugin
- - git clone https://gitlab.com/BuildStream/bst-external.git
- - git -C bst-external/ checkout $BST_EXTERNAL_SHA
- - pip3 install bst-external/
-
- # Ensure the log directory exists
- - mkdir -p logs
-
- # Setup certificate for pushing to the cache
- |
- if [ -n "$GITLAB_CAS_PUSH_CERT" ]; then
- echo "$GITLAB_CAS_PUSH_CERT" > client.crt
- echo "$GITLAB_CAS_PUSH_KEY" > client.key
- fi
-
- cat >> build.conf << EOF
-
+ if [ -n "$NEED_BST"]; then
+ # Use specific version of BuildStream
+ git clone https://gitlab.com/BuildStream/buildstream.git
+ git -C buildstream/ checkout $BST_SHA
+ pip3 install buildstream/
+
+ # install bst-external nedded for the flatpak_image plugin
+ git clone https://gitlab.com/BuildStream/bst-external.git
+ git -C bst-external/ checkout $BST_EXTERNAL_SHA
+ pip3 install bst-external/
+
+ # Ensure the log directory exists
+ mkdir -p logs
+
+ # Setup certificate for pushing to the cache
+ if [ -n "$GITLAB_CAS_PUSH_CERT" ]; then
+ echo "$GITLAB_CAS_PUSH_CERT" > client.crt
+ echo "$GITLAB_CAS_PUSH_KEY" > client.key
+ fi
+
+ cat >> build.conf << EOF
projects:
gnome:
artifacts:
@@ -55,18 +55,22 @@ before_script:
push: true
EOF
- # flat-manager-client to push to flathub
- - git clone https://github.com/flatpak/flat-manager
+ fi
+ # flat-manager-client to push to flathub
- |
- if [ "$FLATPAK_BRANCH" = master ] && [ -n "$NIGHTLY_REPO_TOKEN" ]; then
- export REPO_TOKEN=$NIGHTLY_REPO_TOKEN
- export FLAT_MANAGER_SERVER=https://gbm.gnome.org/
- export FLAT_MANAGER_REPO=nightly
- elif [ "$FLATPAK_BRANCH" != master ] && [ -n "$FLATHUB_REPO_TOKEN" ]; then
- export REPO_TOKEN=$FLATHUB_REPO_TOKEN
- export FLAT_MANAGER_SERVER=https://hub.flathub.org/
- export FLAT_MANAGER_REPO=stable
+ if [ -n "$NEED_FLATMGR" ]; then
+ git clone https://github.com/flatpak/flat-manager
+
+ if [ "$FLATPAK_BRANCH" = master ] && [ -n "$NIGHTLY_REPO_TOKEN" ]; then
+ export REPO_TOKEN=$NIGHTLY_REPO_TOKEN
+ export FLAT_MANAGER_SERVER=https://gbm.gnome.org/
+ export FLAT_MANAGER_REPO=nightly
+ elif [ "$FLATPAK_BRANCH" != master ] && [ -n "$FLATHUB_REPO_TOKEN" ]; then
+ export REPO_TOKEN=$FLATHUB_REPO_TOKEN
+ export FLAT_MANAGER_SERVER=https://hub.flathub.org/
+ export FLAT_MANAGER_REPO=stable
+ fi
fi
#
@@ -148,9 +152,12 @@ before_script:
#
track:
+ variables:
+ NEED_BST: yes
<<: *x86_64
stage: track
script:
+ - echo $ARCH
- ${BST} track --deps all core.bst flatpak-runtimes.bst
retry: 2
# only run on branches targeting master
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]