aboutsummaryrefslogtreecommitdiff
path: root/trigger-linux-linaro-tracking-ll.yaml
blob: 1fd5c94bfddfb49c4b190111ece46c5d72635fd0 (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
- job:
    name: trigger-linux-linaro-tracking-ll
    project-type: freestyle
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 30
    properties:
        - authorization:
            anonymous:
                - job-read
    disabled: false
    node: build
    display-name: 'Trigger for Linux Linaro Kernel (ll)'
    scm:
        - git:
            url: https://git.linaro.org/kernel/linux-linaro-tracking.git
            refspec: +refs/heads/linux-linaro:refs/remotes/origin/linux-linaro
            name: origin
            branches:
                - refs/heads/linux-linaro
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
    triggers:
        - pollscm: 'H/5 * * * *'
    wrappers:
        - timestamps
        - build-name:
            name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
    builders:
        - shell: |
            #!/bin/bash

            trap cleanup_exit INT TERM EXIT

            cleanup_exit()
            {
              cd ${WORKSPACE}
              rm -rf meta-linaro
            }

            git clone --depth 1 http://git.linaro.org/openembedded/meta-linaro.git

            VERSION=`grep "^VERSION =" Makefile | cut -d' ' -f3`.`grep "^PATCHLEVEL =" Makefile | cut -d' ' -f3`

            ll_recipe=`find meta-linaro -type f -name 'linux-linaro-aarch64.bb'`
            sed -i "s|^SRCREV_kernel=.*|SRCREV_kernel=\"${GIT_COMMIT}\"|" ${ll_recipe}
            sed -i "s|^PV = .*|PV = \"${VERSION}+git\${SRCPV}\"|" ${ll_recipe}

            ll_recipe=`find meta-linaro -type f -name 'linux-linaro-vexpress_git.bb'`
            sed -i "s|^SRCREV_kernel=.*|SRCREV_kernel=\"${GIT_COMMIT}\"|" ${ll_recipe}
            sed -i "s|^PV = .*|PV = \"${VERSION}+git\${SRCPV}\"|" ${ll_recipe}

            cd meta-linaro && git diff > ${WORKSPACE}/linux-linaro-recipe-update.patch
        - trigger-builds:
            - project: 'linux-linaro-tracking-ll'
    publishers:
        - email-ext:
            recipients: 'fathi.boudra@linaro.org, koen.kooi@linaro.org'
            attachments: '*.patch'
            always: true