aboutsummaryrefslogtreecommitdiff
path: root/lkft-gki-kernel.yaml
blob: 6a0a04c509bd7e91d15832e0fd25f5f6c413a13f (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
- job:
    name: lkft-gki-kernel
    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: 500
            artifact-num-to-keep: 1
    parameters:
        - string:
            name: BUILD_DIR
            default: lkft
        - string:
            name: ANDROID_BUILD_CONFIG
        - string:
            name: ANDROID_BUILD_CONFIG_TO_BE_TRIGGERED
            default: ""
        - string:
            name: TEST_OTHER_PLANS_OVERRIDE
            default: ""
        - string:
            name: KERNEL_DESCRIBE
        - string:
            name: KERNEL_BRANCH
        - string:
            name: SRCREV_kernel
        - string:
            name: MAKE_KERNELVERSION
    disabled: false
    node: docker-bionic-android-lkft
    display-name: 'LKFT - build android gki kernels'
    wrappers:
        - timestamps
        - build-name:
            name: '#${BUILD_NUMBER}-${ENV,var="KERNEL_DESCRIBE"}-${ENV,var="KERNEL_BRANCH"}'
        - timeout:
            timeout: 500
        - credentials-binding:
            - text:
                credential-id: ARTIFACTORIAL_TOKEN
                variable: ARTIFACTORIAL_TOKEN
    builders:
        - shell:
            !include-raw: lkft/common/builders-v2.sh
        - linaro-publish-token
        - shell:
            !include-raw: lkft/common/publisher-v2.sh
        - shell: |
            #!/bin/bash -ex
            env

            ###########################STEPS TO ADD NEW BRANCH######################
            ### 1. add variant of build_configs_${ANDROIDVERSION}_${KERVERMAJ}${KERVERMIN}
            ### 2. set build_configs in the case linesBefore
            ### 3. add enties for the trigger-builds
            ########################################################################
            # https://snapshots.linaro.org/android/lkft/lkft-gki-android-mainline/67/lkft-gki-android-5.4-Image.gz
            f_gki_image_gz_url=android/lkft/${JOB_NAME}/${BUILD_NUMBER}/${ANDROID_BUILD_CONFIG}-Image.gz

            build_configs_mainline="lkft-db845c-aosp-master-mainline-gki lkft-hikey960-aosp-master-mainline-gki"
            build_configs_12_510="lkft-db845c-aosp-master-android12-5.10-gki lkft-hikey960-aosp-master-android12-5.10-gki lkft-member-wrapper"
            build_configs_12_54="lkft-db845c-aosp-master-5.4-gki lkft-hikey960-aosp-master-5.4-gki lkft-member-wrapper"
            build_configs_11_54="lkft-db845c-android11-android11-5.4-gki lkft-hikey960-android11-android11-5.4-gki"
            build_configs_11_54_premerge="lkft-db845c-android11-android11-5.4-gki-premerge lkft-hikey960-android11-android11-5.4-gki-premerge"
            build_configs_11_54_lts="lkft-db845c-android11-android11-5.4-lts-gki lkft-hikey960-android11-android11-5.4-lts-gki"

            build_configs=""
            if [ -z "${ANDROID_BUILD_CONFIG_TO_BE_TRIGGERED}" ]; then
                case "X${KERNEL_BRANCH}" in
                    "Xandroid11-5.4")
                        if [ "X${ANDROID_BUILD_CONFIG}" = "Xlkft-gki-android11-5.4-premerge" ]; then
                          build_configs="${build_configs_11_54_premerge}"
                        else
                          build_configs="${build_configs_11_54}"
                        fi
                        ;;
                    "Xandroid11-5.4-lts")
                        build_configs="${build_configs_11_54_lts}"
                        ;;
                    "Xandroid12-5.4")
                        build_configs="${build_configs_12_54}"
                        ;;
                    "Xandroid12-5.10")
                        build_configs="${build_configs_12_510}"
                        ;;
                    "Xandroid-mainline")
                        build_configs="${build_configs_mainline}"
                        ;;
                    "X*")
                        build_configs=""
                        ;;
                esac
            else
                build_configs="${ANDROID_BUILD_CONFIG_TO_BE_TRIGGERED}"
            fi

            rm -fr params_*.txt test_*.txt
            for build_config in ${build_configs}; do
                f_params="params_${KERNEL_BRANCH}-${build_config}.txt"

                cat << __EOF__ > ${f_params}
            ANDROID_BUILD_CONFIG=${build_config}
            KERNEL_DESCRIBE=${KERNEL_DESCRIBE}
            KERNEL_BRANCH=${KERNEL_BRANCH}
            SRCREV_kernel=${SRCREV_kernel}
            BUILD_REFERENCE_IMAGE_GZ_URL=http://snapshots.linaro.org/${f_gki_image_gz_url}
            MAKE_KERNELVERSION=${MAKE_KERNELVERSION}
            TEST_OTHER_PLANS_OVERRIDE=${TEST_OTHER_PLANS_OVERRIDE}
            __EOF__

                cat ${f_params}
            done

        - trigger-builds:
            - project: lkft-generic-build
              property-file: params_android11-5.4-lts-lkft-db845c-android11-android11-5.4-lts-gki.txt
            - project: lkft-generic-build
              property-file: params_android11-5.4-lts-lkft-hikey960-android11-android11-5.4-lts-gki.txt
            - project: lkft-generic-build
              property-file: params_android11-5.4-lkft-db845c-android11-android11-5.4-gki.txt
            - project: lkft-generic-build
              property-file: params_android11-5.4-lkft-hikey960-android11-android11-5.4-gki.txt
            - project: lkft-generic-build
              property-file: params_android11-5.4-lkft-db845c-android11-android11-5.4-gki-premerge.txt
            - project: lkft-generic-build
              property-file: params_android11-5.4-lkft-hikey960-android11-android11-5.4-gki-premerge.txt
            - project: lkft-generic-build
              property-file: params_android12-5.4-lkft-db845c-aosp-master-5.4-gki.txt
            - project: lkft-generic-build
              property-file: params_android12-5.4-lkft-hikey960-aosp-master-5.4-gki.txt
            - project: lkft-member-wrapper
              property-file: params_android12-5.4-lkft-member-wrapper.txt
            - project: lkft-generic-build
              property-file: params_android11-5.4-weekly-lkft-db845c-android11-android11-5.4-gki.txt
            - project: lkft-generic-build
              property-file: params_android11-5.4-weekly-lkft-hikey960-android11-android11-5.4-gki.txt
            - project: lkft-generic-build
              property-file: params_android12-5.4-weekly-lkft-db845c-aosp-master-5.4-gki.txt
            - project: lkft-generic-build
              property-file: params_android12-5.4-weekly-lkft-hikey960-aosp-master-5.4-gki.txt
            - project: lkft-generic-build
              property-file: params_android12-5.10-lkft-db845c-aosp-master-android12-5.10-gki.txt
            - project: lkft-generic-build
              property-file: params_android12-5.10-lkft-hikey960-aosp-master-android12-5.10-gki.txt
            - project: lkft-member-wrapper
              property-file: params_android12-5.10-lkft-member-wrapper.txt
            - project: lkft-generic-build
              property-file: params_android-mainline-lkft-db845c-aosp-master-mainline-gki.txt
            - project: lkft-generic-build
              property-file: params_android-mainline-lkft-hikey960-aosp-master-mainline-gki.txt
            - project: lkft-generic-build
              property-file: params_android-mainline-lkft-hikey-aosp-master-mainline-gki.txt

    publishers:
        - logparser:
            parse-rules: '/var/jenkins_home/userContent/android.parse'
            unstable-on-warning: false
            fail-on-error: false
        - fingerprint:
            files: 'build/fingerprints/*'
        - groovy-postbuild:
            script:
                !include-raw: openembedded-lkft/postbuild.groovy
        - email:
            recipients: 'lkft-maintainers@lists.linaro.org'
            subject: '[CI]  android gki + aosp master ${KERNEL_BRANCH} ${SRCREV_kernel} ${BUILD_STATUS}'
            body: |
                Build URL: ${PROJECT_URL}${BUILD_NUMBER}/
                Full log: ${PROJECT_URL}${BUILD_NUMBER}/consoleText
                Git branch: ${KERNEL_BRANCH}
                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