Go to file
R. Tyler Croy f68141b019
Add an initial version of the shared library
2017-08-09 18:51:39 -07:00
assets Add an initial version of the shared library 2017-08-09 18:51:39 -07:00
vars Add an initial version of the shared library 2017-08-09 18:51:39 -07:00
.gitignore Add an initial version of the shared library 2017-08-09 18:51:39 -07:00
README.adoc Add an initial version of the shared library 2017-08-09 18:51:39 -07:00

README.adoc

<html lang="en"> <head> </head>

Inline Pipeline Secrets

This is a Pipeline Shared Library which helps support the use of user-defined inline secrets from within a Jenkinsfile.

Prerequisites

This Shared Library requires that the Pipeline plugin and Mask Passwords plugin installed.

Using

Decrypting Secrets

A Pipeline can use secrets similar to environment variables:

Jenkinsfile
node {
    stage('Deploy') {
        withSecrets(
            AWS_SECRET_ID: '{AQAAABAAAAAQWsBycxCz0x8ouOKJLU9OTvHdsN7kt7+6RAcV2zZJTm4=}'
        ) {
            echo "I should be deploying something with: ${env.AWS_SECRET_ID}"
        }
    }
}

Encrypting Secrets

A Pipeline can be used to offer a user interface for encrypting.

Jenkinsfile
promptUserForEncryption()

API

promptUserForEncryption()

createSecretText()

unsafeSecretAccess()

withSecrets()

</html>