aboutsummaryrefslogtreecommitdiff
path: root/bigdata-kibana.yaml
blob: acb9c96c6de359cc5fc65dfa05135216d69db223 (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
- job:
    name: bigdata-kibana
    project-type: freestyle
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 30
            artifact-num-to-keep: 1
    disabled: false
    node: docker-jessie-arm64
    display-name: 'Bigdata ELK - Kibana'
    wrappers:
        - timestamps
    builders:
        - shell: |
            #!/bin/bash

            set -ex

            # setup environments
            export LANG="en_US.UTF-8"

            # install prerequisites
            sudo apt-get -q=2 update
            sudo apt-get -q=2 -y install \
                git build-essential automake autoconf libtool libffi-dev \
                ruby-dev rubygems python curl zip rpm python-requests
            sudo gem install fpm -v 1.5.0
            sudo gem install pleaserun -v 0.0.24

            # clone the Kibana definitions
            git clone --depth 1 https://git.linaro.org/leg/bigdata/kibana.git -b v5.4.1 ${WORKSPACE}/kibana

            curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash
            source ${HOME}/.profile

            # Install the version of node.js listed in the .node-version file (this can be easily automated with tools such as nvm and avn)
            nvm install $(cat ${WORKSPACE}/kibana/.node-version)

            cd ${WORKSPACE}/kibana

            # Install npm dependencies
            npm install
            npm rebuild node-sass
            npm run build -- --deb --release
        - linaro-publish-token
        - shell: |
            #!/bin/bash

            mkdir -p out
            cp -a ${WORKSPACE}/kibana/kibana-*-arm64.deb* out/

            # Publish
            test -d ${HOME}/bin || mkdir ${HOME}/bin
            wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
            time python ${HOME}/bin/linaro-cp.py \
              --link-latest \
              out components/bigdata/elk/kibana/${BUILD_NUMBER}
    publishers:
        - email-ext:
            recipients: 'leg-bigdata@linaro.org, fathi.boudra@linaro.org'