- job:
    name: ledge-u-boot
    project-type: matrix
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
                - job-workspace
            everyone-flat:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 90
            num-to-keep: 10
    parameters:
        - string:
            name: PUB_DEST
            default: 'components/ledge/uboot/${BUILD_NUMBER}'
        - string:
            name: LAVA_SERVER
            default: 'ledge.validation.linaro.org/RPC2/'
        - string:
            name: QA_SERVER
            default: 'https://qa-reports.linaro.org'
        - string:
            name: QA_SERVER_PROJECT
            default: 'ledge'
        - string:
            name: QA_SERVER_TEAM
            default: 'ledge'
        - string:
            name: AUTH_GROUPS
            default: 'linaro'
        - string:
            name: BB_CLEANALL_PKGS
            default: ''
    disabled: false
    node: master
    display-name: 'LEDGE U-Boot SystemReady-IR tests'
    axes:
        - axis:
            type: user-defined
            name: MACHINE
            values:
                - 'qemu-arm64'
        - axis:
            type: user-defined
            name: DISTRO
            values:
                - rpb
        - axis:
            type: slave
            name: label
            values:
                - docker-buster-amd64
    execution-strategy:
        sequential: false
    wrappers:
        - timeout:
            timeout: 400
        - timestamps
        - ssh-agent-credentials:
            users:
                - 'OE_COMMIT_BOT_KEY'
        - credentials-binding:
            - text:
                credential-id: QA_REPORTS_TOKEN
                variable: QA_REPORTS_TOKEN
            - text:
                credential-id: ARTIFACTORIAL_TOKEN
                variable: ARTIFACTORIAL_TOKEN
    builders:
        - shell: |
            DEVICE_TYPE=${MACHINE}
            echo "DEVICE_TYPE=${DEVICE_TYPE}" > device_type_parameters
        - inject:
            properties-file: device_type_parameters
        - shell:
            !include-raw: ledge/u-boot/builders.sh
        - inject:
            properties-file: post_build_lava_parameters
        - linaro-publish-token
        - shell:
            !include-raw: rpb-openembedded/publishers.sh
        - shell:
            !include-raw: ledge/u-boot/submit_for_testing.sh
    publishers:
        - groovy-postbuild:
            script:
                !include-raw:
                  - openembedded-lkft/postbuild.groovy
        - email:
            recipients: 'maxim.uvarov@linaro.org ilias.apalodimas@linaro.org'
