Project

Profile

Help

How to connect?
Download (2.89 KB) Statistics View on GitHub Reload from mirrored respository
| Branch: | Tag: | Revision:

root / jobs / run-inner-mdbci-unit-tests.yaml @ master

1
- job:
2
    name: run-inner-mdbci-unit-tests
3
    description: 'This job performs running inner mdbci unit tests.'
4
    key_one: &SORTED_GIT_BRANCHES_FILE_PATH '/home/vagranttest/mdbci_jenkins_config/branch_list'
5
    parameters:
6
        - string:
7
              name: BOXES_JSON_PATH
8
              default: /home/vagrant/mdbci/BOXES
9
              description:  'Directory for box descriptions.'
10
        - string:
11
              name: MDBCI_CONFS
12
              default: /home/vagranttest/conf
13
              description:  'Directory with mdbci configs.'
14
        - string:
15
              name: MDBCI_REPOSITORY
16
              default: git@github.com:OSLL/mdbci.git
17
              description:  'MDBCI repository.'
18
        - string:
19
              name: SORTED_GIT_BRANCHES_FILE_PATH
20
              default: *SORTED_GIT_BRANCHES_FILE_PATH
21
              description:  'Path to sorted branches (from mdbci_branches job).'
22
        - extended-choice:
23
              name: MDBCI_BRANCH
24
              description: "MDBCI branch"
25
              type: 'PT_SINGLE_SELECT'
26
              property-file: *SORTED_GIT_BRANCHES_FILE_PATH
27
              property-key: branch_name
28
              default-property-file: $WORKSPACE/last_modified_branch
29
              default-property-key: LAST_MODIFIED_BRANCH
30
    wrappers:
31
        - workspace-cleanup:
32
              dirmatch: true
33
        - pre-scm-buildstep:
34
            - shell: |
35
                if [ -z "$MDBCI_BRANCH" ]; then
36
                        echo "LAST_MODIFIED_BRANCH=$(cat $SORTED_GIT_BRANCHES_FILE_PATH | awk -F"=" '{i=index($0,"=");print substr($0,i+1)}' | awk -F"," '{print $1}')" > last_modified_branch
37
                else
38
                        echo "LAST_MODIFIED_BRANCH=${MDBCI_BRANCH}" > last_modified_branch
39
                fi
40
            - inject:
41
                properties-file: $WORKSPACE/last_modified_branch
42
    scm:
43
        - git:
44
            url: $MDBCI_REPOSITORY
45
            branches:
46
                - $LAST_MODIFIED_BRANCH
47
    triggers:
48
        - reverse:
49
            jobs: 'mdbci_branching'
50
            result: 'success'
51
    builders:
52
        - shell: 
53
            'ruby -c `find ./ | grep ".rb"`'
54
        - shell: |
55
            ln -s $MDBCI_CONFS/aws-config.yml aws-config.yml
56
            ln -s $MDBCI_CONFS/maxscale.pem maxscale.pem
57
            mkdir -p ./BOXES
58
            cp $BOXES_JSON_PATH/* ./BOXES
59
            ./scripts/run_unit_tests.sh
60
            ./scripts/run_integration_tests.sh
61
    publishers:
62
        - email-ext:
63
            recipients: $DEFAULT_RECIPIENTS
64
            reply-to: $DEFAULT_REPLYTO
65
            content-type: default
66
            subject: $DEFAULT_SUBJECT - $LAST_MODIFIED_BRANCH
67
            body: $DEFAULT_CONTENT
68
            attach-build-log: false
69
            always: true
70
            aborted: true
71
            failure: true
72
            still-failing: true
73
            success: true
74
            fixed: true
75
            send-to:
76
               - recipients
77
               - developers
(3-3/4)