Skip to content

Instantly share code, notes, and snippets.

View rum.js
var script = document.createElement('script');
script.src = "https://media.geeksforgeeks.org/wp-content/uploads/20190704153043/main.js";
document.head.appendChild(script)
@bootswithdefer
bootswithdefer / vault.groovy
Created Nov 7, 2018
Using Hashicorp Vault AppRoles in a Jenkinsfile in pure groovy.
View vault.groovy
stage('pure-groovy-vault') {
agent none
environment {
VAULT_TOKEN_GEN_CRED = credentials('jenkins-vault-approle')
}
steps {
script {
println("Vault: Authenticate as Jenkins")
def body = """{"role_id": "${VAULT_TOKEN_GEN_CRED_USR}", "secret_id": "${VAULT_TOKEN_GEN_CRED_PSW}"}"""
def url = 'https://vault-url/v1/auth/approle/login'
View gist:20975d189eb012986d8afa87136961b9
### Keybase proof
I hereby claim:
* I am bootswithdefer on github.
* I am bootswithdefer (https://keybase.io/bootswithdefer) on keybase.
* I have a public key ASB_Vd54NMv_7Y3ygxh418fph4ZdJLQgPSsb8LnMdKRL_go
To claim this, I am signing this object:
View gist:b54a9353ba93d9132f805f3dc060d922
### Keybase proof
I hereby claim:
* I am bootswithdefer on github.
* I am jdefer (https://keybase.io/jdefer) on keybase.
* I have a public key ASCOYqD3hmgd4qdkLPQS0qK4manRuZ5PP73cDEFkNEOGJgo
To claim this, I am signing this object: