Skip to content

Commit 2b7c26a

Browse files
authored
Dynamically install NGinx Internal/#1525 (#6963)
1 parent 07926f0 commit 2b7c26a

File tree

7 files changed

+23
-5
lines changed

7 files changed

+23
-5
lines changed

.azure/pipelines/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,18 @@ jobs:
2424
jobDisplayName: "Build and test: macOS"
2525
agentOs: macOs
2626
buildScript: ./eng/scripts/cibuild.sh
27+
beforeBuild:
28+
- bash: "./eng/scripts/install-nginx-mac.sh"
29+
displayName: Installing Nginx
2730
- template: jobs/default-build.yml
2831
parameters:
2932
jobName: Linux_Build
3033
jobDisplayName: "Build and test: Linux"
3134
agentOs: Linux
3235
buildScript: ./eng/scripts/cibuild.sh
36+
beforeBuild:
37+
- bash: "./eng/scripts/install-nginx-linux.sh"
38+
displayName: Installing Nginx
3339
- template: jobs/iisintegration-job.yml
3440
parameters:
3541
TestGroupName: IIS

eng/scripts/cibuild.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
set -euo pipefail
44

5+
export PATH="$PATH:$HOME/nginxinstall/sbin/"
6+
57
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
68
repo_root="$DIR/../.."
79
"$repo_root/build.sh" --ci --all --restore --build --pack --test "$@"

eng/scripts/install-nginx-linux.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
curl -sSL http://nginx.org/download/nginx-1.14.2.tar.gz | tar zxfv - -C /tmp && cd /tmp/nginx-1.14.2/
4+
./configure --prefix=$HOME/nginxinstall --with-http_ssl_module
5+
make
6+
make install

eng/scripts/install-nginx-mac.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
brew update
4+
brew install openssl nginx

src/Servers/test/FunctionalTests/HelloWorldTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public HelloWorldTests(ITestOutputHelper output) : base(output)
2020
}
2121

2222
public static TestMatrix TestVariants
23-
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, /* ServerType.Nginx, https://github.com/aspnet/AspNetCore-Internal/issues/1525 */ ServerType.HttpSys)
23+
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys)
2424
.WithTfms(Tfm.NetCoreApp30)
2525
.WithApplicationTypes(ApplicationType.Portable)
2626
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)

src/Servers/test/FunctionalTests/ResponseCompressionTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public ResponseCompressionTests(ITestOutputHelper output) : base(output)
3232
}
3333

3434
public static TestMatrix NoCompressionTestVariants
35-
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, /* ServerType.Nginx, https://github.com/aspnet/AspNetCore-Internal/issues/1525 */ ServerType.HttpSys)
35+
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys)
3636
.WithTfms(Tfm.NetCoreApp30)
3737
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
3838
.WithAllHostingModels();
@@ -45,7 +45,7 @@ public Task ResponseCompression_NoCompression(TestVariant variant)
4545
}
4646

4747
public static TestMatrix HostCompressionTestVariants
48-
=> TestMatrix.ForServers(ServerType.IISExpress /*, ServerType.Nginx https://github.com/aspnet/AspNetCore-Internal/issues/1525 */ )
48+
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Nginx)
4949
.WithTfms(Tfm.NetCoreApp30)
5050
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
5151
.WithAllHostingModels();
@@ -71,7 +71,7 @@ public Task ResponseCompression_AppCompression(TestVariant variant)
7171
}
7272

7373
public static TestMatrix HostAndAppCompressionTestVariants
74-
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, /* ServerType.Nginx, https://github.com/aspnet/AspNetCore-Internal/issues/1525 */ ServerType.HttpSys)
74+
=> TestMatrix.ForServers(ServerType.IISExpress, ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys)
7575
.WithTfms(Tfm.NetCoreApp30)
7676
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
7777
.WithAllHostingModels();

src/Servers/test/FunctionalTests/ResponseTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public ResponseTests(ITestOutputHelper output) : base(output)
2525
}
2626

2727
public static TestMatrix TestVariants
28-
=> TestMatrix.ForServers(/* ServerType.IISExpress, https://github.com/aspnet/AspNetCore/issues/6168, */ ServerType.Kestrel, /* ServerType.Nginx, https://github.com/aspnet/AspNetCore-Internal/issues/1525 */ ServerType.HttpSys)
28+
=> TestMatrix.ForServers(/* ServerType.IISExpress, https://github.com/aspnet/AspNetCore/issues/6168, */ ServerType.Kestrel, ServerType.Nginx, ServerType.HttpSys)
2929
.WithTfms(Tfm.NetCoreApp30)
3030
.WithAncmVersions(AncmVersion.AspNetCoreModuleV2)
3131
.WithAllHostingModels();

0 commit comments

Comments
 (0)