diff options
author | Jacek Poreda <jacek.poreda@sonarsource.com> | 2024-01-25 17:44:51 +0100 |
---|---|---|
committer | sonartech <sonartech@sonarsource.com> | 2024-01-26 20:02:46 +0000 |
commit | a2fe6dbb5b256e3b752e8815374cef0a17759052 (patch) | |
tree | 3f5e6583b3e023cd29f762c564dae9383a753a30 | |
parent | 858b1023bba599c5aa44119469d8451301434abb (diff) | |
download | sonarqube-a2fe6dbb5b256e3b752e8815374cef0a17759052.tar.gz sonarqube-a2fe6dbb5b256e3b752e8815374cef0a17759052.zip |
SONAR-21476 Enable JFrog authentication explicitly
-rw-r--r-- | build.gradle | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle index 1aace96931f..0f6f871c29b 100644 --- a/build.gradle +++ b/build.gradle @@ -88,7 +88,15 @@ allprojects { } maven { - if (!artifactoryUsername || !artifactoryPassword) { + if (artifactoryPassword) { + authentication { + header(HttpHeaderAuthentication) + } + credentials(HttpHeaderCredentials) { + name = "Authorization" + value = "Bearer $artifactoryPassword" + } + } else { // Workaround for artifactory // https://www.jfrog.com/jira/browse/RTFACT-13797 repository = 'public' @@ -98,6 +106,13 @@ allprojects { ivy { if (artifactoryUsername && artifactoryPassword) { url "${artifactoryUrl}/sonarsource-bucket" + authentication { + header(HttpHeaderAuthentication) + } + credentials(HttpHeaderCredentials) { + name = "Authorization" + value = "Bearer $artifactoryPassword" + } patternLayout { artifact '/[organisation]/[module]/[module]-[revision].[ext]' |