-
Type: Task
-
Status: To Do (View Workflow)
-
Priority: Medium
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: ci-management
-
Labels:
-
Story Points:0
vars/getPodInfo.groovy will run several kubectl queries to display server info.
Why are all the calls wrapped with '|| true' ?
- If kubectl calls are failing errors will be masked.
- If pipoeline commands (sort, unique) are failing garbage will be written into config files
Remove all the '|| true' calls and fix anything broken.
Extra credit:
- Split queries into several named methods and document.
- There is also potential for some refactoring:
- Move list of shell commands into an array, iterate and invoke.
- Remove pipeline (|sort |unique) – shell returns raw command output.
- Use native groovy functions to sort/etc.
- This would be helpful for debugging and error recovery.
- Command output can be displayed when pipeline is running in debug mode and groovy functions can take remedial action when problems are detected.