From: Jonathan Rajotte Date: Fri, 14 May 2021 14:21:03 +0000 (-0400) Subject: jjb: lttng-tools: adjust post-build action to act on failure instead of abort X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=40430e73d17a54c44056d0197d36d7c4b759af63;p=lttng-ci.git jjb: lttng-tools: adjust post-build action to act on failure instead of abort Signed-off-by: Jonathan Rajotte --- diff --git a/jobs/lttng-tools.yaml b/jobs/lttng-tools.yaml index 58164d5..dcaa531 100644 --- a/jobs/lttng-tools.yaml +++ b/jobs/lttng-tools.yaml @@ -490,10 +490,10 @@ 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: @@ -557,10 +557,10 @@ 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: @@ -790,10 +790,10 @@ 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: @@ -944,7 +944,7 @@ - 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 index 07bbaa4..0000000 --- a/scripts/lttng-tools/tap_aborted.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# Copyright (C) 2021 Jonathan Rajotte-Julien -# -# 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 . - -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 index 0000000..64f17b5 --- /dev/null +++ b/scripts/lttng-tools/tap_failure.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# Copyright (C) 2021 Jonathan Rajotte-Julien +# +# 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 . + +# 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