Shared Jenkins library which all ODS projects & components use - provisioning, SonarQube code scanning, Nexus publishing, OpenShift template based deployments and repository orchestration
Apache License 2.0
69
stars
57
forks
source link
odsComponentStageScanWithSonar fails when requireQualityGatePass is enabled #1109
Describe the bug
When enabling requireQualityGatePass in odsComponentStageScanWithSonar, with the latest Jenkins agents update the cURL command is no longer defining the query as a HTTP GET but a POST making the call fail with HTTP 405 and later resulting as an UNKNOWN quality gate and hence failing the whole pipeline build.
We have been debugging and the same cURL command before the Jenkins agents updates was triggering a GET but now cURL defaults to POST.
To Reproduce
Steps to reproduce the behavior:
Enable requireQualityGatePass in your odsComponentStageScanWithSonar Jenkinsfile stage
Commit and push
See error in the log output section
Expected behavior
The cURL command must send a GET and not a POST.
Screenshots
N/A
Affected version (please complete the following information):
OpenShift: 4.x
OpenDevStack 4.x
Log Output (ensure to remove any confidential information like tokens, project names, etc.
Update: we found out the issue was not due to cURL updates rather SonarQube API changes. Basically cURL is always sending URL encoded data as body except when using --get explicit flag...
Describe the bug When enabling
requireQualityGatePass
inodsComponentStageScanWithSonar
, with the latest Jenkins agents update the cURL command is no longer defining the query as a HTTP GET but a POST making the call fail with HTTP 405 and later resulting as an UNKNOWN quality gate and hence failing the whole pipeline build. We have been debugging and the same cURL command before the Jenkins agents updates was triggering a GET but now cURL defaults to POST.To Reproduce Steps to reproduce the behavior:
requireQualityGatePass
in yourodsComponentStageScanWithSonar
Jenkinsfile stageExpected behavior The cURL command must send a GET and not a POST.
Screenshots N/A
Affected version (please complete the following information):
Log Output (ensure to remove any confidential information like tokens, project names, etc.
Additional context Force
--get
flag.