jjb: lttng-tools: adjust post-build action to act on failure instead of abort
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 14 May 2021 14:21:03 +0000 (10:21 -0400)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Fri, 14 May 2021 14:52:06 +0000 (10:52 -0400)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
jobs/lttng-tools.yaml
scripts/lttng-tools/tap_aborted.sh [deleted file]
scripts/lttng-tools/tap_failure.sh [new file with mode: 0755]

index 58164d5d07d4984348587f4f74c3c0150de7be3e..dcaa53108a9817403d82c1d951076a22cf418878 100644 (file)
           builders:
             - role: SLAVE
               build-on:
-                  - ABORTED
+                  - FAILURE
               build-steps:
                   - shell:
-                      !include-raw-escape: scripts/lttng-tools/tap_aborted.sh
+                      !include-raw-escape: scripts/lttng-tools/tap_failure.sh
       - postbuildscript:
           mark-unstable-if-failed: true
           builders:
           builders:
             - role: SLAVE
               build-on:
-                  - ABORTED
+                  - FAILURE
               build-steps:
                   - shell:
-                      !include-raw-escape: scripts/lttng-tools/tap_aborted.sh
+                      !include-raw-escape: scripts/lttng-tools/tap_failure.sh
       - postbuildscript:
           mark-unstable-if-failed: true
           builders:
           builders:
             - role: SLAVE
               build-on:
-                  - ABORTED
+                  - FAILURE
               build-steps:
                   - shell:
-                      !include-raw-escape: scripts/lttng-tools/tap_aborted.sh
+                      !include-raw-escape: scripts/lttng-tools/tap_failure.sh
       - postbuildscript:
           mark-unstable-if-failed: true
           builders:
                   - ABORTED
               build-steps:
                   - shell:
-                      !include-raw-escape: scripts/lttng-tools/tap_aborted.sh
+                      !include-raw-escape: scripts/lttng-tools/tap_failure.sh
       - postbuildscript:
           mark-unstable-if-failed: true
           builders:
diff --git a/scripts/lttng-tools/tap_aborted.sh b/scripts/lttng-tools/tap_aborted.sh
deleted file mode 100755 (executable)
index 07bbaa4..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-# Copyright (C) 2021 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
-#
-# This program is free software: you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-set -exu
-
-# Required variables
-WORKSPACE=${WORKSPACE:-}
-
-SRCDIR="$WORKSPACE/src/lttng-tools"
-TAPDIR="$WORKSPACE/tap"
-
-cd "$SRCDIR"
-
-# Try to fetch all tap logs.
-rsync -a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests/ "$TAPDIR"
-
-# TAP plugin is having a hard time with .yml files.
-find "$TAPDIR" -name "meta.yml" -exec rm -f {} \;
-
-# EOF
diff --git a/scripts/lttng-tools/tap_failure.sh b/scripts/lttng-tools/tap_failure.sh
new file mode 100755 (executable)
index 0000000..64f17b5
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+# Copyright (C) 2021 Jonathan Rajotte-Julien <jonathan.rajotte-julien@efficios.com>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# This script is necessary since that for job failure due to timeout, the
+# gathering of tap log will not have been executed.
+set -exu
+
+# Required variables
+WORKSPACE=${WORKSPACE:-}
+
+SRCDIR="$WORKSPACE/src/lttng-tools"
+TAPDIR="$WORKSPACE/tap"
+
+cd "$SRCDIR"
+
+# Try to fetch all tap logs.
+rsync -a --exclude 'test-suite.log' --include '*/' --include '*.log' --exclude='*' tests/ "$TAPDIR"
+
+# TAP plugin is having a hard time with .yml files.
+find "$TAPDIR" -name "meta.yml" -exec rm -f {} \;
+
+# EOF
This page took 0.025529 seconds and 4 git commands to generate.