jq will sort (-S) the whole file (.) and compare STDOUT (<()) with diff
diff <(jq -S . A.json) <(jq -S . B.json)
| EndpointServiceTag: | |
| Type: 'AWS::Lambda::Function' | |
| Properties: | |
| Handler: index.lambda_handler | |
| Role: !GetAtt LambdaRole.Arn | |
| Code: | |
| ZipFile: | | |
| import json | |
| import boto3 | |
| import cfnresponse | 
| MyLayer: | |
| Type: AWS::Lambda::LayerVersion | |
| Properties: | |
| CompatibleRuntimes: | |
| - python3.6 | |
| - python3.7 | |
| Content: | |
| S3Bucket: my-bucket-us-west-2-123456789012 | |
| S3Key: layer.zip | |
| Description: My layer | 
| os.path.join(os.sep, 'home', 'build', 'test', 'sandboxes', todaystr, 'new_sandbox') | |
| os.path.join(os.environ.get("HOME"), 'test', 'sandboxes', todaystr, 'new_sandbox') | |
| test = ['test', 'test1', 'test2', 'test3'] | |
| os.path.join(*test) | 
| ^(?!.*develop|.*master|release/das-|release/dp-).*$ | |
| ^(?!.*master|release/das-|release/dp-).*$ | 
| # This is a really old post, in the comments (and stackoverflow too) you'll find better solutions. | |
| def find(key, dictionary): | |
| for k, v in dictionary.iteritems(): | |
| if k == key: | |
| yield v | |
| elif isinstance(v, dict): | |
| for result in find(key, v): | |
| yield result | |
| elif isinstance(v, list): | 
| for (aSlave in hudson.model.Hudson.instance.slaves) { | |
| if (aSlave.getComputer().?isOffline()) { | |
| aSlave.getComputer().setTemporarilyOffline(true,null); | |
| aSlave.getComputer().doDoDelete(); | |
| } | |
| } | |
| for (aSlave in hudson.model.Hudson.instance.slaves) { | |
| println('===================='); | |
| println('Name: ' + aSlave.name); | 
| import os | |
| import os.path | |
| import sys | |
| root = os.environ["LAMBDA_TASK_ROOT"] | |
| sys.path.insert(0, root) | |
| import boto3 #should grab boto3 from included zip first | 
jq will sort (-S) the whole file (.) and compare STDOUT (<()) with diff
diff <(jq -S . A.json) <(jq -S . B.json)
| <meta http-equiv="cache-control" content="no-cache, must-revalidate, post-check=0, pre-check=0" /> | |
| <meta http-equiv="cache-control" content="max-age=0" /> | |
| <meta http-equiv="expires" content="0" /> | |
| <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> | |
| <meta http-equiv="pragma" content="no-cache" /> | 
| import org.jenkinsci.plugins.scriptsecurity.scripts.ScriptApproval | |
| ScriptApproval scriptApproval = ScriptApproval.get() | |
| scriptApproval.pendingScripts.each { | |
| scriptApproval.approveScript(it.hash) | |
| } | |
| /* Script to clear script approval | |
| $JENKINS_HOME/init.groovy.d/disable-script-security.groovy: | |
| */ |