aboutsummaryrefslogtreecommitdiff
path: root/trigger-oe-recipe-kselftests-next.yaml
blob: 43a953a435620fd7b60e9f5ae8249dda45b99dad (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
- job:
    name: trigger-oe-recipe-kselftests-next
    project-type: freestyle
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 30
    disabled: false
    node: master
    display-name: 'Trigger for kselftests from linux-next (new update notification)'
    scm:
        - git:
            url: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
            refspec: +refs/heads/master:refs/remotes/origin/master
            name: origin
            branches:
                - refs/heads/master
            skip-tag: true
            shallow-clone: false
            wipe-workspace: false
    triggers:
        - pollscm:
            cron: 'H/5 * * * *'
    wrappers:
        - timestamps
        - build-name:
            name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
    builders:
        - shell: |
            #!/bin/bash -x

            trap cleanup_exit INT TERM EXIT

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

            tag=$(git describe --tags --abbrev=0)
            version=$(echo ${tag} | cut -d'-' -f3)

            git clone -b morty --depth 1 https://github.com/96boards/meta-rpb.git
            recipe=$(find meta-rpb -type f -name 'kselftests-next_git.bb')
            sed -i "s|^SRCREV = .*|SRCREV = \"${GIT_COMMIT}\"|" ${recipe}
            sed -i "s|^PV = .*|PV = \"${version}+git\${SRCPV}\"|" ${recipe}

            cd meta-rpb && git diff > ${WORKSPACE}/kselftests-next-recipe-update.patch
    publishers:
        - email-ext:
            recipients: 'fathi.boudra@linaro.org'
            body: |
                Project: ${PROJECT_NAME}
                Build number: ${BUILD_NUMBER}
                Build status: ${BUILD_STATUS}
                Build URL: ${BUILD_URL}
                Build summary:

                New upstream commit: ${GIT_URL} ${GIT_BRANCH}

                Please, update OpenEmbedded recipe to ${GIT_COMMIT}.
            attachments: '*.patch'
            always: true