This is an automated email from the ASF dual-hosted git repository. jrhea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-tuweni.git
commit 607615f288c6ef574dd1d82b33ecac5bfda15324 Author: Antoine Toulme <[email protected]> AuthorDate: Mon Apr 22 04:25:31 2019 -0700 Read credentials from jenkins user configuration --- build.gradle | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/build.gradle b/build.gradle index be5973e..5c19f32 100644 --- a/build.gradle +++ b/build.gradle @@ -290,7 +290,7 @@ allprojects { def credentialsFound = false; if (settingsXml.exists()) { - project.logger.info('Using .m2/settings.xml') + project.logger.info('Reading .m2/settings.xml') def serverId = (project.properties['distMgmtServerId'] ?: isRelease ? 'apache.releases.https' : 'apache.snapshots.https') def m2SettingCreds = new XmlSlurper().parse(settingsXml).servers.server.find { server -> serverId.equals(server.id.text()) } @@ -306,9 +306,12 @@ allprojects { if (!credentialsFound) { project.logger.info('Reading credentials from environment') - credentials { - username System.getenv('NEXUS_USER') - password System.getenv('NEXUS_PASSWORD') + credentialsFound = System.getenv('NEXUS_USER') != null + if (credentialsFound) { + credentials { + username asfNexusUsername ?: System.getenv('NEXUS_USER') + password asfNexusPassword ?: System.getenv('NEXUS_PASSWORD') + } } } } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
