-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathplaybook-Atlassian_Confluence_Integration_Test.yml
More file actions
535 lines (535 loc) · 11.1 KB
/
playbook-Atlassian_Confluence_Integration_Test.yml
File metadata and controls
535 lines (535 loc) · 11.1 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
id: Confluence Integration Test
version: -1
fromversion: 5.0.0
name: Confluence Integration Test
starttaskid: "0"
tasks:
"0":
id: "0"
taskid: eb066836-9a35-4ab0-8f00-fb5b14ec7674
type: start
task:
id: eb066836-9a35-4ab0-8f00-fb5b14ec7674
version: -1
name: ""
iscommand: false
brand: ""
nexttasks:
'#none#':
- "27"
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 50
}
}
note: false
timertriggers: []
ignoreworker: false
"3":
id: "3"
taskid: 02648dd0-1ecc-4043-8c3e-e532ee786c2b
type: regular
task:
id: 02648dd0-1ecc-4043-8c3e-e532ee786c2b
version: -1
name: Create new Confluence Page in DemistoContent
script: Atlassian Confluence Server|||confluence-create-content
type: regular
iscommand: true
brand: Atlassian Confluence Server
nexttasks:
'#none#':
- "13"
scriptarguments:
body:
simple: <h1>Incident ID ${incident.id}</h1><p>Hello from Demisto Playbook,
Incident ID ${incident.id} created on ${incident.created}.</p>
space:
simple: DemistoContent
title:
simple: Test Page created from Playbook automation - ${incident.id}
type:
simple: page
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 515
}
}
note: false
timertriggers: []
ignoreworker: false
"4":
id: "4"
taskid: 83d5d06a-742e-41b0-8857-597d3d659717
type: title
task:
id: 83d5d06a-742e-41b0-8857-597d3d659717
version: -1
name: Create New Page
type: title
iscommand: false
brand: ""
nexttasks:
'#none#':
- "3"
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 370
}
}
note: false
timertriggers: []
ignoreworker: false
"9":
id: "9"
taskid: fd00ee53-4389-40b0-8eab-45831984cd2f
type: condition
task:
id: fd00ee53-4389-40b0-8eab-45831984cd2f
version: -1
name: Check to see if any Pages were returned and that the newly created Page
exists
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "32"
"yes":
- "10"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: isNotEmpty
left:
value:
simple: Confluence.Content
iscontext: true
view: |-
{
"position": {
"x": 480,
"y": 1360
}
}
note: false
timertriggers: []
ignoreworker: false
"10":
id: "10"
taskid: 8aeaba85-e16f-4473-8ce6-03108f701ffa
type: title
task:
id: 8aeaba85-e16f-4473-8ce6-03108f701ffa
version: -1
name: Update Page
type: title
iscommand: false
brand: ""
nexttasks:
'#none#':
- "11"
separatecontext: false
view: |-
{
"position": {
"x": 265,
"y": 1550
}
}
note: false
timertriggers: []
ignoreworker: false
"11":
id: "11"
taskid: c43eb9cf-f2d3-49ed-80e0-b2d6217abefd
type: regular
task:
id: c43eb9cf-f2d3-49ed-80e0-b2d6217abefd
version: -1
name: Update Page body with success message
script: Atlassian Confluence Server|||confluence-update-content
type: regular
iscommand: true
brand: Atlassian Confluence Server
nexttasks:
'#none#':
- "22"
scriptarguments:
body:
simple: ${Confluence.Content.body.storage.value}<br/><br/><p>This is a successful
Page update!</p>
currentversion:
simple: ${Confluence.Content.Version}
pageid:
simple: ${Confluence.Content.ID}
space:
simple: DemistoContent
title:
simple: ${Confluence.Content.Title}
type:
simple: page
separatecontext: false
view: |-
{
"position": {
"x": 265,
"y": 1710
}
}
note: false
timertriggers: []
ignoreworker: false
"13":
id: "13"
taskid: 7deca9f5-e8cd-43fd-86bb-60456a95ab64
type: title
task:
id: 7deca9f5-e8cd-43fd-86bb-60456a95ab64
version: -1
name: Search for New Page
type: title
iscommand: false
brand: ""
nexttasks:
'#none#':
- "26"
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 690
}
}
note: false
timertriggers: []
ignoreworker: false
"14":
id: "14"
taskid: 7951bb95-e5c7-4f6b-817c-321cfa585b4c
type: regular
task:
id: 7951bb95-e5c7-4f6b-817c-321cfa585b4c
version: -1
name: Search for newly created Page using CQL
script: Atlassian Confluence Server|||confluence-search-content
type: regular
iscommand: true
brand: Atlassian Confluence Server
nexttasks:
'#none#':
- "9"
scriptarguments:
cql:
simple: title = "Test Page created from Playbook automation - ${incident.id}"
cqlcontext: {}
expand: {}
limit: {}
start: {}
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 1185
}
}
note: false
timertriggers: []
ignoreworker: false
"17":
id: "17"
taskid: fe9dbaad-e8cc-4fdf-8a36-45d3a3cbe7e4
type: regular
task:
id: fe9dbaad-e8cc-4fdf-8a36-45d3a3cbe7e4
version: -1
name: Close Incident
script: Builtin|||closeInvestigation
type: regular
iscommand: true
brand: Builtin
scriptarguments:
assetid: {}
closeNotes: {}
closeReason:
simple: ${CustomCloseReason}
id: {}
separatecontext: false
view: |-
{
"position": {
"x": 50,
"y": 2380
}
}
note: false
timertriggers: []
ignoreworker: false
"22":
id: "22"
taskid: e7942a0e-076d-4bbb-8f0a-1c6d2c6c7888
type: title
task:
id: e7942a0e-076d-4bbb-8f0a-1c6d2c6c7888
version: -1
name: Delete Page
type: title
iscommand: false
brand: ""
nexttasks:
'#none#':
- "24"
separatecontext: false
view: |-
{
"position": {
"x": 265,
"y": 1885
}
}
note: false
timertriggers: []
ignoreworker: false
"24":
id: "24"
taskid: 2107f978-e785-40b0-853d-6e7a6231c275
type: regular
task:
id: 2107f978-e785-40b0-853d-6e7a6231c275
version: -1
name: Delete Confluence Page
script: Atlassian Confluence Server|||confluence-delete-content
type: regular
iscommand: true
brand: Atlassian Confluence Server
nexttasks:
'#none#':
- "25"
scriptarguments:
id:
simple: ${Confluence.Content.ID}
separatecontext: false
view: |-
{
"position": {
"x": 265,
"y": 2030
}
}
note: false
timertriggers: []
ignoreworker: false
"25":
id: "25"
taskid: 6b501250-1064-4f9c-888a-a55d4a454f47
type: condition
task:
id: 6b501250-1064-4f9c-888a-a55d4a454f47
version: -1
name: Page Deletion successful?
type: condition
iscommand: false
brand: ""
nexttasks:
'#default#':
- "31"
"yes":
- "17"
separatecontext: false
conditions:
- label: "yes"
condition:
- - operator: containsString
left:
value:
simple: Confluence.Content.Results
iscontext: true
right:
value:
simple: success
ignorecase: true
view: |-
{
"position": {
"x": 265,
"y": 2205
}
}
note: false
timertriggers: []
ignoreworker: false
"26":
id: "26"
taskid: 8305ef9b-db8c-4b69-8bfe-aa0caf752496
type: regular
task:
id: 8305ef9b-db8c-4b69-8bfe-aa0caf752496
version: -1
name: Sleep for a few seconds...
scriptName: Sleep
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "30"
scriptarguments:
seconds:
simple: "5"
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 835
}
}
note: false
timertriggers: []
ignoreworker: false
"27":
id: "27"
taskid: 56f5debb-c7a8-4fbf-842d-65acd174bb73
type: regular
task:
id: 56f5debb-c7a8-4fbf-842d-65acd174bb73
version: -1
name: Delete Context
scriptName: DeleteContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "4"
scriptarguments:
all:
simple: "yes"
index: {}
key: {}
keysToKeep: {}
subplaybook: {}
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 195
}
}
note: false
timertriggers: []
ignoreworker: false
"30":
id: "30"
taskid: 7699290e-ced5-4695-81e3-5319891da5da
type: regular
task:
id: 7699290e-ced5-4695-81e3-5319891da5da
version: -1
name: Delete Context
scriptName: DeleteContext
type: regular
iscommand: false
brand: ""
nexttasks:
'#none#':
- "14"
scriptarguments:
all:
simple: "yes"
index: {}
key: {}
keysToKeep: {}
subplaybook: {}
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 1010
}
}
note: false
timertriggers: []
ignoreworker: false
"31":
id: "31"
taskid: 2d11d9b0-060b-4a20-837d-351d5ffcaeb2
type: regular
task:
id: 2d11d9b0-060b-4a20-837d-351d5ffcaeb2
version: -1
name: Failed to delete space
description: Prints an error entry with a given message
scriptName: PrintErrorEntry
type: regular
iscommand: false
brand: ""
scriptarguments:
message:
simple: Failed to delete space
separatecontext: false
view: |-
{
"position": {
"x": 480,
"y": 2380
}
}
note: false
timertriggers: []
ignoreworker: false
"32":
id: "32"
taskid: 3cd665d3-065b-49a4-8298-fbd38b47f113
type: regular
task:
id: 3cd665d3-065b-49a4-8298-fbd38b47f113
version: -1
name: Failed to find the page
description: Prints an error entry with a given message
scriptName: PrintErrorEntry
type: regular
iscommand: false
brand: ""
scriptarguments:
message:
simple: Failed to find the page
separatecontext: false
view: |-
{
"position": {
"x": 695,
"y": 1535
}
}
note: false
timertriggers: []
ignoreworker: false
view: |-
{
"linkLabelsPosition": {},
"paper": {
"dimensions": {
"height": 2425,
"width": 1025,
"x": 50,
"y": 50
}
}
}
inputs: []
outputs: []