Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String getJFrogPasswordFromSystemKeyring() {
- def stdout = new ByteArrayOutputStream()
- def stderr = new ByteArrayOutputStream()
- exec {
- commandLine 'secret-tool', 'lookup', 'server', 'git.company.ch'
- standardOutput = stdout
- errorOutput = stderr
- ignoreExitValue = true
- }
- return stdout.toString().trim()
- }
- ext.jFrogUser = project.properties["jFrogUser"]
- if (project.hasProperty("jFrogPassword")) {
- println("Reading jFrog password from gradle.properties")
- ext.jFrogPassword = project.properties["jFrogPassword"]
- } else {
- println("Reading jFrog password from keyring")
- ext.jFrogPassword = getJFrogPasswordFromSystemKeyring()
- }
Add Comment
Please, Sign In to add comment