aboutsummaryrefslogtreecommitdiff
path: root/trigger-lkft-hikey-stable.yaml
blob: 7a21d1411a1d7e12463b67eb2f14b0deccb4929e (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
- job:
    name: trigger-lkft-hikey-stable
    project-type: freestyle
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 180
            num-to-keep: 100
    disabled: false
    node: triggers
    display-name: 'Trigger for HiKey/HiKey960 Stable kernels'
    scm:
        - git:
            remotes:
                - hikey-stable:
                    url: https://android-git.linaro.org/git/kernel/hikey-linaro.git
                - linux-stable:
                    url: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
                    refspec: +refs/heads/linux-4.4.y:refs/remotes/linux-stable/linux-4.4.y +refs/heads/linux-4.9.y:refs/remotes/linux-stable/linux-4.9.y +refs/heads/linux-4.14.y:refs/remotes/linux-stable/linux-4.14.y +refs/heads/linux-4.19.y:refs/remotes/linux-stable/linux-4.19.y
            branches:
              - hikey-stable/android-4.4-o-hikey
              - hikey-stable/android-4.4-p-hikey
              - hikey-stable/android-4.9-o-hikey
              - hikey-stable/android-4.9-p-hikey
              - hikey-stable/android-4.9-q-hikey
              - hikey-stable/android-4.14-p-hikey
              - hikey-stable/android-4.14-q-hikey
              - hikey-stable/android-4.19-q-hikey
            skip-tag: true
            shallow-clone: false
            wipe-workspace: false
    triggers:
        - pollscm:
            cron: 'H H/3 * * *'
    wrappers:
        - timestamps
        - build-name:
            name: '#${BUILD_NUMBER}-${GIT_BRANCH#hikey-stable/}-${PROPFILE,file="properties.txt",property="KERNEL_DESCRIBE"}'
    builders:
        - shell: |
            #!/bin/bash -ex
            git clean -fdx
            env

            MAKE_KERNELVERSION=$(make kernelversion)
            KERNEL_BRANCH=${GIT_BRANCH#hikey-stable/}
            KERNEL_DESCRIBE=${MAKE_KERNELVERSION}-${GIT_COMMIT:0:12}

            echo KERNEL_DESCRIBE=${KERNEL_DESCRIBE} > properties.txt
            echo KERNEL_BRANCH=${KERNEL_BRANCH} >> properties.txt

            params=lkft-${KERNEL_BRANCH}.txt
            echo KERNEL_DESCRIBE=${KERNEL_DESCRIBE} >> $params
            echo SRCREV_kernel=${GIT_COMMIT} >> $params
            echo MAKE_KERNELVERSION=${MAKE_KERNELVERSION} >> $params
            echo KERNEL_BRANCH=${KERNEL_BRANCH} >> $params
            cat $params

            # generate files for the api callback build
            f_api_callbacks="all-kernels.txt"
            cp -fv  $params ${f_api_callbacks}
            QA_BUILD_VERSION=${KERNEL_DESCRIBE}
            echo "QA_BUILD_VERSION=${QA_BUILD_VERSION}" >> ${f_api_callbacks}
            echo "CALLER_JOB_NAME=${JOB_NAME}" >> ${f_api_callbacks}
            echo "CALLER_BUILD_NUMBER=${BUILD_NUMBER}" >>${f_api_callbacks}

        - inject:
            properties-file: all-kernels.txt
        - shell:
            !include-raw:
                - lkft/common/api-callbacks.sh

        - trigger-builds:
            - project: lkft-hikey-4.4-o
              property-file: lkft-android-4.4-o-hikey.txt
            - project: lkft-hikey-4.4-p
              property-file: lkft-android-4.4-p-hikey.txt
            - project: lkft-hikey-4.9-o
              property-file: lkft-android-4.9-o-hikey.txt
            - project: lkft-hikey-aosp-4.9-premerge-ci
              property-file: lkft-android-4.9-p-hikey.txt
            - project: lkft-hikey-10.0-4.9-q
              property-file: lkft-android-4.9-q-hikey.txt
            - project: lkft-hikey-aosp-4.14-premerge-ci
              property-file: lkft-android-4.14-p-hikey.txt
            - project: lkft-hikey-10.0-4.14-q
              property-file: lkft-android-4.14-q-hikey.txt
            - project: lkft-hikey-android-10.0-gsi-4.19
              property-file: lkft-android-4.19-q-hikey.txt