aboutsummaryrefslogtreecommitdiff
path: root/ci-yadp-builder-sanity-check.yaml
blob: fc49d3f7ab59d7df97a5c25561dcea22abbe1900 (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
- job:
    name: ci-yadp-builder-sanity
    project-type: freestyle
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 30
    disabled: false
    node: master
    display-name: 'CI YADP config builder sanity check'
    triggers:
        - gerrit:
            server-name: 'review.linaro.org'
            trigger-on:
                - patchset-created-event
            projects:
                - project-compare-type: 'PLAIN'
                  project-pattern: 'infrastructure/ci-yadp-builder'
                  branches:
                    - branch-pattern: 'master'
            silent-start: true
    wrappers:
        - timestamps
        - credentials-binding:
            - text:
                credential-id: JJB_USER
                variable: JJB_USER
            - text:
                credential-id: JJB_PASSWORD
                variable: JJB_PASSWORD
    builders:
        - shell: |
            #!/bin/bash -e
            echo "#${BUILD_NUMBER}-${GERRIT_PATCHSET_REVISION:0:8}" > ${WORKSPACE}/version.txt
        - build-name-setter:
            name: 'version.txt'
            file: true
        - shell: |
            #!/bin/bash

            set -e

            echo ""
            echo "########################################################################"
            echo "    Gerrit Environment"
            env |grep '^GERRIT'
            echo "########################################################################"

            rm -rf ${WORKSPACE}/*

            git clone -b ${GERRIT_BRANCH} --depth 2 https://review.linaro.org/${GERRIT_PROJECT}
            cd *
            git fetch https://review.linaro.org/${GERRIT_PROJECT} ${GERRIT_REFSPEC}
            git checkout -q FETCH_HEAD

            python yadp_builder_v2.py --dryrun
    publishers:
        - email:
            recipients: 'fathi.boudra@linaro.org ben.copeland@linaro.org'