aboutsummaryrefslogtreecommitdiff
path: root/lkft-staging-no-skiplist.yaml
blob: be170ff0279157929a872747dd8eeab3d1ef249a (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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
- job:
    name: lkft-staging-no-skiplist
    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: CONFIGS_REPO_URL_OVERRIDE
            default: http://git.linaro.org/ci/job/configs.git
            description: URL to configs repository
        - string:
            name: CONFIGS_REPO_REV_OVERRIDE
            default: master
            description: Git revision to checkout. May be branch, tag, or sha.
        - matrix-combinations:
            name: MATRIX_COMBINATIONS
    disabled: false
    node: master
    display-name: 'LKFT - Staging no skip list'
    triggers:
        # trigger every Saturday
        - timed: 'H 0 * * 6'
    axes:
        - axis:
            type: user-defined
            name: BUILD_NAME
            values:
                - 'linux-next-oe'
                - 'linux-mainline-oe'
                - 'linux-stable-rc-4.4-oe'
                - 'linux-stable-rc-4.9-oe'
                - 'linux-stable-rc-4.14-oe'
                - 'linux-stable-rc-4.18-oe'
                - 'linux-stable-rc-4.19-oe'
        - axis:
            type: user-defined
            name: QA_SERVER
            values:
                - 'https://qa-reports.linaro.org'
        - axis:
            type: user-defined
            name: DEVICE_TYPE
            values:
                - 'hi6220-hikey'
                - 'x86'
                - 'i386'
                - 'juno-r2'
                - 'x15'
                - 'dragonboard-410c'
                - 'qemu_arm'
                - 'qemu_arm64'
                - 'qemu_x86_64'
                - 'qemu_i386'
    execution-strategy:
        sequential: false
    wrappers:
        - 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 -x

            # install required python modules
            pip install --user --force-reinstall Jinja2 requests urllib3 ruamel.yaml

            # no LTS 4.4 build for hikey
            if [ ${DEVICE_TYPE} = hi6220-hikey ] && [ ${BUILD_NAME} = linux-stable-rc-4.4-oe ]
            then
              exit 0
            fi
            # no LTS 4.4 build for QEMU (Hikey build is used)
            if [ ${DEVICE_TYPE} = qemu_arm64 ] && [ ${BUILD_NAME} = linux-stable-rc-4.4-oe ]
            then
              exit 0
            fi
            # no LTS 4.4 build for dragonboard
            if [ ${DEVICE_TYPE} = dragonboard-410c ] && [ ${BUILD_NAME} = linux-stable-rc-4.4-oe ]
            then
              exit 0
            fi
            export LAVA_SERVER=https://lkft-staging.validation.linaro.org/RPC2/

            case ${DEVICE_TYPE} in
              hi6220-hikey)
                export MACHINE=hikey
                ;;
              juno-r2)
                export MACHINE=juno
                ;;
              x15)
                export MACHINE=am57xx-evm
                ;;
              i386)
                export MACHINE=intel-core2-32
                ;;
              x86)
                export MACHINE=intel-corei7-64
                ;;
              dragonboard-410c)
                export MACHINE=dragonboard-410c
                ;;
              qemu_arm)
                export MACHINE=am57xx-evm
                ;;
              qemu_arm64)
                export MACHINE=hikey
                ;;
              qemu_x86_64)
                export MACHINE=intel-corei7-64
                ;;
              qemu_i386)
                export MACHINE=intel-core2-32
                ;;
              *)
                ;;
            esac
            export PUB_DEST=${BUILD_NAME}
            export DISTRO=rpb
            export MANIFEST_BRANCH=rocko
            export SNAPSHOTS_URL=https://snapshots.linaro.org
            export BASE_URL=openembedded/lkft/${MANIFEST_BRANCH}/${MACHINE}/${DISTRO}/${BUILD_NAME%-oe}/latest
            export ENVIRONMENT=staging

            export SNAPSHOTS_BASE_URL=${SNAPSHOTS_URL}/${BASE_URL}

            # retrieve build specific details
            MD5_FILENAME="MD5SUMS.txt"
            BUILD_CONFIG="build_config.json"
            wget -O "${MD5_FILENAME}" "${SNAPSHOTS_BASE_URL}/${MD5_FILENAME}"
            wget -O "${BUILD_CONFIG}" "${SNAPSHOTS_BASE_URL}/${BUILD_CONFIG}"
            rm build_env.sh
            for ENVVAR in $(jq --raw-output 'to_entries[] | "\(.key | ascii_upcase)=\(.value | sub("[[:space:]]+"; "_"))"' < build_config.json)
            do
                echo "export ${ENVVAR}" >> build_env.sh
            done
            . ./build_env.sh
            ROOTFS_FILENAME=$(grep -E "rpb-console-image(-lkft)?-${MACHINE}-[0-9]{14}-[0-9]+\.rootfs\.img\.gz" "${MD5_FILENAME}" | awk '{print $2}')
            NFS_FILENAME=$(grep -E "rpb-console-image(-lkft)?-${MACHINE}-[0-9]{14}-[0-9]+\.rootfs\.tar\.xz" "${MD5_FILENAME}" | awk '{print $2}')
            EXT4_IMAGE_FILENAME=$(grep -E "rpb-console-image(-lkft)?-${MACHINE}-[0-9]{14}-[0-9]+\.rootfs\.ext4\.gz" "${MD5_FILENAME}" | awk '{print $2}')
            BOOT_FILENAME=$(grep -E "boot\S*uefi\.img" "${MD5_FILENAME}" | awk '{print $2}')
            KERNEL_FILENAME=$(grep -E "bzImage" "${MD5_FILENAME}" | awk '{print $2}')
            HDD_IMG=$(grep -E "rpb-console-image(-lkft)?-${MACHINE}-[0-9]{14}-[0-9]+\.hddimg.xz" "${MD5_FILENAME}" | awk '{print $2}')
            case ${DEVICE_TYPE} in
              juno-r2)
                KERNEL_FILENAME=$(grep -E " Image.*.bin" "${MD5_FILENAME}" | awk '{print $2}')
                DTB_FILENAME=$(grep -E " Image.*juno-r2.*.dtb" "${MD5_FILENAME}" | awk '{print $2}')
                ;;
              dragonboard-410c)
                BOOT_FILENAME=$(grep -E " boot\-\-\S*\.img" "${MD5_FILENAME}" | awk '{print $2}')
                ;;
              qemu_arm64)
                KERNEL_FILENAME=$(grep -E " Image.*.bin" "${MD5_FILENAME}" | awk '{print $2}')
                DTB_FILENAME=$(grep -E " Image.*.dtb" "${MD5_FILENAME}" | awk '{print $2}')
                ;;
              qemu_arm)
                KERNEL_FILENAME=$(grep -E " zImage.*.bin" "${MD5_FILENAME}" | awk '{print $2}')
                DTB_FILENAME=$(grep -E " zImage.*.dtb" "${MD5_FILENAME}" | awk '{print $2}')
                ;;
              *)
                ;;
            esac

            # Simulate KERNEL_VERSION and KERNEL_VERSION_OVERRIDE behavior from
            # production.
            case ${BUILD_NAME} in
              linux-next-oe)
                export KERNEL_VERSION=git
                export KERNEL_VERSION_OVERRIDE=next
                ;;
              linux-mainline-oe)
                export KERNEL_VERSION=git
                export KERNEL_VERSION_OVERRIDE=mainline
                ;;
              linux-stable-rc-4.19-oe)
                export KERNEL_VERSION=4.19
                ;;
              linux-stable-rc-4.18-oe)
                export KERNEL_VERSION=4.18
                ;;
              linux-stable-rc-4.14-oe)
                export KERNEL_VERSION=4.14
                ;;
              linux-stable-rc-4.9-oe)
                export KERNEL_VERSION=4.9
                ;;
              linux-stable-rc-4.4-oe)
                export KERNEL_VERSION=4.4
                ;;
              *)
                echo "Unknown BUILD_NAME: ${BUILD_NAME}"
                exit 1
                ;;
            esac

            case ${BUILD_NAME} in
              linux-next-oe)
                export KSELFTESTS_VERSION=${MAKE_KERNELVERSION}
                export KSELFTESTS_REVISION=${KERNEL_COMMIT_ID}
                export KSELFTESTS_URL=${KERNEL_REPO}
                export KSELFTEST_PATH=/opt/kselftests/default-in-kernel/
                ;;
              linux-mainline-oe)
                export KSELFTESTS_VERSION=${MAKE_KERNELVERSION}
                export KSELFTESTS_REVISION=${KERNEL_COMMIT_ID}
                export KSELFTESTS_URL=${KERNEL_REPO}
                export KSELFTEST_PATH=/opt/kselftests/default-in-kernel/
                ;;
              *)
                export KSELFTESTS_VERSION=${KSELFTEST_MAINLINE_VERSION}
                export KSELFTESTS_REVISION=${KSELFTEST_MAINLINE_VERSION}
                export KSELFTESTS_URL=${KSELFTEST_MAINLINE_URL}
                export KSELFTEST_PATH=/opt/kselftests/mainline/
                ;;
            esac
            export TOOLCHAIN=${COMPILER:-unknown}
            export NFSROOTFS_URL="${BUILD_LOCATION}/${NFS_FILENAME}"
            export EXT4_IMAGE_URL="${BUILD_LOCATION}/${EXT4_IMAGE_FILENAME}"
            export BOOT_URL="${BUILD_LOCATION}/${BOOT_FILENAME}"
            export SYSTEM_URL="${BUILD_LOCATION}/${ROOTFS_FILENAME}"
            export KERNEL_COMMIT=${KERNEL_COMMIT_ID}
            export LAVA_JOB_PRIORITY=25
            export KERNEL_CONFIG_URL=${BUILD_LOCATION}/config
            export KERNEL_DEFCONFIG_URL=${BUILD_LOCATION}/defconfig
            export KERNEL_URL="${BUILD_LOCATION}/${KERNEL_FILENAME}"
            export DTB_URL="${BUILD_LOCATION}/${DTB_FILENAME}"
            export BUILD_URL=${BUILD_LOCATION}
            export RECOVERY_IMAGE_URL=${BUILD_LOCATION}/juno-oe-uboot.zip
            export HDD_URL=${BUILD_LOCATION}/${HDD_IMG}
            rm build_env.sh
            rm ${MD5_FILENAME}
            rm ${BUILD_CONFIG}

            rm -rf configs
            git clone --depth 1 http://git.linaro.org/ci/job/configs.git

            for test in $(ls configs/openembedded-lkft/lava-job-definitions/testplan); do
                TEST_TEMPLATES="${TEST_TEMPLATES} testplan/${test}"
            done
            if [ ! -z "${KERNEL_DESCRIBE}" ]; then
                export QA_BUILD_VERSION=${KERNEL_DESCRIBE}
            else
                export QA_BUILD_VERSION=${KERNEL_COMMIT:0:12}
            fi

            env
            python configs/openembedded-lkft/submit_for_testing.py \
              --device-type ${DEVICE_TYPE} \
              --build-number ${BUILD_NUMBER} \
              --lava-server ${LAVA_SERVER} \
              --qa-server ${QA_SERVER} \
              --qa-server-team staging-lkft \
              --qa-server-project ${BUILD_NAME} \
              --git-commit ${QA_BUILD_VERSION} \
              --test-plan ${TEST_TEMPLATES}
    publishers:
        - groovy-postbuild:
            script:
                !include-raw: openembedded-lkft/postbuild.groovy
        - email-ext:
            recipients: 'lkft-triage@lists.linaro.org'
            matrix-trigger: only-configurations
            subject: '[CI] staging (no skiplist) ${BUILD_NAME}: ${DEVICE_TYPE} - ${BUILD_STATUS}'