aboutsummaryrefslogtreecommitdiff
path: root/odp-publish-gitstats.yaml
blob: 2d720721b07c8f672db0b23f90082a3d1d6a8333 (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
- job:
    name: odp-publish-gitstats
    project-type: matrix
    defaults: global
    description: |
        * Run gitstats on different ODP implementations and publish the result.
    logrotate:
        daysToKeep: 30
        numToKeep: 30
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
        - build-discarder:
            num-to-keep: 30
            days-to-keep: 30
    disabled: false
    node: master
    child-workspace: .
    display-name: 'ODP publish gitstats'
    triggers:
        - timed: '@daily'
    axes:
        - axis:
            type: user-defined
            name: platform_type
            values:
                - generic
                - dpdk
#                - ks2
        - axis:
            type: slave
            name: label
            values:
                - docker-jessie-amd64
    wrappers:
        - timestamps
        - matrix-tie-parent:
            node: master
        - timeout:
            timeout: 60
    builders:
        - shell: |
            #!/bin/bash
            # Assume build-dependencies packages are installed
            # build-essential git gitstats

            set -ex

            rm -rf odp

            sudo apt-get update
            sudo apt-get install -y --no-install-recommends gitstats

            case "${platform_type}" in
              generic)
                git clone git://git.linaro.org/lng/odp.git
                ;;
              netmap)
                git clone git://git.linaro.org/lng/odp-netmap.git odp
                ;;
              dpdk)
                git clone git://git.linaro.org/lng/odp-dpdk.git odp
                ;;
              ks2)
                git clone git://git.linaro.org/lng/odp-keystone2.git odp
                ;;
            esac

            mkdir odp/publishing
            cd odp
            gitstats -c max_authors=50 -c merge_authors="mike-holmes,Mike Holmes" -c merge_authors="santosh shukla,Santosh Shukla" -c merge_authors="Yan Sonming,Yan Songming" -c merge_authors="venkatesh vivekanandan,Venkatesh Vivekanandan" . ./publishing/linux-${platform_type}-gitstats
        - ssh:
            site: 'docs.opendataplane.org'
            target: 'incoming/odp-publish-gitstats/${platform_type}/${BUILD_NUMBER}'
            source: 'odp/publishing/**'
            command: |
                cd /srv/docs.opendataplane.org
                mkdir -p snapshots/odp-publish-gitstats/${platform_type}/${BUILD_NUMBER}
                cp -a incoming/odp-publish-gitstats/${platform_type}/${BUILD_NUMBER}/linux-${platform_type}-gitstats snapshots/odp-publish-gitstats/${platform_type}/${BUILD_NUMBER}/
                rm -rf $(pwd)/snapshots/odp-publish-gitstats/${platform_type}/latest
                ln -sf $(pwd)/snapshots/odp-publish-gitstats/${platform_type}/${BUILD_NUMBER} snapshots/odp-publish-gitstats/${platform_type}/latest
                rm -rf incoming/odp-publish-gitstats/${platform_type}/${BUILD_NUMBER}
            timeout: 120000
            remove-prefix: 'odp/publishing'
            always-publish-from-master: true
    publishers:
        - email:
            recipients: 'lng-ci@lists.linaro.org'