git-subtree-dir: Common_scripts git-subtree-mainline:7d3b54f293git-subtree-split:0150bf139f
15 lines
414 B
Groovy
15 lines
414 B
Groovy
def comparefiles(importedjsonfile, currentjsonfile) {
|
|
env.IMPORTED_JSON="${importedjsonfile}"
|
|
env.CURRENT_JSON="${currentjsonfile}"
|
|
if (isUnix()) {
|
|
sh """
|
|
# jq -S sorts json output
|
|
diff -c <(jq -S . "${IMPORTED_JSON}") <(jq -S . "${CURRENT_JSON}")
|
|
"""
|
|
}
|
|
else {
|
|
error "Windows not currently supporting json file comparison"
|
|
}
|
|
}
|
|
|
|
return this;
|