Skip to contentSkip to conversation

upload-error-report: add script to upload errors

PATCH New akuster 1 participant 3 messages Aug 29, 2020

lore
Share & tools
lore

akuster

author
#0 lore raw

PATCH 1/3 upload-error-report: add script to upload errors

---
 scripts/upload-error-report | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)
 create mode 100755 scripts/upload-error-report
scripts/upload-error-report new file +26 -0
new file mode 100755
index 0000000..56bd24e
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+ERR_REPORT_USERNAME=$1
+ERR_REPORT_EMAIL=$2
+BUILDDIR=$3
+
+shift
+shift
+shift
+
+if [ ! -e $BUILDDIR ]; then
+    exit 0
+fi
+
+cd $BUILDDIR/../poky
+
+if [ -d $BUILDDIR/tmp/log/error-report/ ]; then
+    echo "$ERR_REPORT_USERNAME" > ~/.oe-send-error
+    echo "$ERR_REPORT_EMAIL" >> ~/.oe-send-error
+
+    . ./oe-init-build-env $BUILDDIR
+
+    for x in `ls $BUILDDIR/tmp/log/error-report/ | grep error_report_`; do
+        send-error-report -y tmp/log/error-report/$x
+    done
+fi
Signature · 1 line
2.17.1
author
#1 lore raw

PATCH 2/3 kas/kas-security-base.yml: lets enable error reporting

---
 kas/kas-security-base.yml | 2 ++
 1 file changed, 2 insertions(+)
kas/kas-security-base.yml +2 -0
index 768390e..2cf056f 100644
@@ -37,6 +37,8 @@ local_conf_header:
     DL_DIR = "/home/srv/downloads/master"
     BB_HASHSERVE = "auto"
     BB_SIGNATURE_HANDLER = "OEEquivHash"
+    INHERIT += "buildstats buildstats-summary buildhistory"
+    INHERIT += "report-error"
 
   diskmon: |
     BB_DISKMON_DIRS = "\
Signature · 1 line
2.17.1
author
#2 lore raw

PATCH 3/3 .gitlab: send error reports

In reply to akuster
---
 .gitlab-ci.yml | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
.gitlab-ci.yml +6 -5
index 132eb78..37db49c 100644
@@ -5,17 +5,18 @@ stages:
   stage: build
   image: crops/poky
   before_script:
+    - echo "$ERR_REPORT_USERNAME" > ~/.oe-send-error
+    - echo "$ERR_REPORT_EMAIL" >> ~/.oe-send-error
     - export PATH=~/.local/bin:$PATH
     - wget https://bootstrap.pypa.io/get-pip.py
     - python3 get-pip.py
     - python3 -m pip install kas
-    - wget -q 'https://downloads.rclone.org/rclone-current-linux-amd64.zip'
-    - unzip -q rclone-current-linux-amd64.zip
-    - mv rclone-*-linux-amd64/rclone ~/.local/bin/
-    - rm -rf rclone-*-linux-amd64*
   after_script:
+    - for x in `ls $CI_PROJECT_DIR/build/tmp/log/error-report/ | grep error_report_`; do
+        - send-error-report -y tmp/log/error-report/$x
+    - done
     - rm -rf build
-    - ./scripts/ci-cleanup.sh
+    - $CI_PROJECT_DIR/scripts/ci-cleanup.sh
   cache:
     paths:
       - layers
Signature · 1 line
2.17.1