summaryrefslogtreecommitdiffstats
path: root/jjb/genesis/genesis-fuel-att.yml
blob: 785a569e2da18ae7f448dd0687bafa3066bf110a (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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# this is the job configuration for bgs
- project:
    name: genesis-att
    installer:
      - fuel
    jobs:
      - 'genesis-{installer}-daily-att-{stream}'

    # stream:    branch with - in place of / (eg. stable-helium)
    # branch:    branch (eg. stable/helium)
    stream:
        - master:
            branch: 'master'

    project: 'genesis'

########################
# job templates
########################

- job-template:
    name: 'genesis-{installer}-daily-att-{stream}'

    node: att-build

    parameters:
        - string:
            name: BUILD_DIRECTORY
            default: $WORKSPACE/build_output
            description: "Directory where the build artifact will be located upon the completion of the build."
        - string:
            name: GS_URL
            default: 'artifacts.opnfv.org/genesis/{installer}'
            description: "URL to Google Storage."
        - string:
            name: INSTALLER
            default: '{installer}'
            description: "Installer to use."
        - string:
            name: GIT_BASE
            default: https://gerrit.opnfv.org/gerrit/genesis
        - string:
            name: GERRIT_BRANCH
            default: origin/master
            description: "Branch to build, deploy and test."
        - string:
            name: GERRIT_REFSPEC
            default: refs/heads/master
            description: "Refspec to retrieve."

    scm:
        - git:
            skip-tag: true
            url: $GIT_BASE
            branches:
                - $GERRIT_BRANCH
            refspec: $GERRIT_REFSPEC

    triggers:
        - pollscm: '@midnight'

    logrotate:
        daysToKeep: 30
        numToKeep: 10
        artifactDaysToKeep: -1
        artifactNumToKeep: -1

    builders:
      - '{installer}-daily-master-att'

########################
# builder macros
########################

- builder:
    name: fuel-daily-master-att
    builders:
      - shell: |
          #!/bin/bash
          set -o errexit
          set -o nounset
          set -o pipefail
          set -x

          # set/create the cache location
          OPNFV_FUEL_CACHE="$(dirname $WORKSPACE)/opnfv_fuel_cache"
          [[ -d $OPNFV_FUEL_CACHE ]] || mkdir -p $OPNFV_FUEL_CACHE

          # do the build
          cd $WORKSPACE/fuel/ci
          ./build.sh -f t -v $BUILD_ID -c file://$OPNFV_FUEL_CACHE $BUILD_DIRECTORY
n">result = {} p = ping.Ping(args, self.ctx) mock_ssh.SSH().execute.return_value = (0, '100', '') self.assertRaises(AssertionError, p.run, result) @mock.patch('yardstick.benchmark.scenarios.networking.ping.ssh') def test_ping_unsuccessful_script_error(self, mock_ssh): args = { 'options': {'packetsize': 200}, 'sla': {'max_rtt': 50}, 'target': 'ares.demo' } result = {} p = ping.Ping(args, self.ctx) mock_ssh.SSH().execute.return_value = (1, '', 'FOOBAR') self.assertRaises(RuntimeError, p.run, result) def main(): unittest.main() if __name__ == '__main__': main()