Comments (6)
@caosborn thanks a bunch!
from sonarqube-azureappservice.
There's a couple issues that will prevent this from working with SonarQube 10.x (and anything after). First, the sorting of the releases retrieved from GitHub is using alpha, so 9 will always be higher than 10:
if(!$Version -or ($Version -ieq 'Latest')) { # binaries.sonarsource.com moved to S3 and is not easily searchable anymore. Getting the latest version from GitHub releases. $releasesFromApi = (Invoke-WebRequest -Uri 'https://api.github.com/repos/SonarSource/sonarqube/releases' -UseBasicParsing).Content $releasesPS = $releasesFromApi | ConvertFrom-Json $Version = $releasesPS.Name | Sort-Object -Descending | Select-Object -First 1 Write-Output "Found the latest release to be $Version" }
The code above will always find 9.x as the latest release.
Second, the version comparison in the startup script is alpha, having the same problem of 10 being less than 9:
$sqver = $propFile.FullName.split("\")[4].split("-")[1] log("SQ version: $sqver") if ($sqver -ge 9.6) { log("SQ ver >= 9.6, use env var not wrapper.conf") $Env:SONAR_JAVA_PATH = "$Env:JAVA_HOME\bin\java.exe" log("Set Java exe path env var (SONAR_JAVA_PATH) to: $Env:SONAR_JAVA_PATH") } else { log('SQ ver < 9.6, use wrapper.conf')
$sqver is a string so "10.1" will always be less than "9.6".
I'm facing the exact same problem, due to the inherit problem of sorting or comparing numerical values as strings.
Are pull requests something to consider ?
from sonarqube-azureappservice.
Facing the exact same issue. It does not pull the Latest 10.2 and I can't define version 10.2 as well when deploying. When deploying add version manually from the https://api.github.com/repos/SonarSource/sonarqube/releases and it works.
But, then again it shows
from sonarqube-azureappservice.
@jeckyl2010 I am always open to PR submissions.
As I don't use SQ on a daily basis anymore changes are pretty much community driven at this point.
from sonarqube-azureappservice.
I've submitted a PR for this #86
from sonarqube-azureappservice.
No worries, hope it helps 🙂
from sonarqube-azureappservice.
Related Issues (20)
- Error while deploying sonarqube on Azure App Service HOT 4
- Error while starting sonarqube on Azure App Service HOT 3
- How to upgrade this solution to solve the Log4J security issue? HOT 3
- Sonarqube 9.2.4 upgrade HOT 1
- Ghost duplicated HOT 1
- Deployment failing HOT 2
- Elastic Search permission denied HOT 2
- Sensitive environment variables should not be logged by HttpPlatformHandlerStartup.ps1 HOT 2
- Could not find wrapper.conf in Sonarqube 9.6 version HOT 2
- My SonarQube Server is Saying UnderMaintainance HOT 3
- For Commercial editions HOT 1
- Can't start sonarqube and getting the specified CGI application encountered an error and the server terminated the process. HOT 3
- SonarQube 504 Gateway Timeout Error HOT 2
- Upgrading sonarqube running on azure web app
- HTTP Error 502.3 - Bad Gateway
- New project always is Community edition
- Run Code Analysis Java Runtime error HOT 2
- Failed to upload report: Error 413 - The page was not displayed because the request entity is too large.
- [Solved] HTTP Error 503. The service is unavailable.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sonarqube-azureappservice.