Skip to content

Commit

Permalink
Merge pull request #1 from jabbera/NewArtifactLayout
Browse files Browse the repository at this point in the history
Change artifact layout for easier deployment
  • Loading branch information
jabbera authored Dec 16, 2016
2 parents c989f42 + d881fd1 commit c027928
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 10 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A Custom Http Handler that implements RUTA for: https://jira.sonarsource.com/bro

# Installation

SonarQube scanners DO NOT support anything other then basic\token based authentication. Because of that you will need to setup 2 websites. The first is for the browser and supports single sign on. [WWWROOT_BROWSER] You will also need an unauthenticated one for supporting scanners [WWWROOT_SCANNER]. Please setup these websites ahead of time (ssl required) and make sure you can access index.html. DO NOT USE AN SNI based website for WWWROOT_SCANNER. Run it on a different port then 443. There is a bug that makes it unsupported.
SonarQube scanners DO NOT support anything other then basic\token based authentication. Because of that you will need to setup 2 websites. The first is for the browser and supports single sign on. [WWWROOT_USER] You will also need an unauthenticated one for supporting scanners [WWWROOT_SCANNER]. Please setup these websites ahead of time (ssl required) and make sure you can access index.html. DO NOT USE AN SNI based website for WWWROOT_SCANNER. Run it on a different port then 443. There is a bug that makes it unsupported.

1) Configure sonarqube for RUTA per: https://jira.sonarsource.com/browse/SONAR-5430 (If default settings are used all you should need to do is add: sonar.web.sso.enable=true to the sonar.properties file and restart sonarqube.)

Expand All @@ -15,17 +15,15 @@ SonarQube scanners DO NOT support anything other then basic\token based authenti
3) Run: ConfigureServer.ps1
`Note: This installs the following windows features: IIS-HttpRedirect, IIS-ASPNET45, IIS-WebServerManagementTools, IIS-HttpTracing, IIS-WindowsAuthentication, IIS-NetFxExtensibility45, IIS-ApplicationDevelopment. It unlocks the IIS module ordering system wide as well as the authentication module configuration. It also installs ARR and UrlRewrite server wide.`

4) Copy: [EXTRACT_FOLDER]\web-user.config to: [WWWROOT_BROWSER]\web.config
4) Copy: [EXTRACT_FOLDER]\inetpub-user to: [WWWROOT_USER]

5) Copy: [EXTRACT_FOLDER]\\*.dll to: [WWWROOT_BROWSER]\bin\

6) Browse to https://[WWWROOT_BROWSER_URL] You should hopefully be signed in.
5) Browse to https://[WWWROOT_USER_URL] You should hopefully be signed in.

`Note: This configuration assumes sonarqube is running on the same server as IIS on port 9000. If this is not correct you will need to edit the reverse proxy rules in the web.config file to match your configuration.`

6) Once you have the SSO working the only thing left is to configure the reverse proxy on [WWWROOT_SCANNER].

7) Copy:[EXTRACT_FOLDER]\web-scanner.config to: [WWWROOT_SCANNER]\web.config
7) Copy:[EXTRACT_FOLDER]\inetpub-scanner to: [WWWROOT_SCANNER]

8) You should now be able to run a scanner configured to point at: https://[WWWROOT_SCANNER_URL] with token based authentication.

Expand Down
1 change: 1 addition & 0 deletions RutaHttpModule/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,6 @@
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0.0")]
[assembly: InternalsVisibleTo("RutaHttpModuleTest")]
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")]
16 changes: 12 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ environment:
before_build:
- ps: .\CopySonarTarget.ps1
- nuget restore
- cmd: if defined SonarToken (SonarQubeScanner\SonarQube.Scanner.MSBuild.exe begin /k:"IisRemoteUserTokenAuthentication" /v:0.4 /d:"sonar.host.url=https://sonarqube.com" /d:"sonar.login=%SonarToken%")
- cmd: if defined SonarToken (SonarQubeScanner\SonarQube.Scanner.MSBuild.exe begin /k:"IisRemoteUserTokenAuthentication" /v:0.4 /d:"sonar.host.url=https://sonarqube.com" /d:"sonar.login=%SonarToken%" /d:"sonar.verbose=true")

assembly_info:
patch: true
file: AssemblyInfo.*
assembly_version: '{version}'
assembly_version: '{version}'
assembly_file_version: '{version}'
assembly_informational_version: '{version}-rc'
assembly_informational_version: '$(APPVEYOR_REPO_COMMIT)-rc'


platform: Any CPU
Expand All @@ -41,7 +41,15 @@ test:

after_test:
- vstest.console ".\RutaHttpModuleTest\bin\Release\RutaHttpModuleTest.dll" /logger:trx /TestCaseFilter:"TestCategory!=ActiveDirectoryRequired"
- 7z a RutaHttpModule.zip "%APPVEYOR_BUILD_FOLDER%\RutaHttpModule\bin\%CONFIGURATION%\*.dll" "%APPVEYOR_BUILD_FOLDER%\web-*.config" "%APPVEYOR_BUILD_FOLDER%\InstallRutaModule.ps1"
- cmd: mkdir "%APPVEYOR_BUILD_FOLDER%\Staging"
- cmd: mkdir "%APPVEYOR_BUILD_FOLDER%\Staging\inetpub-user"
- cmd: mkdir "%APPVEYOR_BUILD_FOLDER%\Staging\inetpub-user\bin"
- cmd: mkdir "%APPVEYOR_BUILD_FOLDER%\Staging\inetpub-scanner"
- cmd: copy "%APPVEYOR_BUILD_FOLDER%\web-user.config" "%APPVEYOR_BUILD_FOLDER%\Staging\inetpub-user\web.config"
- cmd: copy "%APPVEYOR_BUILD_FOLDER%\RutaHttpModule\bin\%CONFIGURATION%\*.dll" "%APPVEYOR_BUILD_FOLDER%\Staging\inetpub-user\bin\"
- cmd: copy "%APPVEYOR_BUILD_FOLDER%\web-scanner.config" "%APPVEYOR_BUILD_FOLDER%\Staging\inetpub-scanner\web.config"
- cmd: copy "%APPVEYOR_BUILD_FOLDER%\ConfigureServer.ps1" "%APPVEYOR_BUILD_FOLDER%\Staging\ConfigureServer.ps1"
- 7z a RutaHttpModule.zip "%APPVEYOR_BUILD_FOLDER%\Staging\"
- cmd: if defined SonarToken (SonarQubeScanner\SonarQube.Scanner.MSBuild.exe end /d:"sonar.login=%SonarToken%")

artifacts:
Expand Down

0 comments on commit c027928

Please sign in to comment.