blob: dd07676ce8f32e3f26fd4bfab64c322f1d4c1ca1 [file] [log] [blame]
Joey Armstrong379660e2022-12-14 19:21:00 -05001#!/usr/bin/env groovy
2// -----------------------------------------------------------------------
3// -----------------------------------------------------------------------
4
5// -----------------------------------------------------------------------
6// -----------------------------------------------------------------------
7def getIam(String func)
8{
9 // Cannot rely on a stack trace due to jenkins manipulation
10 String src = 'vars/showCommands'
11 String iam = [src, func].join('::')
12 return iam
13}
14
15// -----------------------------------------------------------------------
16// -----------------------------------------------------------------------
17def process(Map config)
18{
Joey Armstrong7adbfb02023-01-24 17:02:37 -050019 String iam = getIam('process')
Joey Armstrong379660e2022-12-14 19:21:00 -050020
21 // list.each{ } could be used here but simple for now.
22 println("** ${iam}: voltctl command attributes")
23 sh('''which -a voltctl''')
24 sh('''voltctl version''')
25
26 return
27}
28
29// -----------------------------------------------------------------------
30// -----------------------------------------------------------------------
31def call(Map config)
32{
33 String iam = getIam('main')
34 println("** ${iam}: ENTER")
35
36 if (!config)
37 {
38 config = [:]
39 }
40
41 try
42 {
43 process(config)
44 }
45 catch (Exception err)
46 {
47 println("** ${iam}: EXCEPTION ${err}")
48 throw err
49 }
50 finally
51 {
52 println("** ${iam}: LEAVE")
53 }
54 return
55}
56
57// EOF