Skip to content

Instantly share code, notes, and snippets.

@infamousjoeg
Created July 28, 2022 15:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save infamousjoeg/75e65c6ca4cc4dde6cf593efbf6679bb to your computer and use it in GitHub Desktop.
Example of using Conjur Secrets Plugin for Jenkins to checkout BitBucket repository
node {
stages {
stage('Checkout SCM') {
steps {
withCredentials([
conjurSecretCredential(credentialsId: 'scm/bitbucket/jenkins/username', variable: 'BITBUCKET_USER'),
conjurSecretCredential(credentialsId: 'scm/bitbucket/jenkins/password', variable: 'BITBUCKET_PASS')
]) {
git url: 'https://${BITBUCKET_USER}:${BITBUCKET_PASS}@bitbuckethost.com/scm/my-repo.git'
}
}
}
// Other stages...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment