Browse Source

BUILD Fix unauthorized builds with artifactory repo

Due to a misbehavior in artifactory, the wrong http status code is returned and the build will stop immediately. This happens if you access a virtual repository which contains a repository which requires authentication.

As a workaround a virtual repository is used, which does not include non-public repositories.

https://www.jfrog.com/jira/browse/RTFACT-13797
tags/8.6.0.39681
Malena Ebert 3 years ago
parent
commit
10cd062ff1
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      build.gradle

+ 5
- 1
build.gradle View File

@@ -87,7 +87,6 @@ allprojects {
repositories {
def repository = project.hasProperty('qa') ? 'sonarsource-qa' : 'sonarsource'
maven {
url "https://repox.jfrog.io/repox/${repository}"
// The environment variables ARTIFACTORY_PRIVATE_USERNAME and ARTIFACTORY_PRIVATE_PASSWORD are used on QA env (Jenkins)
// On local box, please add artifactoryUsername and artifactoryPassword to ~/.gradle/gradle.properties
def artifactoryUsername = System.env.'ARTIFACTORY_PRIVATE_USERNAME' ?: (project.hasProperty('artifactoryUsername') ? project.getProperty('artifactoryUsername') : '')
@@ -97,7 +96,12 @@ allprojects {
username artifactoryUsername
password artifactoryPassword
}
} else {
// Workaround for artifactory
// https://www.jfrog.com/jira/browse/RTFACT-13797
repository = 'public'
}
url "https://repox.jfrog.io/repox/${repository}"
}
}


Loading…
Cancel
Save