aboutsummaryrefslogtreecommitdiff
path: root/linaro-art-scripts-presubmit.yaml
blob: c745192745ae94dfc9bda60521815b2c9ab7ea37 (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
- job:
    name: linaro-art-scripts-presubmit
    project-type: freestyle
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-discover
            linaro-android-builders:
                - job-read
                - job-extended-read
                - job-workspace
            linaro-art:
                - job-build
                - job-read
                - job-extended-read
                - job-workspace
        - build-discarder:
            days-to-keep: 60
            num-to-keep: 60
    disabled: false
    node: aosp
    display-name: 'Scripts: Presubmit Test'
    concurrent: true
    triggers:
        - gerrit:
            server-name: android-review.linaro.org
            override-votes: true
            gerrit-build-successful-verified-value: 1
            gerrit-build-failed-verified-value: -1
            trigger-on:
                - patchset-created-event
            projects:
                - project-compare-type: 'PLAIN'
                  project-pattern: 'linaro-art/art-build-scripts'
                  branches:
                      - branch-pattern: 'master'
            silent: false
            silent-start: true
    wrappers:
        - timestamps
        - timeout:
            timeout: 10
    builders:
        - shell: |
            #!/bin/bash -xe

            ART_BUILD_SCRIPTS_DIR="${WORKSPACE}/art-build-scripts"

            if [[ -e "${ART_BUILD_SCRIPTS_DIR}/.git" ]]; then
              cd "${ART_BUILD_SCRIPTS_DIR}"
              # We want to keep the gitignored shellcheck binary, so no -x flag
              git clean -fd
              git reset --hard
            else
              # Make sure the target dir does not exist, so the clone won't fail
              rm -rf "${ART_BUILD_SCRIPTS_DIR}"
              git clone "https://android-git.linaro.org/git/linaro-art/art-build-scripts.git" \
                        "${ART_BUILD_SCRIPTS_DIR}"
              cd "${ART_BUILD_SCRIPTS_DIR}"
            fi

            if ! { git fetch "http://${GERRIT_HOST}/${GERRIT_PROJECT}" "${GERRIT_REFSPEC}" &&
                        git checkout FETCH_HEAD; }; then
              git reset --hard
              echo "Error: *** Applying patch with git fetch && git checkout FAILED"
              exit 1
            fi

            perl ${ART_BUILD_SCRIPTS_DIR}/jenkins/test_launcher.pl \
              ${ART_BUILD_SCRIPTS_DIR}/presubmit.sh
    publishers:
        - email:
            recipients: 'vishal.bhoj@linaro.org daniel.diaz@linaro.org julien.duraj@linaro.org'