[gnome-build-meta/abderrahim/ci-improvements: 6/12] flatpak-runtimes: run flatpak export in buildstream



commit 492f553709d4e2f8f2a8126350198924030f5589
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Sun Dec 30 11:48:10 2018 +0100

    flatpak-runtimes: run flatpak export in buildstream

 .gitlab-ci.yml                | 15 ++-------------
 elements/flatpak-runtimes.bst | 28 +++++++++++++++++++++-------
 project.conf                  |  1 +
 3 files changed, 24 insertions(+), 20 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bbe8df6..bc2415b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -112,14 +112,7 @@ before_script:
   script:
     - ${BST} -o arch "${ARCH}" build flatpak-runtimes.bst
 
-    # checkout the runtimes
-    - |
-      for runtime in platform platform-locale sdk sdk-debug sdk-docs sdk-locale; do
-        bst -o arch "${ARCH}" checkout --hardlinks "flatpak/${runtime}.bst" "runtimes/${runtime}"
-        flatpak build-export --arch="${FLATPAK_ARCH}" --no-update-summary --files=files repo/ 
"runtimes/${runtime}" "${FLATPAK_BRANCH}"
-      done
-
-    - BRANCHES=$(find repo/refs/heads/ -type f | grep "${FLATPAK_ARCH}/${FLATPAK_BRANCH}" | sed 
s,repo/refs/heads/,,)
+    - bst -o arch "${ARCH}" checkout --hardlinks flatpak-runtimes.bst repo/
 
     # Push the resulting runtimes to gbm.gnome.org
     # Assume there will be no branch name collisions,
@@ -133,7 +126,7 @@ before_script:
         fi
 
         rsync -a repo/ gbm-builder.gnome.org:incoming/repo-${CI_JOB_ID}
-        ssh gbm-builder.gnome.org gbm-flatpak-scripts/import-commits -c "${CONFIG_FILE}" 
incoming/repo-${CI_JOB_ID} ${BRANCHES}
+        ssh gbm-builder.gnome.org gbm-flatpak-scripts/import-commits -c "${CONFIG_FILE}" 
incoming/repo-${CI_JOB_ID}
       fi
 
   <<: *cache
@@ -212,7 +205,6 @@ flatpak-x86_64:
     - gnome-build-meta
   variables:
     ARCH: x86_64
-    FLATPAK_ARCH: x86_64
 
 flatpak-i386:
   image: buildstream/buildstream-fedora:master-123-abef70fe
@@ -222,7 +214,6 @@ flatpak-i386:
     - gnome-build-meta
   variables:
     ARCH: i686
-    FLATPAK_ARCH: i386
 
 flatpak-aarch64:
   image: buildstream/buildstream-fedora:aarch64-master-123-abef70fe
@@ -232,7 +223,6 @@ flatpak-aarch64:
     - gnome-build-meta
   variables:
     ARCH: aarch64
-    FLATPAK_ARCH: aarch64
 
 flatpak-arm:
   image: buildstream/buildstream-fedora:aarch64-master-123-abef70fe
@@ -242,4 +232,3 @@ flatpak-arm:
     - gnome-build-meta
   variables:
     ARCH: arm
-    FLATPAK_ARCH: arm
diff --git a/elements/flatpak-runtimes.bst b/elements/flatpak-runtimes.bst
index 8e2d5bf..bcd4a8c 100644
--- a/elements/flatpak-runtimes.bst
+++ b/elements/flatpak-runtimes.bst
@@ -1,8 +1,22 @@
-kind: stack
+kind: flatpak_repo
 depends:
-- flatpak/platform.bst
-- flatpak/platform-locale.bst
-- flatpak/sdk.bst
-- flatpak/sdk-debug.bst
-- flatpak/sdk-docs.bst
-- flatpak/sdk-locale.bst
+- filename: flatpak/platform.bst
+  type: build
+- filename: flatpak/platform-locale.bst
+  type: build
+- filename: flatpak/sdk.bst
+  type: build
+- filename: flatpak/sdk-debug.bst
+  type: build
+- filename: flatpak/sdk-docs.bst
+  type: build
+- filename: flatpak/sdk-locale.bst
+  type: build
+- filename: deploy-tools/flatpak.bst
+  junction: freedesktop-sdk.bst
+  type: build
+
+config:
+  environment:
+    - deploy-tools/flatpak.bst
+  arch: '%{gcc_arch}'
diff --git a/project.conf b/project.conf
index 3621383..f52586e 100644
--- a/project.conf
+++ b/project.conf
@@ -285,3 +285,4 @@ plugins:
   package-name: buildstream-external
   elements:
     flatpak_image: 0
+    flatpak_repo: 0


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]