[gimp/wip/Jehan/ci-improve-flatpak-build] gitlab-ci: store flatpak-build output into a log file.



commit b7df012894ad6159d2df2a94f1d9800e2c0541c4
Author: Jehan <jehan girinstud io>
Date:   Wed May 26 20:28:47 2021 +0200

    gitlab-ci: store flatpak-build output into a log file.
    
    Without this, the flatpak build is just too long and Gitlab CI just
    stops logging it. So we end up with a log saying the quite useless (at
    the end):
    
    > Job's log exceeded limit of 16777216 bytes.
    > Job execution will continue but no more output will be collected.
    
    We don't even reach babl/GEGL/GIMP builds, which are the most important.
    With this little trick, I am redirecting output to a log file and simply
    including said log into the artifacts, hence allowing to debug the full
    build.

 .gitlab-ci.yml | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 69eaf7f3f3..661823abbd 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -565,7 +565,22 @@ flatpak:
     FLATPAK_MODULE: "gimp"
     APP_ID: "org.gimp.GIMP"
     BUNDLE: "gimp-git.flatpak"
-
+  before_script:
+    # Our script is too long for Gitlab and ends up with:
+    # > Job's log exceeded limit of 16777216 bytes.
+    # > Job execution will continue but no more output will be collected.
+    # To make debugging actually possible, let's save logs as a file.
+    - flatpak-builder-wrapper() { flatpak-builder "$@" > flatpak-builder.log 2>&1; }
+    - alias flatpak-builder=flatpak-builder-wrapper
+  artifacts:
+    paths:
+      - flatpak-builder.log
+      # These are the same as flatpak_ci_initiative.yml as according to
+      # docs, key values are not merged but replaced.
+      - "${BUNDLE}"
+      - 'repo.tar'
+      - '.flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/meson-log.txt'
+      - '.flatpak-builder/build/${FLATPAK_MODULE}/_flatpak_build/meson-logs/testlog.txt'
 
 cppcheck:
   rules:


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