Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status Code 401 when execute applyQualityGate on gradle #10

Open
daniloalexandre opened this issue Oct 27, 2021 · 0 comments
Open

Status Code 401 when execute applyQualityGate on gradle #10

daniloalexandre opened this issue Oct 27, 2021 · 0 comments

Comments

@daniloalexandre
Copy link

Hi, everyone.

When I execute the command line:

gradlew applyQualityGate applyQualityProfile sonarqube verifySonarqubeQualityGates

I receive the response below:

Task :applyQualityGate FAILED

FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':applyQualityGate'.
groovyx.net.http.HttpResponseException: status code: 401

I'm using:

- Gradle 6.6.1
- SonarQube Community Edition Version 9.0.1 (build 46107)
- Sonarqube Gradle Plugin 3.3

I have configured the plugin as specified in https://plugins.gradle.org/plugin/com.usaa.sonar-quality-gates

build.gradle:

plugins {
...
id "org.sonarqube"
id "com.usaa.sonar-quality-gates"
}

settings.gradle:

pluginManagement {
plugins {
...
id "org.sonarqube" version "${sonarqube_version}"
id "com.usaa.sonar-quality-gates" version "${sonarqube_quality_version}"
}
}

rootProject.name = OMITTED FOR SECURITY

gradle.properties:

...
systemProp.sonar.host.url=OMITTED FOR SECURITY
systemProp.sonar.login=GENEREATED TOKEN
...
sonarqube_version=3.3
sonarqube_quality_version=2.0.0

Obs.: the generated token is associated a sonar-administrators group user

Any idea about what is wrong?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant