Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Google KMS Decrypt task
/* Based on environment {envName}, credentials-enc/{envName}/* are decrypted and stored under credentials/{envName} folder */
task decryptSecrets {
def deployConfig = getDeployConfig()
def config = [ projId: deployConfig.project,
keyring: "secrets-key-ring",
key : 'secrets-enc-key',
recursive: false
// live or stag based on task arguments
def envName = deployConfig.envName
doLast {
config.srcPath = "${rootProjDir}/credentials-enc/" + envName
config.targetPath = "${rootProjDir}/credentials/" + envName
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.