diff options
-rw-r--r-- | jjb/lab/include-raw-lab-retrieve-logs.sh | 9 | ||||
-rw-r--r-- | jjb/lab/lab-templates.yaml | 33 |
2 files changed, 41 insertions, 1 deletions
diff --git a/jjb/lab/include-raw-lab-retrieve-logs.sh b/jjb/lab/include-raw-lab-retrieve-logs.sh new file mode 100644 index 000000000..6335e49d7 --- /dev/null +++ b/jjb/lab/include-raw-lab-retrieve-logs.sh @@ -0,0 +1,9 @@ +#!/bin/bash +set -xe -o pipefail + +echo Job triggered by $SRC_BUILD_URL +echo Retriving logs from $LOG_DIR_URL + +rm -rf archives +wget -r -nv -nd --no-parent -l 1 --reject="index.html*" -P archives "$LOG_DIR_URL" +cat archives/console.log diff --git a/jjb/lab/lab-templates.yaml b/jjb/lab/lab-templates.yaml index 12bc88bd9..6d37da5e0 100644 --- a/jjb/lab/lab-templates.yaml +++ b/jjb/lab/lab-templates.yaml @@ -2,4 +2,35 @@ - job-template: name: 'lab-{lab-name}-{env-name}-{job-name}' disabled: false - project-type: externaljob + project-type: freestyle + build-node: ubuntu1604-basebuild-2c-1g + auth-token: lab + + properties: + - lf-infra-properties: + project: 'integration' + build-days-to-keep: '{build-days-to-keep}' + + parameters: + - string: + name: LOG_DIR_URL + description: 'URL for the log directory produced by the external job' + - string: + name: SRC_BUILD_URL + description: 'URL for the external Jenkins build triggering this build' + + wrappers: + - lf-infra-wrappers: + build-timeout: '{build-timeout}' + jenkins-ssh-credential: '{jenkins-ssh-credential}' + + builders: + - shell: + !include-raw: + - include-raw-lab-retrieve-logs.sh + + publishers: + - integration-robot: + unstable-if: 0.0 + pass-if: 100.0 + - lf-infra-publish |