-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile-teamTwo
57 lines (56 loc) · 1.83 KB
/
Jenkinsfile-teamTwo
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
pipeline {
agent {
kubernetes{
nodeSelector 'kubernetes.io/hostname=pool-fv2ocqhbe-qitha'
yaml '''
apiVersion: v1
kind: Pod
spec:
containers:
- name: gradle
image: registry.digitalocean.com/do-k8s-ecr/gradle-cache
command:
- cat
tty: true
- name: selenium-hub
image: selenium/hub:3.4.0
- name: selenium-chrome
image: selenium/node-chrome:3.4.0
env:
- name: HUB_PORT_4444_TCP_ADDR
value: localhost
- name: HUB_PORT_4444_TCP_PORT
value: 4444
- name: DISPLAY
value: :99.0
- name: SE_OPTS
value: -port 5556
tty: true
- name: curl
image: byrnedo/alpine-curl
command:
- cat
tty: true
'''
}
}
stages {
stage('clone') {
steps {
sh "git clone https://github.com/alexwatts/test-examples"
}
}
stage('build') {
steps {
container('gradle') {
catchError() {
sh "gradle --no-daemon test -Dcucumber.options='@TeamTwo' -b test-examples/build.gradle"
}
container('curl') {
sh "curl -v -XPOST -H 'Content-Type:application/json' -d @test-examples/build/cucumber-reports.json http://167.99.206.192:30001/reports/team-two"
}
}
}
}
}
}