aboutsummaryrefslogtreecommitdiff
path: root/lava-dispatcher.yaml
blob: 35eda3cac1fa7e75956e2473773e4d02425b85f6 (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
- job:
    name: lava-dispatcher
    project-type: freestyle
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 30
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
    disabled: false
    node: lavabot
    display-name: 'PEP8 and Unit Test CI Job for lava-dispatcher'
    triggers:
        - gerrit:
            server-name: 'review.linaro.org'
            override-votes: true
            gerrit-build-successful-codereview-value: 1
            gerrit-build-failed-codereview-value: -1
            trigger-for-unreviewed-patches: true
            readable-message: false
            successful-message: 'PEP8 and Units Tests Successful'
            start-message: 'PEP8 and Units Tests Started'
            failure-message: 'PEP8 and Units Tests Failed'
            custom-url: '${BUILD_URL}/console'
            projects:
                - project-compare-type: 'PLAIN'
                  project-pattern: 'lava/lava-dispatcher'
                  branches:
                    - branch-compare-type: 'PLAIN'
                      branch-pattern: 'master'
    wrappers:
        - timestamps
    builders:
        - shell: |
            #!/bin/bash

            rm -rf ${WORKSPACE}/*
            set -x
            echo "#${BUILD_NUMBER}-${GERRIT_PATCHSET_REVISION:0:8}" > ${WORKSPACE}/version.txt
            git clone -b ${GERRIT_BRANCH} https://git.linaro.org/${GERRIT_PROJECT}
            cd *
            git fetch https://review.linaro.org/${GERRIT_PROJECT} ${GERRIT_REFSPEC}
            set +x
            git checkout FETCH_HEAD
            git log -n3
            set -e
            echo
            echo "Running test for python2 and 3"
            echo
            ./ci-run -a
            echo
            echo "Running package test build"
            echo
            /usr/share/lava-server/debian-dev-build.sh -p lava-dispatcher
        - build-name-setter:
            name: 'version.txt'
            file: true