github.com/justinjmoses/evergreen@v0.0.0-20170530173719-1d50e381ff0d/cli/testdata/sample.yml (about)

     1  functions:
     2    "fetch source" :
     3      - command: git.get_project
     4        params:
     5          directory: src
     6      - command: shell.exec
     7        params:
     8          working_dir: src
     9          script: |
    10            echo "this is a 2nd command in the function!"
    11            ls
    12    "debug":
    13      command: shell.exec
    14      params:
    15        script: |
    16          echo "i am a debug function."
    17    "run a task that fails" :
    18      command: shell.exec
    19      params:
    20        working_dir: src
    21        script: |
    22          echo "this is a function with only a single command to run!"
    23          ./run.py results fail
    24  
    25    "run a task that passes" :
    26      command: shell.exec
    27      params:
    28        working_dir: src
    29        script: |
    30          ./run.py results pass
    31  
    32    "run a function with an arg":
    33      command: shell.exec
    34      params:
    35        working_dir: src
    36        script: |
    37          echo "I was called with ${foobar}"
    38  
    39  pre:
    40    command: shell.exec
    41    params:
    42      script: |
    43        rm -rf src || true
    44        echo "pre-task run. JUST ONE COMMAND"
    45  
    46  post:
    47    - command: shell.exec
    48      params:
    49        script: |
    50          echo "post-task run."
    51          true
    52    - command: attach.results
    53      params:
    54        file_location: src/results.json
    55  
    56  tasks:
    57  - name: compile
    58    depends_on: []
    59    commands:
    60      - func: "fetch source"
    61      - func: "run a task that passes" 
    62      - func: "run a function with an arg"
    63        vars:
    64          foobar: "TESTING: ONE"
    65      - func: "run a function with an arg"
    66        vars:
    67          foobar: "TESTING: TWO"
    68  
    69  - name: passing_test 
    70    depends_on: 
    71    - name: compile
    72    commands:
    73      - func: "fetch source"
    74      - func: "run a task that passes"
    75  
    76  - name: failing_test 
    77    depends_on: 
    78    - name: compile
    79    commands:
    80      - func: "fetch source"
    81      - func: "run a task that fails"
    82  
    83  - name: timeout_test
    84    depends_on: 
    85    - name: compile
    86    commands:
    87      - func: "fetch source"
    88      - command: shell.exec
    89        timeout_secs: 20
    90        params:
    91          working_dir: src
    92          script: |
    93             echo "this is going to timeout"
    94             ./run.py timeout
    95  
    96  modules:
    97  - name: render-module
    98    repo: git@github.com:evergreen-ci/render.git
    99    prefix: modules
   100    branch: master
   101  
   102  buildvariants:
   103  - name: osx-108
   104    display_name: OSX
   105    modules: ~
   106    run_on:
   107    - localtestdistro
   108    expansions:
   109      test_flags: "blah blah"
   110    tasks:
   111    - name: compile
   112    - name: passing_test
   113    - name: failing_test
   114    - name: timeout_test
   115  - name: ubuntu
   116    display_name: Ubuntu
   117    modules: ["render-module"]
   118    run_on:
   119    - ubuntu1404-test
   120    expansions:
   121      test_flags: "blah blah"
   122    tasks:
   123    - name: compile
   124    - name: passing_test
   125    - name: failing_test
   126    - name: timeout_test
   127