Groovy web console

subscribe to the feed Subscribe
to this


Published 8 months ago by Anonymous
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
            vaultValue = sh (              
script: "curl -s --header \"X-Vault-Token: $vault_token_test\" --request GET https://localhost/v1/secret/data/test/env | jq '.data'",
                returnStdout: true

                // try to debug parts
                if (vaultValue?.trim()){
                  valuelen = vaultValue.length()
                  println "value param is not empty: $valuelen"
                } else {
                  println "value param did not hit true block, means it is false"