/
gpii-express-user.yml
86 lines (82 loc) · 2.82 KB
/
gpii-express-user.yml
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
- job:
name: gpii-express-user-tests
description: 'Main Jenkins job responsible for orchestrating tasks required to run gpii-express-user tests.'
project-type: multijob
node: h-0005.tor1.incd.ca
properties:
# Required by the GitHub PR builder plugin.
- github:
url: https://github.com/GPII/gpii-express-user/
triggers:
- gh-pr-builder
scm:
- gh-pr-scm
builders:
# Each parent multijob builder passes the Jenkins WORKSPACE environment
# variable to its child job as a parameter so that a common Git working
# directory can be used.
- multijob:
name: gpii-express-user-create-vm
condition: COMPLETED
projects:
- name: gpii-express-user-create-vm
predefined-parameters: parent_workspace=$WORKSPACE
- multijob:
name: gpii-express-user-all-tests
condition: COMPLETED
projects:
- name: gpii-express-user-all-tests
predefined-parameters: parent_workspace=$WORKSPACE
- multijob:
name: gpii-express-user-linting
condition: COMPLETED
projects:
- name: gpii-express-user-linting
predefined-parameters: parent_workspace=$WORKSPACE
- multijob:
name: gpii-express-user-delete-vm
condition: SUCCESSFUL
projects:
- name: gpii-express-user-delete-vm
predefined-parameters: parent_workspace=$WORKSPACE
publishers:
- archive:
artifacts: "reports/**, coverage/**"
allow-empty: true
only-if-success: true
- job:
name: gpii-express-user-create-vm
description: 'Create a test VM.'
node: h-0005.tor1.incd.ca
workspace: $parent_workspace
builders:
# Setting BUILD_ID for vagrant to make sure Jenkins process tree killer doesn't kill the VM
# before the next job is started
- shell: DISPLAY=:0 BUILD_ID=gpii-express-user vagrant up --provider virtualbox
- job:
name: gpii-express-user-all-tests
description: 'Run all gpii-express-user tests.'
node: h-0005.tor1.incd.ca
workspace: $parent_workspace
builders:
- shell: DISPLAY=:0 BUILD_ID=gpii-express-user vagrant ci test
publishers:
- email:
recipients: ci@lists.gpii.net
- job:
name: gpii-express-user-linting
description: 'Run gpii-express-user linting checks.'
node: h-0005.tor1.incd.ca
workspace: $parent_workspace
builders:
- shell: vagrant winrm -c "do.ps1 -c 'grunt lint'"
publishers:
- email:
recipients: ci@lists.gpii.net
- job:
name: gpii-express-user-delete-vm
description: 'Delete the test VM.'
node: h-0005.tor1.incd.ca
workspace: $parent_workspace
builders:
- shell: vagrant halt -f && sleep 5 && vagrant destroy -f