aboutsummaryrefslogtreecommitdiff
path: root/openembedded-lkft-sdk.yaml
blob: a963be3afa641630ae8c3e13baa37bcf83e98ff3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
- job:
    name: openembedded-lkft-sdk
    project-type: matrix
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
                - job-workspace
            linaro:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 30
            artifact-num-to-keep: 1
    parameters:
        - string:
            name: KERNEL_RECIPE
            default: 'linux-dummy'
        - string:
            name: IMAGES
            default: 'meta-toolchain'
        - string:
            name: MANIFEST_URL
            default: 'https://github.com/96boards/oe-rpb-manifest.git'
        - string:
            name: MANIFEST_BRANCH
            default: 'lkft/sumo'
        - string:
            name: PUB_DEST
            default: 'openembedded/lkft/sdk/sumo/${MACHINE}/${BUILD_NUMBER}'
        - matrix-combinations:
            name: MATRIX_COMBINATIONS
    disabled: false
    node: master
    display-name: 'LKFT - SDK (OpenEmbedded/sumo)'
    axes:
        - axis:
            type: user-defined
            name: MACHINE
            values:
                - 'am57xx-evm'
                - 'intel-corei7-64'
                - 'juno'
        - axis:
            type: user-defined
            name: DISTRO
            values:
                - lkft
        - axis:
            type: slave
            name: label
            values:
                - docker-lkft
    execution-strategy:
        sequential: false
    wrappers:
        - timeout:
            timeout: 180
        - timestamps
        - ssh-agent-credentials:
            users:
                - 'OE_COMMIT_BOT_KEY'
        - credentials-binding:
            - text:
                credential-id: QA_REPORTS_TOKEN
                variable: QA_REPORTS_TOKEN
    builders:
        - shell: |
            #!/bin/bash

            set -ex

            sudo mkdir -p /srv/oe
            sudo chown buildslave:buildslave /srv/oe
            cd /srv/oe

            if [ -f "${HOME}/bin/repo" ]; then
              chmod a+x "${HOME}/bin/repo"
            fi
            export PATH="${HOME}/bin:${PATH}"

            # initialize repo if not done already
            export MANIFEST_URL="${MANIFEST_URL:-https://github.com/96boards/oe-rpb-manifest.git}"
            if [ ! -e ".repo/manifest.xml" ]; then
               repo init -u "${MANIFEST_URL}" -b "${MANIFEST_BRANCH}"

               mkdir -p "${HOME}/srv/oe/downloads" "${HOME}/srv/oe/sstate-cache-${DISTRO}-${MANIFEST_BRANCH}"
               mkdir -p build
               ln -s "${HOME}/srv/oe/downloads" .
               ln -s "${HOME}/srv/oe/sstate-cache-${DISTRO}-${MANIFEST_BRANCH}" sstate-cache
            fi

            repo sync

            rm -rf conf build

            # Accept EULA if/when needed
            export EULA_dragonboard410c=1

            source setup-environment build

            # add useful debug info
            for f in conf/{site,auto,local,lkft-kernel}.conf; do
              if [ -f ${f} ]; then
                echo "=== content of ${f} ==="
                cat ${f}
              else
                echo "=== not existent: ${f} ==="
              fi
            done

            time bitbake ${IMAGES}

            DEPLOY_DIR_IMAGE="$(bitbake -e | grep "^DEPLOY_DIR="| cut -d'=' -f2 | tr -d '"')/sdk"

            echo "DEPLOY_DIR_IMAGE=${DEPLOY_DIR_IMAGE}" >> "${WORKSPACE}/parameters"
        - inject:
            properties-file: parameters
        - linaro-publish-token
        - shell:
            !include-raw: openembedded-lkft/publishers.sh
    publishers:
        - groovy-postbuild:
            script:
                !include-raw:
                  - rpb-openembedded/postbuild.groovy
        - email-ext:
            recipients: 'daniel.diaz@linaro.org'
            matrix-trigger: only-configurations
            aborted: true
            subject: '[SDK] ${MACHINE}: ${BUILD_STATUS}'
            body: |
                Build URL: ${PROJECT_URL}${BUILD_NUMBER}/
                Full log: ${PROJECT_URL}${BUILD_NUMBER}/consoleText
                Parsed warnings/errors: ${PROJECT_URL}${BUILD_NUMBER}/parsed_console
                Git branch: ${KERNEL_BRANCH}
                Git URL: ${KERNEL_REPO}
                Git commit: ${SRCREV_kernel}

                Errors:
                ${BUILD_LOG_REGEX, regex="^ERROR:.* ", linesBefore=0, linesAfter=0, showTruncatedLines=false}
            presend-script:
                !include-raw: openembedded-lkft/presend-script.groovy