aboutsummaryrefslogtreecommitdiff
path: root/bd-kibana-deb.yaml
blob: acf4c218001fa91c460ea4e2a64f29b75d702705 (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: bd-kibana-deb
    project-type: freestyle
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 30
        artifactNumToKeep: 1
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
    parameters:
    disabled: false
    node: docker-jessie-arm64
    display-name: 'Kibana (deb)'
    wrappers:
        - timestamps
    builders:
        - shell: |
            #!/bin/bash

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

            # install prerequisites
            sudo apt-get update -y
            sudo apt-get install -y git build-essential automake autoconf libtool
            sudo apt-get install -y libffi-dev ruby-dev rubygems python2.7
            sudo apt-get install -y curl zip rpm
            sudo gem install fpm -v 1.5.0
            sudo gem install pleaserun -v 0.0.24
            sudo ln -s /usr/bin/python2.7 /usr/bin/python

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

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

            # 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 .node-version)"

            # Install npm dependencies
            npm install
            npm rebuild node-sass

            npm run build -- --deb --release

    publishers:
        - archive:
            artifacts: 'kibana/output/**'
        - email-ext:
            recipients: 'leg-bigdata@linaro.org, fathi.boudra@linaro.org'