@@ -33,14 +33,14 @@ pipeline {
33
33
sh ' php -v'
34
34
sh ' cat /etc/os-release'
35
35
sh ' echo "Checking with netstat..."'
36
- def output_netstat = sh ' /opt/bitnami/apache/bin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
36
+ def output_netstat = sh( script : " /opt/bitnami/apache/bin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
37
37
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
38
38
error " Output validation failed"
39
39
}
40
40
sh ' echo "installing iproute2 which contains ss..."'
41
41
sh ' install_packages iproute2'
42
42
sh ' echo "Checking with ss..."'
43
- def output_ss = sh ' /opt/bitnami/apache/bin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
43
+ def output_ss = sh( script : " /opt/bitnami/apache/bin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
44
44
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
45
45
error " Output validation failed"
46
46
}
@@ -66,7 +66,7 @@ pipeline {
66
66
sh ' cat /etc/os-release'
67
67
sh ' echo "Oracle Linux defaults to ss"'
68
68
sh ' echo "Checking with ss..."'
69
- def output_ss = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
69
+ def output_ss = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
70
70
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
71
71
error " Output validation failed"
72
72
}
@@ -75,7 +75,7 @@ pipeline {
75
75
sh ' echo "installing net-tools" which includes netstat'
76
76
sh ' yum -y install net-tools'
77
77
sh ' echo "Testing with netstat..."'
78
- def output_netstat = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
78
+ def output_netstat = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
79
79
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
80
80
error " Output validation failed"
81
81
}
@@ -101,7 +101,7 @@ pipeline {
101
101
sh ' cat /etc/os-release'
102
102
sh ' echo "Oracle Linux defaults to ss"'
103
103
sh ' echo "Checking with ss..."'
104
- def output_ss = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
104
+ def output_ss = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
105
105
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
106
106
error " Output validation failed"
107
107
}
@@ -110,7 +110,7 @@ pipeline {
110
110
sh ' echo "installing net-tools" which includes netstat'
111
111
sh ' yum -y install net-tools'
112
112
sh ' echo "Testing with netstat..."'
113
- def output_netstat = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
113
+ def output_netstat = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
114
114
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
115
115
error " Output validation failed"
116
116
}
@@ -134,14 +134,14 @@ pipeline {
134
134
sh ' apachectl configtest'
135
135
sh ' cat /etc/os-release'
136
136
sh ' echo "Checking with netstat..."'
137
- def output_netstat = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
137
+ def output_netstat = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
138
138
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
139
139
error " Output validation failed"
140
140
}
141
141
sh ' echo "Installing iproute which contains ss command"'
142
142
sh ' yum -y install iproute'
143
143
sh ' echo "Checking with ss..."'
144
- def output_ss = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
144
+ def output_ss = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
145
145
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
146
146
error " Output validation failed"
147
147
}
@@ -165,14 +165,14 @@ pipeline {
165
165
sh ' apachectl configtest'
166
166
sh ' cat /etc/os-release'
167
167
sh ' echo "Checking with netstat..."'
168
- def output_netstat = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
168
+ def output_netstat = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
169
169
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
170
170
error " Output validation failed"
171
171
}
172
172
sh ' echo "Installing iproute which contains ss command"'
173
173
sh ' yum -y install iproute'
174
174
sh ' echo "Checking with ss..."'
175
- def output_ss = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
175
+ def output_ss = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
176
176
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
177
177
error " Output validation failed"
178
178
}
@@ -197,14 +197,14 @@ pipeline {
197
197
sh ' apachectl configtest'
198
198
sh ' cat /etc/os-release'
199
199
sh ' echo "Checking with netstat..."'
200
- def output_netstat = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
200
+ def output_netstat = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
201
201
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
202
202
error " Output validation failed"
203
203
}
204
204
sh ' echo "Installing iproute which contains ss command"'
205
205
sh ' yum -y install iproute'
206
206
sh ' echo "Checking with ss..."'
207
- def output_ss = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
207
+ def output_ss = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
208
208
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
209
209
error " Output validation failed"
210
210
}
@@ -229,14 +229,14 @@ pipeline {
229
229
sh ' apachectl configtest'
230
230
sh ' cat /etc/os-release'
231
231
sh ' echo "Checking with netstat..."'
232
- def output_netstat = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
232
+ def output_netstat = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
233
233
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
234
234
error " Output validation failed"
235
235
}
236
236
sh ' echo "Installing iproute which contains ss command"'
237
237
sh ' yum -y install iproute'
238
238
sh ' echo "Checking with ss..."'
239
- def output_ss = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
239
+ def output_ss = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
240
240
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
241
241
error " Output validation failed"
242
242
}
@@ -260,14 +260,14 @@ pipeline {
260
260
sh ' apachectl configtest'
261
261
sh ' cat /etc/os-release'
262
262
sh ' echo "Checking with netstat..."'
263
- def output_netstat = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
263
+ def output_netstat = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
264
264
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
265
265
error " Output validation failed"
266
266
}
267
267
sh ' echo "Installing iproute which contains ss command"'
268
268
sh ' yum -y install iproute'
269
269
sh ' echo "Checking with ss..."'
270
- def output_ss = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
270
+ def output_ss = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
271
271
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
272
272
error " Output validation failed"
273
273
}
@@ -291,14 +291,14 @@ pipeline {
291
291
sh ' apachectl configtest'
292
292
sh ' cat /etc/os-release'
293
293
sh ' echo "Checking with netstat..."'
294
- def output_netstat = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
294
+ def output_netstat = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
295
295
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
296
296
error " Output validation failed"
297
297
}
298
298
sh ' echo "Installing iproute which contains ss command"'
299
299
sh ' yum -y install iproute'
300
300
sh ' echo "Checking with ss..."'
301
- def output_ss = sh ' /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
301
+ def output_ss = sh( script : " /usr/sbin/httpd -k start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
302
302
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
303
303
error " Output validation failed"
304
304
}
@@ -320,14 +320,14 @@ pipeline {
320
320
sh ' php -v'
321
321
sh ' cat /etc/os-release'
322
322
sh ' echo "Checking with netstat..."'
323
- def output_netstat = sh ' service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
323
+ def output_netstat = sh( script : " service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
324
324
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
325
325
error " Output validation failed"
326
326
}
327
327
sh ' echo "Installing iproute2 which contains ss command"'
328
328
sh ' apt -y install iproute2'
329
329
sh ' echo "Checking with ss..."'
330
- def output_ss = sh ' service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
330
+ def output_ss = sh( script : " service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
331
331
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
332
332
error " Output validation failed"
333
333
}
@@ -350,14 +350,14 @@ pipeline {
350
350
sh ' php -v'
351
351
sh ' cat /etc/os-release'
352
352
sh ' echo "Checking with netstat..."'
353
- def output_netstat = sh ' service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
353
+ def output_netstat = sh( script : " service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
354
354
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
355
355
error " Output validation failed"
356
356
}
357
357
sh ' echo "Installing iproute2 which contains ss command"'
358
358
sh ' apt -y install iproute2'
359
359
sh ' echo "Checking with ss..."'
360
- def output_ss = sh ' service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
360
+ def output_ss = sh( script : " service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
361
361
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
362
362
error " Output validation failed"
363
363
}
@@ -380,14 +380,14 @@ pipeline {
380
380
sh ' php -v'
381
381
sh ' cat /etc/os-release'
382
382
sh ' echo "Checking with netstat..."'
383
- def output_netstat = sh ' service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
383
+ def output_netstat = sh( script : " service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
384
384
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
385
385
error " Output validation failed"
386
386
}
387
387
sh ' echo "Installing iproute2 which contains ss command"'
388
388
sh ' apt -y install iproute2'
389
389
sh ' echo "Checking with ss..."'
390
- def output_ss = sh ' service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
390
+ def output_ss = sh( script : " service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
391
391
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
392
392
error " Output validation failed"
393
393
}
@@ -409,14 +409,14 @@ pipeline {
409
409
sh ' php -v'
410
410
sh ' cat /etc/os-release'
411
411
sh ' echo "Checking with netstat..."'
412
- def output_netstat = sh ' service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
412
+ def output_netstat = sh( script : " service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
413
413
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
414
414
error " Output validation failed"
415
415
}
416
416
sh ' echo "Installing iproute2 which contains ss command"'
417
417
sh ' apt -y install iproute2'
418
418
sh ' echo "Checking with ss..."'
419
- def output_ss = sh ' service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
419
+ def output_ss = sh( script : " service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
420
420
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
421
421
error " Output validation failed"
422
422
}
@@ -438,14 +438,14 @@ pipeline {
438
438
sh ' php -v'
439
439
sh ' cat /etc/os-release'
440
440
sh ' echo "Checking with netstat..."'
441
- def output_netstat = sh ' service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
441
+ def output_netstat = sh( script : " service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
442
442
if (! output_netstat. contains(" [ OK ] Using 'netstat' for socket statistics." )) {
443
443
error " Output validation failed"
444
444
}
445
445
sh ' echo "Installing iproute2 which contains ss command"'
446
446
sh ' apt -y install iproute2'
447
447
sh ' echo "Checking with ss..."'
448
- def output_ss = sh ' service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n'
448
+ def output_ss = sh( script : " service apache2 start && curl -sL https://raw.githubusercontent.com/richardforth/apache2buddy/staging/apache2buddy.pl | perl - -n" , returnStdout : true ) . trim()
449
449
if (! output_ss. contains(" [ OK ] Using 'ss' for socket statistics." )) {
450
450
error " Output validation failed"
451
451
}
0 commit comments