blob: d4bc4652330201ba13adbd40fead7fa73d711863 [file] [log] [blame]
- job:
name: tf-a-builder
node: docker-amd64-tf-a-bionic
project-type: freestyle
concurrent: true
disabled: false
defaults: global
Description: |
Trusted Firmware A (TF-A) builder
properties:
- build-discarder:
days-to-keep: 15
- authorization:
!include: authorization.yaml.inc
parameters:
- string:
name: import_cc
- string:
name: TEST_CONFIG
description: |
Original test configuration.
- string:
name: TEST_DESC
description: |
Expanded and normalized test configuration, aka "test description"
- string:
name: TF_GERRIT_PROJECT
default: 'TF-A/trusted-firmware-a'
- string:
name: TF_GERRIT_BRANCH
default: 'refs/heads/master'
- string:
name: TF_GERRIT_REFSPEC
default: '+refs/heads/master:refs/remotes/origin/master'
- string:
name: TFTF_GERRIT_PROJECT
default: 'TF-A/tf-a-tests'
- string:
name: TFTF_GERRIT_BRANCH
default: 'refs/heads/master'
- string:
name: TFTF_GERRIT_REFSPEC
default: '+refs/heads/master:refs/remotes/origin/master'
- string:
name: DOCKER_REGISTRY
default: '987685672616.dkr.ecr.us-east-1.amazonaws.com'
- string:
name: ARMLMD_LICENSE_FILE
default: '27000@flexnet.trustedfirmware.org'
- string:
name: JUNO_ROOTFS_URL
default: 'http://releases.linaro.org/openembedded/aarch64/17.01/linaro-image-minimal-genericarmv8-20170127-888.rootfs.tar.gz'
- string:
name: MBEDTLS_URL
default: 'https://github.com/Mbed-TLS/mbedtls/archive/mbedtls-2.28.1.tar.gz'
- string:
name: GERRIT_PATCHSET_NUMBER
default: ''
- string:
name: GERRIT_CHANGE_NUMBER
default: ''
- string:
name: GERRIT_HOST
default: 'review.trustedfirmware.org'
- string:
name: QA_SERVER_TEAM
default: 'tf'
- string:
name: QA_SERVER_PROJECT
default: 'tf-a'
- string:
name: QA_SERVER_VERSION
default: ${BUILD_NUMBER}
- string:
name: QA_SERVER
default: 'https://qa-reports.linaro.org'
- string:
name: QA_TOOLS_REPO
default: 'https://git.gitlab.arm.com/tooling/qa-tools.git'
- string:
name: SHARE_FOLDER
default: '/srv/shared/${JOB_NAME}/${BUILD_NUMBER}'
description: 'Folder containing shared repositories for downstream pipeline jobs'
wrappers:
- timestamps
- timeout:
timeout: 120
fail: true
- credentials-binding:
- text:
credential-id: QA_REPORTS_TOKEN
variable: QA_REPORTS_TOKEN
- credentials-binding:
- text:
credential-id: LAVA_USER_TF
variable: LAVA_USER
- credentials-binding:
- text:
credential-id: LAVA_TOKEN_TF
variable: LAVA_TOKEN
builders:
- shell:
!include-raw: scripts/clone.sh
- shell:
!include-raw: tf-a-builder/builders.sh
- inject:
properties-file: artefacts/env
- shell: |
ln -s "artefacts/${BIN_MODE:-release}" "artefacts-lava"
- conditional-step:
condition-kind: file-exists
on-evaluation-failure: dont-run
condition-filename: artefacts-lava/job.yaml
condition-basedir: workspace
steps:
- shell: |
#!/bin/bash
set -e
DEVICE_TYPE=fvp
CUSTOM_YAML_URL=${BUILD_URL}/artifact/artefacts-lava/job.yaml
DEVICE_TYPE=$(awk -F': ' '/device_type/ {print $2}' ${WORKSPACE}/artefacts-lava/job.yaml)
cat << EOF > ${WORKSPACE}/lava.param
DEVICE_TYPE=${DEVICE_TYPE}
LAVA_SERVER=tf.validation.linaro.org
EOF
publishers:
- archive:
artifacts: artefacts/**, artefacts-lava/**
latest-only: false
allow-empty: true
- conditional-publisher:
- condition-kind: file-exists
on-evaluation-failure: dont-run
condition-filename: artefacts-lava/job.yaml
condition-basedir: workspace
action:
- postbuildscript:
builders:
- role: SLAVE
build-on:
- SUCCESS
build-steps:
- inject:
properties-file: ${WORKSPACE}/lava.param
- shell: |
#!/bin/bash
squad='tf-a-job-configs/tf-a-builder/squad.sh'
# FIXME: Juno and FVP jobs may fail due to non-related users changes,
# so CI needs to resubmit the job, at most three times:
# Juno jobs may fail due to LAVA lab infrastructure issues (see
# https://projects.linaro.org/browse/LSS-2128)
# FVP jobs may hang at some particular TFTF test (see
# https://linaro.atlassian.net/browse/TFC-176)
if ! $squad; then
if ! $squad; then
if ! $squad; then
echo "LAVA JOB RESULT: 1"
else
echo "LAVA JOB RESULT: 0"
fi
else
echo "LAVA JOB RESULT: 0"
fi
else
echo "LAVA JOB RESULT: 0"
fi
- postbuildscript:
builders:
- role: SLAVE
build-on:
- SUCCESS
build-steps:
- shell: |
#!/bin/bash -e
echo "=== Starting expect-post tests ==="
./tf-a-ci-scripts/script/expect-post-runner.sh
- conditional-publisher:
- condition-kind: file-exists
on-evaluation-failure: dont-run
condition-filename: lava-raw-debug.log
condition-basedir: workspace
action:
- archive:
artifacts: lava-raw-debug.log
latest-only: false
allow-empty: true
- conditional-publisher:
- condition-kind: file-exists
on-evaluation-failure: dont-run
condition-filename: lava.log
condition-basedir: workspace
action:
- archive:
artifacts: lava.log, lava-*.log, feedback.log, config_file.json, covtrace-*.log, trace_report/**
latest-only: false
allow-empty: true
- groovy-postbuild:
script:
!include-raw:
- tf-a-builder/postbuild.groovy