Skip to content

Commit

Permalink
Updated pipeline to reset the IIS after installation of the hosting b…
Browse files Browse the repository at this point in the history
…undle
  • Loading branch information
tomasherceg committed Jan 17, 2023
1 parent 2cb055f commit 2c95ece
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
3 changes: 0 additions & 3 deletions .github/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ runs:
3.1.x
- if: ${{ runner.os == 'Windows' }}
uses: microsoft/[email protected]
- if: ${{ runner.os == 'Windows' }}
run: choco install dotnetcore-3.1-windowshosting -y
shell: pwsh

# restore packages
- if: ${{ runner.os == 'Windows' }}
Expand Down
7 changes: 7 additions & 0 deletions .github/uitest/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,13 @@ runs:
--config "${{ inputs.build-configuration }}"
--environment "${{ inputs.runtime-environment }}"
shell: bash

- if: ${{ runner.os == 'Windows' }}
run: choco install dotnet-aspnetcoremodule-v2 -y
shell: pwsh
- if: ${{ runner.os == 'Windows' }}
run: iisreset
shell: pwsh
- if: ${{ runner.os == 'Windows' }}
name: uitest.ps1
run: .\.github\uitest\uitest.ps1
Expand Down
15 changes: 15 additions & 0 deletions .github/uitest/uitest.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,21 @@ function Test-Sample {
Sleep 5
}
}

# print out all log files
Export-IISConfiguration -PhysicalPath c:\inetpub -DontExportKeys -Force
foreach ($log in dir c:\inetpub\*.config) {
write-host $log
get-content $log | write-host
}
foreach ($log in dir c:\inetpub\logs\logfiles\*\*.log) {
write-host $log
get-content $log | write-host
}
foreach ($log in dir $root\artifacts\**\*.log) {
write-host $log
get-content $log | write-host
}
throw "The sample '${sampleName}' failed to start."
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Samples/Api.AspNetCore/web.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<handlers>
<add name="aspNetCore" path="*" verb="*" modules="AspNetCoreModuleV2" resourceType="Unspecified" />
</handlers>
<aspNetCore processPath="dotnet" arguments=".\DotVVM.Samples.BasicSamples.Api.AspNetCore.dll" stdoutLogEnabled="false" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
<aspNetCore processPath="dotnet" arguments=".\DotVVM.Samples.BasicSamples.Api.AspNetCore.dll" stdoutLogEnabled="true" stdoutLogFile=".\logs\stdout" hostingModel="inprocess">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
Expand Down

0 comments on commit 2c95ece

Please sign in to comment.