aboutsummaryrefslogtreecommitdiff
path: root/trigger-lkft-aosp-mainline.yaml
blob: 198c8084b73f6989c53464d4f789b118bacab17f (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
- job:
    name: trigger-lkft-aosp-mainline
    project-type: freestyle
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 30
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
    parameters:
        - string:
            name: KERNEL_BRANCH
            default: 'android-mainline'
    disabled: false
    node: master
    display-name: 'Trigger for LKFT android-mainline builds'
    scm:
        - git:
            remotes:
                - android-mainline:
                    url: https://android.googlesource.com/kernel/common
                    refspec: +refs/heads/android-mainline:refs/remotes/android-mainline/android-mainline
                - linux-stable:
                    url: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
                    refspec: +refs/heads/master:refs/remotes/master/master
            branches:
                - android-mainline/android-mainline
            skip-tag: true
            shallow-clone: false
            wipe-workspace: false
    triggers:
        - pollscm: 'H/30 * * * *'
    wrappers:
        - timestamps
        - build-name:
            name: '#${BUILD_NUMBER}-${PROPFILE,file="properties.txt",property="KERNEL_DESCRIBE"}'
    builders:
        - shell: |
            #!/bin/bash -e
            KERNEL_DESCRIBE=$(git describe --always)
            echo KERNEL_DESCRIBE=${KERNEL_DESCRIBE} > properties.txt
            echo KERNEL_BRANCH=${KERNEL_BRANCH} >> properties.txt

            echo KERNEL_DESCRIBE=${KERNEL_DESCRIBE} > lkft_parameters
            echo SRCREV_kernel=${GIT_COMMIT} >> lkft_parameters
            echo MAKE_KERNELVERSION=$(make kernelversion) >> lkft_parameters
            echo KERNEL_BRANCH=${KERNEL_BRANCH} >> lkft_parameters
            cat lkft_parameters

            # call api of android.linaro.org for lkft report check scheduling
            if [ -n "${KERNEL_BRANCH}" ] && [ -n "${KERNEL_DESCRIBE}" ] && [ -n "${JOB_NAME}" ] && [ -n "${BUILD_NUMBER}" ]; then
                curl http://android.linaro.org:9000/lkft/newchanges/${KERNEL_BRANCH}/${KERNEL_DESCRIBE}/${JOB_NAME}/${BUILD_NUMBER} || true
            fi
    publishers:
        - trigger-parameterized-builds:
            - project:
                - 'lkft-x15-aosp-master-mainline'
              condition: SUCCESS
              property-file: lkft_parameters
            - project:
                - 'lkft-hikey960-aosp-master-mainline-gki'
              condition: SUCCESS
              property-file: lkft_parameters
            - project:
                - 'lkft-db845c-aosp-master-mainline'
              condition: SUCCESS
              property-file: lkft_parameters