aboutsummaryrefslogtreecommitdiff
path: root/trigger-openembedded-lkft-linaro-hikey-stable-rc-4.4.yaml
blob: 2f8308410f6525b3315605e305623fd334740cbe (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
- job:
    name: trigger-openembedded-lkft-linaro-hikey-stable-rc-4.4
    project-type: freestyle
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 30
    parameters:
        - string:
            name: LINUX_TAG_PATTERN
            default: "4.4.*-rc*-hikey-*"
            description: "Linux tag to build (from lkft/arm64-stable-rc and linux-stable trees)."
    disabled: false
    node: master
    display-name: 'Trigger for LKFT - Linux Stable RC 4.4 + HiKey'
    wrappers:
        - timestamps
    builders:
        - shell: |
            #!/bin/bash -e

            test -d arm64-stable-rc || git init arm64-stable-rc
            cd arm64-stable-rc

            git remote add arm64-stable-rc https://git.linaro.org/lkft/arm64-stable-rc.git || true
            git remote add linux-stable-4.4 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git || true

            git fetch --no-tags arm64-stable-rc  +refs/tags/4.4.*:refs/tags/4.4.*
            git fetch --no-tags linux-stable-4.4 +refs/tags/v4.4.*:refs/tags/v4.4.*

            tag=$(git tag -l "${LINUX_TAG_PATTERN}" | sort -V | tail -n1)
            git checkout ${tag}

            echo KERNEL_BRANCH=$(git describe --tags --abbrev=0) > ${WORKSPACE}/lkft_parameters
            echo KERNEL_DESCRIBE=$(git describe --always) >> ${WORKSPACE}/lkft_parameters
            echo SRCREV_kernel=$(git rev-parse HEAD) >> ${WORKSPACE}/lkft_parameters
            echo MAKE_KERNELVERSION=$(make kernelversion) >> ${WORKSPACE}/lkft_parameters
            cat ${WORKSPACE}/lkft_parameters

            . ${WORKSPACE}/lkft_parameters
            echo "#${BUILD_NUMBER}-${SRCREV_kernel:0:8}" > ${WORKSPACE}/version.txt
        - build-name-setter:
            name: 'version.txt'
            file: true
    publishers:
        - trigger-parameterized-builds:
            - project:
                - 'openembedded-lkft-linaro-hikey-stable-rc-4.4'
              condition: SUCCESS
              property-file: lkft_parameters
        - email-ext:
            recipients: 'lkft-maintainers@lists.linaro.org, sumit.semwal@linaro.org, fathi.boudra@linaro.org, milosz.wasilewski@linaro.org'
            body: |
                Project: ${PROJECT_NAME}
                Build number: ${BUILD_NUMBER}
                Build status: ${BUILD_STATUS}
                Build URL: ${BUILD_URL}

                New upstream tag:
                https://git.linaro.org/lkft/arm64-stable-rc.git
            always: true