-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathreset-slave.yaml
executable file
·65 lines (52 loc) · 1.64 KB
/
reset-slave.yaml
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
- job-template:
name: 'reset-iscsi-slave'
node: '{node}'
quiet-period: 0
builders:
- shell: |
#!/bin/bash -xe
java -jar ~/jenkins-cli.jar -s http://localhost:8080/ offline-node "iSCSI Slave"
sleep 10 # wait previous job finish
ssh ift@iscsi 'sudo reboot'
echo "Resetting iscsi slave..."
sleep 60
java -jar ~/jenkins-cli.jar -s http://localhost:8080/ online-node "iSCSI Slave"
#publishers:
#- groovy-postbuild: "sleep(65000)"
- job-template:
name: 'reset-fc-slave'
node: '{node}'
quiet-period: 0
builders:
- shell: |
#!/bin/bash -xe
java -jar ~/jenkins-cli.jar -s http://localhost:8080/ offline-node "FC Slave"
sleep 10 # wait previous job finish
ssh ift@fc 'sudo reboot'
echo "Resetting fc slave..."
sleep 60
java -jar ~/jenkins-cli.jar -s http://localhost:8080/ online-node "FC Slave"
#publishers:
#- groovy-postbuild: "sleep(65000)"
- job-template:
name: 'wait-reset-iscsi-slave'
node: '{node}'
quiet-period: 0
builders:
- shell: |
#!/bin/bash -xe
echo "resetting iscsi slave"
sleep 5
# This line should be changed to use Groovy Postbuild below
# sleep(5000)
- job-template:
name: 'wait-reset-fc-slave'
node: '{node}'
quiet-period: 0
builders:
- shell: |
#!/bin/bash -xe
echo "resetting fc slave"
sleep 5
# This line should be changed to use Groovy Postbuild below
# sleep(5000)