├── integration_tests
├── apps
│ ├── test-1.0
│ │ ├── app.yaml
│ │ ├── .bowerrc
│ │ ├── global.json
│ │ ├── appsettings.json
│ │ ├── app-canary.yaml
│ │ ├── runtimes.yaml
│ │ ├── appsettings.Development.json
│ │ ├── .vscode
│ │ │ ├── tasks.json
│ │ │ └── launch.json
│ │ ├── test.yaml.in
│ │ ├── Program.cs
│ │ ├── Controllers
│ │ │ └── TestsController.cs
│ │ ├── test-1.0.csproj
│ │ └── Startup.cs
│ ├── test-1.1
│ │ ├── app.yaml
│ │ ├── global.json
│ │ ├── appsettings.json
│ │ ├── app-canary.yaml
│ │ ├── runtimes.yaml
│ │ ├── appsettings.Development.json
│ │ ├── .vscode
│ │ │ ├── tasks.json
│ │ │ └── launch.json
│ │ ├── test.yaml.in
│ │ ├── Program.cs
│ │ ├── Controllers
│ │ │ └── TestsController.cs
│ │ ├── test-1.1.csproj
│ │ └── Startup.cs
│ ├── test-2.0
│ │ ├── app.yaml
│ │ ├── global.json
│ │ ├── app-canary.yaml
│ │ ├── runtimes.yaml
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ ├── test.yaml.in
│ │ ├── Program.cs
│ │ ├── Controllers
│ │ │ └── TestsController.cs
│ │ ├── test-2.0.csproj
│ │ └── Startup.cs
│ ├── test-2.1
│ │ ├── app.yaml
│ │ ├── global.json
│ │ ├── app-canary.yaml
│ │ ├── runtimes.yaml
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ ├── test.yaml.in
│ │ ├── Program.cs
│ │ ├── Controllers
│ │ │ └── TestsController.cs
│ │ ├── test-2.1.csproj
│ │ └── Startup.cs
│ ├── test-2.2
│ │ ├── app.yaml
│ │ ├── global.json
│ │ ├── app-canary.yaml
│ │ ├── runtimes.yaml
│ │ ├── appsettings.Development.json
│ │ ├── appsettings.json
│ │ ├── test.yaml.in
│ │ ├── Program.cs
│ │ ├── Controllers
│ │ │ └── TestsController.cs
│ │ ├── test-2.2.csproj
│ │ └── Startup.cs
│ └── README.md
├── run_tests.yaml
└── README.md
├── runtimes
├── versions
│ ├── aspnetcore-1.0
│ │ ├── functional_tests
│ │ │ ├── app
│ │ │ │ ├── global.json
│ │ │ │ ├── app.csproj
│ │ │ │ └── Program.cs
│ │ │ └── published
│ │ │ │ ├── app.dll
│ │ │ │ ├── app.pdb
│ │ │ │ ├── app.runtimeconfig.json
│ │ │ │ └── app.deps.json
│ │ ├── structural_tests
│ │ │ └── aspnet.yaml
│ │ └── image
│ │ │ └── Dockerfile
│ ├── aspnetcore-1.1
│ │ ├── functional_tests
│ │ │ ├── app
│ │ │ │ ├── global.json
│ │ │ │ ├── app.csproj
│ │ │ │ └── Program.cs
│ │ │ └── published
│ │ │ │ ├── app.dll
│ │ │ │ ├── app.pdb
│ │ │ │ ├── app.runtimeconfig.json
│ │ │ │ └── app.deps.json
│ │ ├── structural_tests
│ │ │ └── aspnet.yaml
│ │ └── image
│ │ │ └── Dockerfile
│ ├── aspnetcore-2.1
│ │ ├── functional_tests
│ │ │ ├── app
│ │ │ │ ├── global.json
│ │ │ │ ├── app.csproj
│ │ │ │ └── Program.cs
│ │ │ └── published
│ │ │ │ ├── app.dll
│ │ │ │ ├── app.pdb
│ │ │ │ ├── app.runtimeconfig.json
│ │ │ │ └── app.deps.json
│ │ ├── structural_tests
│ │ │ └── aspnet.yaml
│ │ ├── README.md
│ │ └── image
│ │ │ └── Dockerfile
│ ├── aspnetcore-2.2
│ │ ├── functional_tests
│ │ │ ├── app
│ │ │ │ ├── global.json
│ │ │ │ ├── app.csproj
│ │ │ │ └── Program.cs
│ │ │ └── published
│ │ │ │ ├── app.dll
│ │ │ │ ├── app.pdb
│ │ │ │ ├── app.runtimeconfig.json
│ │ │ │ └── app.deps.json
│ │ ├── structural_tests
│ │ │ └── aspnet.yaml
│ │ ├── README.md
│ │ └── image
│ │ │ └── Dockerfile
│ ├── aspnetcore-3.0
│ │ ├── functional_tests
│ │ │ ├── app
│ │ │ │ ├── global.json
│ │ │ │ ├── app.csproj
│ │ │ │ └── Program.cs
│ │ │ └── published
│ │ │ │ ├── app.dll
│ │ │ │ ├── app.pdb
│ │ │ │ ├── app.runtimeconfig.json
│ │ │ │ └── app.deps.json
│ │ ├── structural_tests
│ │ │ └── aspnet.yaml
│ │ ├── README.md
│ │ └── image
│ │ │ └── Dockerfile
│ ├── aspnetcore-3.1
│ │ ├── functional_tests
│ │ │ ├── app
│ │ │ │ ├── global.json
│ │ │ │ ├── app.csproj
│ │ │ │ └── Program.cs
│ │ │ └── published
│ │ │ │ ├── app.dll
│ │ │ │ ├── app.pdb
│ │ │ │ ├── app.runtimeconfig.json
│ │ │ │ └── app.deps.json
│ │ ├── structural_tests
│ │ │ └── aspnet.yaml
│ │ ├── README.md
│ │ └── image
│ │ │ └── Dockerfile
│ └── aspnetcore-2.0
│ │ ├── functional_tests
│ │ ├── app
│ │ │ ├── global.json
│ │ │ ├── app.csproj
│ │ │ └── Program.cs
│ │ └── published
│ │ │ ├── app.dll
│ │ │ ├── app.pdb
│ │ │ ├── app.runtimeconfig.json
│ │ │ └── app.deps.json
│ │ ├── structural_tests
│ │ └── aspnet.yaml
│ │ ├── README.md
│ │ └── image
│ │ └── Dockerfile
├── dockerfile_generator
│ ├── Dockerfile
│ └── generator.sh
├── README.md
└── cloudbuild.yaml
├── tools
├── ci-scripts
│ ├── builder.sh
│ ├── release.sh
│ ├── nightly.sh
│ ├── deploy_check.sh
│ └── integration-test.sh
├── common.inc
├── build_all.sh
├── test_all.sh
├── build_builder.sh
├── submit_build.sh
├── update_integration_tests.sh
├── update_runtimes_tests.sh
├── README.md
├── build_runtimes.sh
└── test.sh
├── .gitignore
├── aspnetcore.yaml
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── README.md
└── LICENSE
/integration_tests/apps/test-1.0/app.yaml:
--------------------------------------------------------------------------------
1 | runtime: aspnetcore
2 | env: flex
3 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/app.yaml:
--------------------------------------------------------------------------------
1 | runtime: aspnetcore
2 | env: flex
3 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.0/app.yaml:
--------------------------------------------------------------------------------
1 | runtime: aspnetcore
2 | env: flex
3 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.1/app.yaml:
--------------------------------------------------------------------------------
1 | runtime: aspnetcore
2 | env: flex
3 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.2/app.yaml:
--------------------------------------------------------------------------------
1 | runtime: aspnetcore
2 | env: flex
3 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/.bowerrc:
--------------------------------------------------------------------------------
1 | {
2 | "directory": "wwwroot/lib"
3 | }
4 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.0/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "2.1.4"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "1.1.14"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "1.1.14"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.1/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "2.1.510"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.2/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "2.2.110"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.0/functional_tests/app/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "1.1.10"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.1/functional_tests/app/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "1.1.10"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.1/functional_tests/app/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "2.1.518"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.2/functional_tests/app/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "2.2.110"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.0/functional_tests/app/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "3.0.103"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.1/functional_tests/app/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "3.1.109"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.0/functional_tests/app/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "2.1.505"
4 | }
5 | }
6 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Warning"
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Warning"
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/tools/ci-scripts/builder.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | source "$KOKORO_GFILE_DIR/common.sh"
3 |
4 | cd github/aspnetcore-docker
5 | ./tools/submit_build.sh ./builder/cloudbuild.yaml ${DOCKER_NAMESPACE}
6 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.0/functional_tests/published/app.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-1.0/functional_tests/published/app.dll
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.0/functional_tests/published/app.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-1.0/functional_tests/published/app.pdb
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.1/functional_tests/published/app.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-1.1/functional_tests/published/app.dll
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.1/functional_tests/published/app.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-1.1/functional_tests/published/app.pdb
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.0/functional_tests/published/app.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-2.0/functional_tests/published/app.dll
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.0/functional_tests/published/app.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-2.0/functional_tests/published/app.pdb
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.1/functional_tests/published/app.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-2.1/functional_tests/published/app.dll
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.1/functional_tests/published/app.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-2.1/functional_tests/published/app.pdb
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.2/functional_tests/published/app.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-2.2/functional_tests/published/app.dll
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.2/functional_tests/published/app.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-2.2/functional_tests/published/app.pdb
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.0/functional_tests/published/app.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-3.0/functional_tests/published/app.dll
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.0/functional_tests/published/app.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-3.0/functional_tests/published/app.pdb
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.1/functional_tests/published/app.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-3.1/functional_tests/published/app.dll
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.1/functional_tests/published/app.pdb:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/GoogleCloudPlatform/aspnet-docker/HEAD/runtimes/versions/aspnetcore-3.1/functional_tests/published/app.pdb
--------------------------------------------------------------------------------
/tools/ci-scripts/release.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | source "$KOKORO_GFILE_DIR/common.sh"
3 |
4 | cd github/aspnetcore-docker
5 | ./tools/submit_build.sh ./runtimes/cloudbuild.yaml ${DOCKER_NAMESPACE}
6 |
7 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.0/functional_tests/published/app.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "framework": {
4 | "name": "Microsoft.NETCore.App",
5 | "version": "1.0.5"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.1/functional_tests/published/app.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "framework": {
4 | "name": "Microsoft.NETCore.App",
5 | "version": "1.1.2"
6 | }
7 | }
8 | }
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/app-canary.yaml:
--------------------------------------------------------------------------------
1 | runtime: aspnetcore
2 | env: flex
3 |
4 | # Sets the image to 'nextcanary' so we can test the image with the
5 | # canary build App Engine Flex.
6 | beta_settings:
7 | image: nextcanary
8 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/app-canary.yaml:
--------------------------------------------------------------------------------
1 | runtime: aspnetcore
2 | env: flex
3 |
4 | # Sets the image to 'nextcanary' so we can test the image with the
5 | # canary build App Engine Flex.
6 | beta_settings:
7 | image: nextcanary
8 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.0/app-canary.yaml:
--------------------------------------------------------------------------------
1 | runtime: aspnetcore
2 | env: flex
3 |
4 | # Sets the image to 'nextcanary' so we can test the image with the
5 | # canary build App Engine Flex.
6 | beta_settings:
7 | image: nextcanary
8 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.1/app-canary.yaml:
--------------------------------------------------------------------------------
1 | runtime: aspnetcore
2 | env: flex
3 |
4 | # Sets the image to 'nextcanary' so we can test the image with the
5 | # canary build App Engine Flex.
6 | beta_settings:
7 | image: nextcanary
8 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.2/app-canary.yaml:
--------------------------------------------------------------------------------
1 | runtime: aspnetcore
2 | env: flex
3 |
4 | # Sets the image to 'nextcanary' so we can test the image with the
5 | # canary build App Engine Flex.
6 | beta_settings:
7 | image: nextcanary
8 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/runtimes.yaml:
--------------------------------------------------------------------------------
1 | # This file contains the test definition necessary to run the app
2 | # using the test driver.
3 | schema_version: 1
4 |
5 | runtimes:
6 | aspnetcore:
7 | target:
8 | file: test.yaml
9 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/runtimes.yaml:
--------------------------------------------------------------------------------
1 | # This file contains the test definition necessary to run the app
2 | # using the test driver.
3 | schema_version: 1
4 |
5 | runtimes:
6 | aspnetcore:
7 | target:
8 | file: test.yaml
9 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.0/runtimes.yaml:
--------------------------------------------------------------------------------
1 | # This file contains the test definition necessary to run the app
2 | # using the test driver.
3 | schema_version: 1
4 |
5 | runtimes:
6 | aspnetcore:
7 | target:
8 | file: test.yaml
9 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.1/runtimes.yaml:
--------------------------------------------------------------------------------
1 | # This file contains the test definition necessary to run the app
2 | # using the test driver.
3 | schema_version: 1
4 |
5 | runtimes:
6 | aspnetcore:
7 | target:
8 | file: test.yaml
9 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.2/runtimes.yaml:
--------------------------------------------------------------------------------
1 | # This file contains the test definition necessary to run the app
2 | # using the test driver.
3 | schema_version: 1
4 |
5 | runtimes:
6 | aspnetcore:
7 | target:
8 | file: test.yaml
9 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.0/functional_tests/published/app.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "netcoreapp2.0",
4 | "framework": {
5 | "name": "Microsoft.NETCore.App",
6 | "version": "2.0.0"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.1/functional_tests/published/app.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "netcoreapp2.1",
4 | "framework": {
5 | "name": "Microsoft.NETCore.App",
6 | "version": "2.1.0"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.2/functional_tests/published/app.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "netcoreapp2.2",
4 | "framework": {
5 | "name": "Microsoft.NETCore.App",
6 | "version": "2.2.0"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.0/functional_tests/published/app.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "netcoreapp3.0",
4 | "framework": {
5 | "name": "Microsoft.NETCore.App",
6 | "version": "3.0.0"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.1/functional_tests/published/app.runtimeconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeOptions": {
3 | "tfm": "netcoreapp3.1",
4 | "framework": {
5 | "name": "Microsoft.NETCore.App",
6 | "version": "3.1.0"
7 | }
8 | }
9 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.1/functional_tests/app/app.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp2.1
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.2/functional_tests/app/app.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp2.2
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.0/functional_tests/app/app.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.0
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.1/functional_tests/app/app.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp3.1
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.1/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.2/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.0/functional_tests/app/app.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp1.0
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.1/functional_tests/app/app.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp1.1
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.0/functional_tests/app/app.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | Exe
5 | netcoreapp2.0
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.0/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "LogLevel": {
5 | "Default": "Debug",
6 | "System": "Information",
7 | "Microsoft": "Information"
8 | }
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *~
2 | **/.vs/*
3 | .dockercfg
4 | **/project.lock.json
5 | .DS_Store
6 | tests/apps/*/obj
7 | tests/apps/*/bin
8 | runtimes/versions/*/functional_tests/app/obj
9 | runtimes/versions/*/functional_tests/app/bin
10 | integration_tests/apps/*/obj
11 | integration_tests/apps/*/bin
12 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.1/functional_tests/app/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace app
4 | {
5 | class Program
6 | {
7 | static void Main(string[] args)
8 | {
9 | Console.WriteLine("Hello World 2.1!");
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.2/functional_tests/app/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace app
4 | {
5 | class Program
6 | {
7 | static void Main(string[] args)
8 | {
9 | Console.WriteLine("Hello World 2.2!");
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.0/functional_tests/app/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace app
4 | {
5 | class Program
6 | {
7 | static void Main(string[] args)
8 | {
9 | Console.WriteLine("Hello World 3.0!");
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.1/functional_tests/app/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace app
4 | {
5 | class Program
6 | {
7 | static void Main(string[] args)
8 | {
9 | Console.WriteLine("Hello World 3.1!");
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.0/functional_tests/app/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace app
4 | {
5 | class Program
6 | {
7 | static void Main(string[] args)
8 | {
9 | Console.WriteLine("Hello World 1.0!");
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.1/functional_tests/app/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace app
4 | {
5 | class Program
6 | {
7 | static void Main(string[] args)
8 | {
9 | Console.WriteLine("Hello World 1.1!");
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.0/functional_tests/app/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace app
4 | {
5 | class Program
6 | {
7 | static void Main(string[] args)
8 | {
9 | Console.WriteLine("Hello World 2.0!");
10 | }
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/runtimes/dockerfile_generator/Dockerfile:
--------------------------------------------------------------------------------
1 | # This dockerfile is used to create an image that can validate the
2 | # results of the functional tests.
3 | FROM gcr.io/google_appengine/debian8
4 | RUN mkdir /generator
5 | ADD ./generator.sh /generator
6 | WORKDIR /generator
7 | ENTRYPOINT [ "/generator/generator.sh" ]
8 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.1/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "Debug": {
5 | "LogLevel": {
6 | "Default": "Warning"
7 | }
8 | },
9 | "Console": {
10 | "LogLevel": {
11 | "Default": "Warning"
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.2/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "Debug": {
5 | "LogLevel": {
6 | "Default": "Warning"
7 | }
8 | },
9 | "Console": {
10 | "LogLevel": {
11 | "Default": "Warning"
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.0/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "IncludeScopes": false,
4 | "Debug": {
5 | "LogLevel": {
6 | "Default": "Warning"
7 | }
8 | },
9 | "Console": {
10 | "LogLevel": {
11 | "Default": "Warning"
12 | }
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.1/test.yaml.in:
--------------------------------------------------------------------------------
1 | steps:
2 | - name: '${STAGING_BUILDER_IMAGE}'
3 | args:
4 | - '--version-map'
5 | - '2.1.19=gcr.io/aspnetcore-staging/aspnetcore:2.1.19'
6 | - name: gcr.io/cloud-builders/docker:latest
7 | args: [ 'build', '-t', '$_OUTPUT_IMAGE', '--no-cache', '--pull', '.' ]
8 | images:
9 | ['$_OUTPUT_IMAGE']
10 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.2/test.yaml.in:
--------------------------------------------------------------------------------
1 | steps:
2 | - name: '${STAGING_BUILDER_IMAGE}'
3 | args:
4 | - '--version-map'
5 | - '2.2.8=gcr.io/aspnetcore-staging/aspnetcore:2.2.8'
6 | - name: gcr.io/cloud-builders/docker:latest
7 | args: [ 'build', '-t', '$_OUTPUT_IMAGE', '--no-cache', '--pull', '.' ]
8 | images:
9 | ['$_OUTPUT_IMAGE']
10 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.1.0",
3 | "command": "dotnet",
4 | "isShellCommand": true,
5 | "args": [],
6 | "tasks": [
7 | {
8 | "taskName": "build",
9 | "args": [
10 | "${workspaceRoot}/test-1.0.csproj"
11 | ],
12 | "isBuildCommand": true,
13 | "problemMatcher": "$msCompile"
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/.vscode/tasks.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.1.0",
3 | "command": "dotnet",
4 | "isShellCommand": true,
5 | "args": [],
6 | "tasks": [
7 | {
8 | "taskName": "build",
9 | "args": [
10 | "${workspaceRoot}/test-1.1.csproj"
11 | ],
12 | "isBuildCommand": true,
13 | "problemMatcher": "$msCompile"
14 | }
15 | ]
16 | }
--------------------------------------------------------------------------------
/integration_tests/run_tests.yaml:
--------------------------------------------------------------------------------
1 | # This build script will run the tests against the provided version and
2 | # project.
3 | steps:
4 | - name: gcr.io/gcp-runtimes/integration_test
5 | args:
6 | - '--url'
7 | - 'https://${_VERSION_ID}-dot-${PROJECT_ID}.appspot.com'
8 | - '--skip-monitoring-tests'
9 | - '--skip-standard-logging-tests'
10 | - '--skip-custom-logging-tests'
11 | - '--skip-exception-tests'
12 | - '--skip-custom-tests'
13 |
--------------------------------------------------------------------------------
/tools/ci-scripts/nightly.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | source "$KOKORO_GFILE_DIR/common.sh"
4 |
5 | cd github/aspnetcore-docker
6 |
7 | # Build and tag the runtimes.
8 | tools/build_runtimes.sh ${DOCKER_NAMESPACE}
9 |
10 | # Build and tag the builder.
11 | export readonly TAG=$(date +"%Y-%m-%d_%H_%M")
12 | tools/submit_build.sh builder/cloudbuild.yaml ${DOCKER_NAMESPACE}
13 | gcloud container images add-tag \
14 | ${DOCKER_NAMESPACE}/aspnetcorebuild:${TAG} \
15 | ${DOCKER_NAMESPACE}/aspnetcorebuild:latest
16 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.2/structural_tests/aspnet.yaml:
--------------------------------------------------------------------------------
1 | schemaVersion: "1.0.0"
2 |
3 | commandTests:
4 | - name: 'dotnet installation'
5 | command: ['which', 'dotnet']
6 | expectedOutput: ['/usr/bin/dotnet\n']
7 | - name: 'dotnet version'
8 | command: ['dotnet', '--info']
9 | expectedOutput: ['.*2\.2\.110.*']
10 |
11 | fileExistenceTests:
12 | - name: 'dotnet directory'
13 | path: '/usr/share/dotnet'
14 | shouldExist: true
15 |
16 | licenseTests:
17 | - debian: true
18 | files: []
19 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.0/structural_tests/aspnet.yaml:
--------------------------------------------------------------------------------
1 | schemaVersion: "1.0.0"
2 |
3 | commandTests:
4 | - name: 'dotnet installation'
5 | command: ['which', 'dotnet']
6 | expectedOutput: ['/usr/bin/dotnet\n']
7 | - name: 'dotnet version'
8 | command: ['dotnet', '--info']
9 | expectedOutput: ['.*3\.0\.103.*']
10 |
11 | fileExistenceTests:
12 | - name: 'dotnet directory'
13 | path: '/usr/share/dotnet'
14 | shouldExist: true
15 |
16 | licenseTests:
17 | - debian: true
18 | files: []
19 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.1/structural_tests/aspnet.yaml:
--------------------------------------------------------------------------------
1 | schemaVersion: "1.0.0"
2 |
3 | commandTests:
4 | - name: 'dotnet installation'
5 | command: ['which', 'dotnet']
6 | expectedOutput: ['/usr/bin/dotnet\n']
7 | - name: 'dotnet version'
8 | command: ['dotnet', '--info']
9 | expectedOutput: ['.*3\.1\.109.*']
10 |
11 | fileExistenceTests:
12 | - name: 'dotnet directory'
13 | path: '/usr/share/dotnet'
14 | shouldExist: true
15 |
16 | licenseTests:
17 | - debian: true
18 | files: []
19 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.0/test.yaml.in:
--------------------------------------------------------------------------------
1 | steps:
2 | - name: '${STAGING_BUILDER_IMAGE}'
3 | args:
4 | - '--version-map'
5 | - '1.0.11=gcr.io/aspnetcore-staging/aspnetcore:1.0.11'
6 | - '1.1.8=gcr.io/aspnetcore-staging/aspnetcore:1.1.8'
7 | - '2.0.9=gcr.io/aspnetcore-staging/aspnetcore:2.0.9'
8 | - '2.1.0=gcr.io/aspnetcore-staging/aspnetcore:2.1.0'
9 | - name: gcr.io/cloud-builders/docker:latest
10 | args: [ 'build', '-t', '$_OUTPUT_IMAGE', '--no-cache', '--pull', '.' ]
11 | images:
12 | ['$_OUTPUT_IMAGE']
13 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/test.yaml.in:
--------------------------------------------------------------------------------
1 | steps:
2 | - name: '${STAGING_BUILDER_IMAGE}'
3 | args:
4 | - '--version-map'
5 | - '1.0.16=gcr.io/aspnetcore-staging/aspnetcore:1.0.16'
6 | - '1.1.12=gcr.io/aspnetcore-staging/aspnetcore:1.1.12'
7 | - '2.0.7=gcr.io/aspnetcore-staging/aspnetcore:2.0.7'
8 | - '2.1.9=gcr.io/aspnetcore-staging/aspnetcore:2.1.9'
9 | - name: gcr.io/cloud-builders/docker:latest
10 | args: [ 'build', '-t', '$_OUTPUT_IMAGE', '--no-cache', '--pull', '.' ]
11 | images:
12 | ['$_OUTPUT_IMAGE']
13 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/test.yaml.in:
--------------------------------------------------------------------------------
1 | steps:
2 | - name: '${STAGING_BUILDER_IMAGE}'
3 | args:
4 | - '--version-map'
5 | - '1.0.15=gcr.io/aspnetcore-staging/aspnetcore:1.0.15'
6 | - '1.1.13=gcr.io/aspnetcore-staging/aspnetcore:1.1.13'
7 | - '2.0.7=gcr.io/aspnetcore-staging/aspnetcore:2.0.7'
8 | - '2.1.9=gcr.io/aspnetcore-staging/aspnetcore:2.1.9'
9 | - name: gcr.io/cloud-builders/docker:latest
10 | args: [ 'build', '-t', '$_OUTPUT_IMAGE', '--no-cache', '--pull', '.' ]
11 | images:
12 | ['$_OUTPUT_IMAGE']
13 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.0/functional_tests/published/app.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v3.0",
4 | "signature": ""
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v3.0": {
9 | "app/1.0.0": {
10 | "runtime": {
11 | "app.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "app/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.1/functional_tests/published/app.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v3.1",
4 | "signature": ""
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v3.1": {
9 | "app/1.0.0": {
10 | "runtime": {
11 | "app.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "app/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.0/structural_tests/aspnet.yaml:
--------------------------------------------------------------------------------
1 | schemaVersion: "1.0.0"
2 |
3 | commandTests:
4 | - name: 'dotnet installation'
5 | command: ['which', 'dotnet']
6 | expectedOutput: ['/usr/bin/dotnet\n']
7 | - name: 'dotnet version'
8 | command: ['dotnet', '--version']
9 | expectedOutput: ['.*1\.1\.14.*']
10 |
11 | fileExistenceTests:
12 | - name: 'dotnet directory'
13 | path: '/usr/share/dotnet'
14 | isDirectory: true
15 | shouldExist: true
16 |
17 | licenseTests:
18 | - debian: true
19 | files: []
20 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.1/structural_tests/aspnet.yaml:
--------------------------------------------------------------------------------
1 | schemaVersion: "1.0.0"
2 |
3 | commandTests:
4 | - name: 'dotnet installation'
5 | command: ['which', 'dotnet']
6 | expectedOutput: ['/usr/bin/dotnet\n']
7 | - name: 'dotnet version'
8 | command: ['dotnet', '--version']
9 | expectedOutput: ['.*1\.1\.14.*']
10 |
11 | fileExistenceTests:
12 | - name: 'dotnet directory'
13 | path: '/usr/share/dotnet'
14 | isDirectory: true
15 | shouldExist: true
16 |
17 | licenseTests:
18 | - debian: true
19 | files: []
20 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.0/structural_tests/aspnet.yaml:
--------------------------------------------------------------------------------
1 | schemaVersion: "1.0.0"
2 |
3 | commandTests:
4 | - name: 'dotnet installation'
5 | command: ['which', 'dotnet']
6 | expectedOutput: ['/usr/bin/dotnet\n']
7 | - name: 'dotnet version'
8 | command: ['dotnet', '--info']
9 | expectedOutput: ['.*2\.1\.504.*']
10 |
11 | fileExistenceTests:
12 | - name: 'dotnet directory'
13 | path: '/usr/share/dotnet'
14 | isDirectory: true
15 | shouldExist: true
16 |
17 | licenseTests:
18 | - debian: true
19 | files: []
20 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.1/structural_tests/aspnet.yaml:
--------------------------------------------------------------------------------
1 | schemaVersion: "1.0.0"
2 |
3 | commandTests:
4 | - name: 'dotnet installation'
5 | command: ['which', 'dotnet']
6 | expectedOutput: ['/usr/bin/dotnet\n']
7 | - name: 'dotnet version'
8 | command: ['dotnet', '--info']
9 | expectedOutput: ['.*2\.1\.518.*']
10 |
11 | fileExistenceTests:
12 | - name: 'dotnet directory'
13 | path: '/usr/share/dotnet'
14 | isDirectory: true
15 | shouldExist: true
16 |
17 | licenseTests:
18 | - debian: true
19 | files: []
20 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.0/functional_tests/published/app.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v1.0",
4 | "signature": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v1.0": {
9 | "app/1.0.0": {
10 | "runtime": {
11 | "app.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "app/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.1/functional_tests/published/app.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v1.1",
4 | "signature": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v1.1": {
9 | "app/1.0.0": {
10 | "runtime": {
11 | "app.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "app/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.0/functional_tests/published/app.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v2.0",
4 | "signature": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v2.0": {
9 | "app/1.0.0": {
10 | "runtime": {
11 | "app.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "app/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.1/functional_tests/published/app.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v2.1",
4 | "signature": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v2.1": {
9 | "app/1.0.0": {
10 | "runtime": {
11 | "app.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "app/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.2/functional_tests/published/app.deps.json:
--------------------------------------------------------------------------------
1 | {
2 | "runtimeTarget": {
3 | "name": ".NETCoreApp,Version=v2.2",
4 | "signature": "da39a3ee5e6b4b0d3255bfef95601890afd80709"
5 | },
6 | "compilationOptions": {},
7 | "targets": {
8 | ".NETCoreApp,Version=v2.2": {
9 | "app/1.0.0": {
10 | "runtime": {
11 | "app.dll": {}
12 | }
13 | }
14 | }
15 | },
16 | "libraries": {
17 | "app/1.0.0": {
18 | "type": "project",
19 | "serviceable": false,
20 | "sha512": ""
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.0/README.md:
--------------------------------------------------------------------------------
1 | # .NET Core 3.0 Runtime
2 | This directory contains the .NET Core 3.0 runtime. This runtime is a bit different than the other runtime in that it uses the .NET Core SDK (version 3.0) instead of the runtime to run the apps. This is done to be able to use the [runtime store](https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-store) feature of the runtime, in which the system assemblies are stored in the deployment target (the app's Docker image) and therefore the app's publish directory doesn't need to include themn. These assemblies are only included with the .NET Core SDK.
3 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.0/README.md:
--------------------------------------------------------------------------------
1 | # .NET Core 2.0 Runtime
2 | This directory contains the .NET Core 2.0 runtime. This runtime is a bit different than the other runtime in that it uses the .NET Core SDK (version 2.0.0) instead of the runtime to run the apps. This is done to be able to use the [runtime store](https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-store) feature of the runtime, in which the system assemblies are stored in the deployment target (the app's Docker image) and therefore the app's publish directory doesn't need to include themn. These assemblies are only included with the .NET Core SDK.
3 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.1/README.md:
--------------------------------------------------------------------------------
1 | # .NET Core 2.1 Runtime
2 | This directory contains the .NET Core 2.1 runtime. This runtime is a bit different than the other runtime in that it uses the .NET Core SDK (version 2.1.0) instead of the runtime to run the apps. This is done to be able to use the [runtime store](https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-store) feature of the runtime, in which the system assemblies are stored in the deployment target (the app's Docker image) and therefore the app's publish directory doesn't need to include themn. These assemblies are only included with the .NET Core SDK.
3 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.2/README.md:
--------------------------------------------------------------------------------
1 | # .NET Core 2.2 Runtime
2 | This directory contains the .NET Core 2.2 runtime. This runtime is a bit different than the other runtime in that it uses the .NET Core SDK (version 2.2.0) instead of the runtime to run the apps. This is done to be able to use the [runtime store](https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-store) feature of the runtime, in which the system assemblies are stored in the deployment target (the app's Docker image) and therefore the app's publish directory doesn't need to include themn. These assemblies are only included with the .NET Core SDK.
3 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.1/README.md:
--------------------------------------------------------------------------------
1 | # .NET Core 3.1 Runtime
2 | This directory contains the .NET Core 3.1 runtime. This runtime is a bit different than the other runtime in that it uses the .NET Core SDK (version 3.1.0) instead of the runtime to run the apps. This is done to be able to use the [runtime store](https://docs.microsoft.com/en-us/dotnet/core/deploying/runtime-store) feature of the runtime, in which the system assemblies are stored in the deployment target (the app's Docker image) and therefore the app's publish directory doesn't need to include themn. These assemblies are only included with the .NET Core SDK.
3 |
--------------------------------------------------------------------------------
/aspnetcore.yaml:
--------------------------------------------------------------------------------
1 | steps:
2 | - name: 'gcr.io/gcp-runtimes/aspnetcorebuild:latest'
3 | args:
4 | - '--version-map'
5 | - '1.0.16=gcr.io/google-appengine/aspnetcore:1.0.16'
6 | - '1.1.13=gcr.io/google-appengine/aspnetcore:1.1.13'
7 | - '2.0.9=gcr.io/google-appengine/aspnetcore:2.0.9'
8 | - '2.1.22=gcr.io/google-appengine/aspnetcore:2.1.22'
9 | - '2.2.8=gcr.io/google-appengine/aspnetcore:2.2.8'
10 | - '3.0.3=gcr.io/google-appengine/aspnetcore:3.0.3'
11 | - '3.1.9=gcr.io/google-appengine/aspnetcore:3.1.9'
12 | - name: 'gcr.io/kaniko-project/executor:v0.4.0'
13 | args: ['--destination=$_OUTPUT_IMAGE']
14 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Microsoft.AspNetCore.Builder;
7 | using Microsoft.AspNetCore.Hosting;
8 |
9 | namespace Test_1_0
10 | {
11 | public class Program
12 | {
13 | public static void Main(string[] args)
14 | {
15 | var host = new WebHostBuilder()
16 | .UseKestrel()
17 | .UseContentRoot(Directory.GetCurrentDirectory())
18 | .UseIISIntegration()
19 | .UseStartup()
20 | .Build();
21 |
22 | host.Run();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Microsoft.AspNetCore.Builder;
7 | using Microsoft.AspNetCore.Hosting;
8 |
9 | namespace test_1_1
10 | {
11 | public class Program
12 | {
13 | public static void Main(string[] args)
14 | {
15 | var host = new WebHostBuilder()
16 | .UseKestrel()
17 | .UseContentRoot(Directory.GetCurrentDirectory())
18 | .UseIISIntegration()
19 | .UseStartup()
20 | .Build();
21 |
22 | host.Run();
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.1/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Microsoft.AspNetCore;
7 | using Microsoft.AspNetCore.Hosting;
8 | using Microsoft.Extensions.Configuration;
9 | using Microsoft.Extensions.Logging;
10 |
11 | namespace Test_2_1
12 | {
13 | public class Program
14 | {
15 | public static void Main(string[] args)
16 | {
17 | BuildWebHost(args).Run();
18 | }
19 |
20 | public static IWebHost BuildWebHost(string[] args) =>
21 | WebHost.CreateDefaultBuilder(args)
22 | .UseStartup()
23 | .Build();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.2/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Microsoft.AspNetCore;
7 | using Microsoft.AspNetCore.Hosting;
8 | using Microsoft.Extensions.Configuration;
9 | using Microsoft.Extensions.Logging;
10 |
11 | namespace Test_2_2
12 | {
13 | public class Program
14 | {
15 | public static void Main(string[] args)
16 | {
17 | BuildWebHost(args).Run();
18 | }
19 |
20 | public static IWebHost BuildWebHost(string[] args) =>
21 | WebHost.CreateDefaultBuilder(args)
22 | .UseStartup()
23 | .Build();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.0/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Microsoft.AspNetCore;
7 | using Microsoft.AspNetCore.Hosting;
8 | using Microsoft.Extensions.Configuration;
9 | using Microsoft.Extensions.Logging;
10 |
11 | namespace Test_2_0
12 | {
13 | public class Program
14 | {
15 | public static void Main(string[] args)
16 | {
17 | BuildWebHost(args).Run();
18 | }
19 |
20 | public static IWebHost BuildWebHost(string[] args) =>
21 | WebHost.CreateDefaultBuilder(args)
22 | .UseStartup()
23 | .Build();
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/Controllers/TestsController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Mvc;
6 |
7 | namespace Test_1_0.Controllers
8 | {
9 | ///
10 | /// This controller implements all of the tests for this app.
11 | ///
12 | [Route("/")]
13 | public class TestsController : Controller
14 | {
15 | ///
16 | /// Basic serving test, verifies that the app is running by returning a well known
17 | /// string.
18 | ///
19 | [HttpGet]
20 | public string ServingTest()
21 | {
22 | return "Hello World!";
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/Controllers/TestsController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Mvc;
6 |
7 | namespace Test_1_1.Controllers
8 | {
9 | ///
10 | /// This controller implements all of the tests for this app.
11 | ///
12 | [Route("/")]
13 | public class TestsController : Controller
14 | {
15 | ///
16 | /// Basic serving test, verifies that the app is running by returning a well known
17 | /// string.
18 | ///
19 | [HttpGet]
20 | public string ServingTest()
21 | {
22 | return "Hello World!";
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.0/Controllers/TestsController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Mvc;
6 |
7 | namespace Test_2_0.Controllers
8 | {
9 | ///
10 | /// This controller implements all of the tests for this app.
11 | ///
12 | [Route("/")]
13 | public class TestsController : Controller
14 | {
15 | ///
16 | /// Basic serving test, verifies that the app is running by returning a well known
17 | /// string.
18 | ///
19 | [HttpGet]
20 | public string ServingTest()
21 | {
22 | return "Hello World!";
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.1/Controllers/TestsController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Mvc;
6 |
7 | namespace Test_2_1.Controllers
8 | {
9 | ///
10 | /// This controller implements all of the tests for this app.
11 | ///
12 | [Route("/")]
13 | public class TestsController : Controller
14 | {
15 | ///
16 | /// Basic serving test, verifies that the app is running by returning a well known
17 | /// string.
18 | ///
19 | [HttpGet]
20 | public string ServingTest()
21 | {
22 | return "Hello World!";
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.2/Controllers/TestsController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Mvc;
6 |
7 | namespace Test_2_2.Controllers
8 | {
9 | ///
10 | /// This controller implements all of the tests for this app.
11 | ///
12 | [Route("/")]
13 | public class TestsController : Controller
14 | {
15 | ///
16 | /// Basic serving test, verifies that the app is running by returning a well known
17 | /// string.
18 | ///
19 | [HttpGet]
20 | public string ServingTest()
21 | {
22 | return "Hello World!";
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/tools/common.inc:
--------------------------------------------------------------------------------
1 | # Common functionality for the scripts.
2 |
3 | # Determines the Docker namespace to use given the parameter using the
4 | # current GCP project selected for gcloud. If a value is provided in
5 | # the parameter then that value will be used as the namespace.
6 | # $1, the namespace to use (optional).
7 | function get_docker_namespace() {
8 | if [ -z "${1:-}" ]; then
9 | local -r project_id=$(get_current_project)
10 | local -r repo="gcr.io/${project_id}"
11 | echo "Warning: Using repo ${repo} from ambient project." 1>&2
12 | else
13 | local -r repo=$1
14 | fi
15 | echo "${repo}"
16 | }
17 |
18 | # Returns the currently selected project in gcloud.
19 | function get_current_project() {
20 | gcloud config list --format="value(core.project)"
21 | }
22 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.1/test-2.1.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.2/test-2.2.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.2
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.0/test-2.0.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/test-1.0.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp1.0
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/tools/ci-scripts/deploy_check.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -ex
4 |
5 | source $KOKORO_GFILE_DIR/common.sh
6 |
7 | sudo /usr/local/bin/pip install --upgrade -r $KOKORO_GFILE_DIR/integration_tests/requirements.txt
8 |
9 | export DEPLOY_LATENCY_PROJECT='cloud-deploy-latency'
10 |
11 | # Test and deploy the test-1.0 app.
12 | python $KOKORO_GFILE_DIR/integration_tests/deploy_check.py -d ${INTEGRATION_TEST_APPS}/test-1.0 -l ${LANGUAGE} --skip-xrt
13 |
14 | # Test and deploy the test-1.1 app.
15 | python $KOKORO_GFILE_DIR/integration_tests/deploy_check.py -d ${INTEGRATION_TEST_APPS}/test-1.1 -l ${LANGUAGE} --skip-xrt
16 |
17 | # Test and deploy the test-2.0 app.
18 | python $KOKORO_GFILE_DIR/integration_tests/deploy_check.py -d ${INTEGRATION_TEST_APPS}/test-2.0 -l ${LANGUAGE} --skip-xrt
19 |
20 | # Test and deploy the test-2.1 app.
21 | python $KOKORO_GFILE_DIR/integration_tests/deploy_check.py -d ${INTEGRATION_TEST_APPS}/test-2.1 -l ${LANGUAGE} --skip-xrt
22 |
23 | # Test and deploy the test-2.2 app.
24 | python $KOKORO_GFILE_DIR/integration_tests/deploy_check.py -d ${INTEGRATION_TEST_APPS}/test-2.2 -l ${LANGUAGE} --skip-xrt
25 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/test-1.1.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp1.1
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/integration_tests/apps/README.md:
--------------------------------------------------------------------------------
1 | # Integration tests.
2 | This directory contains the apps to be used as integration tests for the runtime images. These apps conform to the integration test protocol defined in the [runtime-common integration tests](https://github.com/GoogleCloudPlatform/runtimes-common/blob/master/integration_tests/README.md).
3 |
4 | Each app contains:
5 | * The application source code, the `Controllers` directory contains a `TestController` class that defines all of the test logic.
6 | * The file `run_tests.yaml`, which is a cloud build file that defines how to run the tests for this particular app. This file is only used when running the tests locally.
7 | * The files `runtimes.yaml` and `test.yaml.in` which define the runtime builder metadata used to select the right builder image to use for the tests.
8 | * The `app.yaml` file, which defines how to deploy the test app to Google App Engine Flexible environment. This is the minimal `app.yaml`, only defining that the apps use the `aspnetcore` runtime.
9 |
10 | The script [`test.sh`](../../tools/test.sh) expects these files to be present in order to run the tests locally. When adding a new app for a new major version of the .NET Core runtime make sure to follow the same structure so you can run the tests locally.
11 |
--------------------------------------------------------------------------------
/tools/build_all.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 |
3 | # Copyright 2017 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This script will build all of the images in the repo.
18 | # $1, the Docker repository to use to build the images.
19 |
20 | # Exit on error or undefined variable
21 | set -eu
22 |
23 | readonly workspace=$(dirname $0)/..
24 | source ${workspace}/tools/common.inc
25 | readonly tools=${workspace}/tools
26 |
27 | readonly repo=$(get_docker_namespace "${1:-}")
28 |
29 | # Create a tag for all of the images.
30 | export readonly TAG=$(date +"%Y-%m-%d_%H_%M")
31 |
32 | # Build and tag all of the versions.
33 | ${tools}/build_runtimes.sh ${repo}
34 |
35 | # Build and tag the builder.
36 | ${tools}/build_builder.sh ${repo}
37 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.1/Startup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Builder;
6 | using Microsoft.AspNetCore.Hosting;
7 | using Microsoft.Extensions.Configuration;
8 | using Microsoft.Extensions.DependencyInjection;
9 | using Microsoft.Extensions.Logging;
10 | using Microsoft.Extensions.Options;
11 |
12 | namespace Test_2_1
13 | {
14 | public class Startup
15 | {
16 | public Startup(IConfiguration configuration)
17 | {
18 | Configuration = configuration;
19 | }
20 |
21 | public IConfiguration Configuration { get; }
22 |
23 | // This method gets called by the runtime. Use this method to add services to the container.
24 | public void ConfigureServices(IServiceCollection services)
25 | {
26 | services.AddMvc();
27 | }
28 |
29 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
30 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
31 | {
32 | if (env.IsDevelopment())
33 | {
34 | app.UseDeveloperExceptionPage();
35 | }
36 |
37 | app.UseMvc();
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.2/Startup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Builder;
6 | using Microsoft.AspNetCore.Hosting;
7 | using Microsoft.Extensions.Configuration;
8 | using Microsoft.Extensions.DependencyInjection;
9 | using Microsoft.Extensions.Logging;
10 | using Microsoft.Extensions.Options;
11 |
12 | namespace Test_2_2
13 | {
14 | public class Startup
15 | {
16 | public Startup(IConfiguration configuration)
17 | {
18 | Configuration = configuration;
19 | }
20 |
21 | public IConfiguration Configuration { get; }
22 |
23 | // This method gets called by the runtime. Use this method to add services to the container.
24 | public void ConfigureServices(IServiceCollection services)
25 | {
26 | services.AddMvc();
27 | }
28 |
29 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
30 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
31 | {
32 | if (env.IsDevelopment())
33 | {
34 | app.UseDeveloperExceptionPage();
35 | }
36 |
37 | app.UseMvc();
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/tools/test_all.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 |
3 | # Copyright 2017 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This script run all of the integration tests in the repo.
18 | # $1, the Docker repository to use to build the images.
19 |
20 | # Exit on error or undefined variable
21 | set -eu
22 |
23 | readonly workspace=$(dirname $0)/..
24 | source ${workspace}/tools/common.inc
25 | readonly tools=${workspace}/tools
26 |
27 | readonly repo=$(get_docker_namespace "${1:-}")
28 |
29 | # Run the integration tests.
30 | export readonly BUILDER_OVERRIDE=${repo}/aspnetcorebuild:latest
31 |
32 | for ver in $(find ${workspace}/integration_tests/published -type d -maxdepth 1 -name 'test-*'); do
33 | echo "Testing ${ver}"
34 | ${tools}/test.sh ${ver}
35 | done
36 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-2.0/Startup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Builder;
6 | using Microsoft.AspNetCore.Hosting;
7 | using Microsoft.Extensions.Configuration;
8 | using Microsoft.Extensions.DependencyInjection;
9 | using Microsoft.Extensions.Logging;
10 | using Microsoft.Extensions.Options;
11 |
12 | namespace Test_2_0
13 | {
14 | public class Startup
15 | {
16 | public Startup(IConfiguration configuration)
17 | {
18 | Configuration = configuration;
19 | }
20 |
21 | public IConfiguration Configuration { get; }
22 |
23 | // This method gets called by the runtime. Use this method to add services to the container.
24 | public void ConfigureServices(IServiceCollection services)
25 | {
26 | services.AddMvc();
27 | }
28 |
29 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
30 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
31 | {
32 | if (env.IsDevelopment())
33 | {
34 | app.UseDeveloperExceptionPage();
35 | }
36 |
37 | app.UseMvc();
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/runtimes/dockerfile_generator/generator.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 |
3 | # Copyright 2017 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This script will generate a simple Dockerfile in the given target
18 | # directory.
19 | # $1, the path to the directory where to generate the Dockerfile
20 | # $2, the base image for the Dockerfile.
21 |
22 | # Exit on error or undefined variable
23 | set -eu
24 |
25 | if [ -z "${1:-}" ]; then
26 | echo "Must specify the directory where to generate the Dockerfile."
27 | exit 1
28 | fi
29 |
30 | if [ -z "${2:-}" ]; then
31 | echo "Must specify the base image."
32 | exit 1
33 | fi
34 |
35 | readonly output=$1/Dockerfile
36 | readonly app_name=$(basename $1)
37 |
38 | # Generate the dockerfile.
39 | echo "FROM $2" > ${output}
40 | echo "ADD ./ /app" >> ${output}
41 | echo "ENTRYPOINT [ \"dotnet\", \"/app/${app_name}.dll\" ]" >> ${output}
42 |
43 | exit 0
44 |
--------------------------------------------------------------------------------
/tools/build_builder.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 |
3 | # Copyright 2017 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This script will build the builder image.
18 | # $1, the Docker repository to use, defaults to gcr.io/$PROJECT_ID
19 |
20 | # Exit on error or undefined variable
21 | set -eu
22 |
23 | readonly workspace=$(dirname $0)/..
24 | source ${workspace}/tools/common.inc
25 | readonly tools=${workspace}/tools
26 |
27 | readonly repo=$(get_docker_namespace "${1:-}")
28 |
29 | # Set the TAG environment to the current timestamp, it will be used to create
30 | # the image names.
31 | if [ -z "${TAG:-}" ]; then
32 | export readonly TAG=$(date +"%Y-%m-%d_%H_%M")
33 | fi
34 |
35 | # Build and tag the builder.
36 | ${tools}/submit_build.sh ${workspace}/builder/cloudbuild.yaml ${repo}
37 |
38 | readonly builder_datestamp_image=${repo}/aspnetcorebuild:${TAG}
39 | readonly builder_versioned_image=${repo}/aspnetcorebuild:latest
40 |
41 | gcloud container images add-tag ${builder_datestamp_image} ${builder_versioned_image} --quiet
42 |
--------------------------------------------------------------------------------
/tools/submit_build.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 |
3 | # Copyright 2017 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This script will build the specified build.
18 | # $1, the path to the cloudbuild.yaml to run.
19 | # $2, repository for the resulting image.
20 |
21 | # Exit on error or undefined variable
22 | set -eu
23 |
24 | if [ -z "${1:-}" ]; then
25 | echo "Must specify the cloudbuild.yaml to run."
26 | exit 1
27 | fi
28 |
29 | readonly workspace=$(dirname $0)/..
30 | source ${workspace}/tools/common.inc
31 |
32 | readonly repo=$(get_docker_namespace "${2:-}")
33 |
34 | # The TAG environment variable can be used to override the time based TAG
35 | # generated by this script. If the TAG variable is used then it will become the
36 | # unique tag for the image.
37 | if [ -z "${TAG:-}" ]; then
38 | readonly TAG=$(date +"%Y-%m-%d_%H_%M")
39 | fi
40 |
41 | # Start the build.
42 | readonly build_dir=$(dirname $1)
43 | gcloud builds submit "${build_dir}" \
44 | --config="$1" \
45 | --substitutions _DOCKER_NAMESPACE=${repo},_TAG=${TAG}
46 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/Startup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Builder;
6 | using Microsoft.AspNetCore.Hosting;
7 | using Microsoft.Extensions.Configuration;
8 | using Microsoft.Extensions.DependencyInjection;
9 | using Microsoft.Extensions.Logging;
10 |
11 | namespace Test_1_0
12 | {
13 | public class Startup
14 | {
15 | public Startup(IHostingEnvironment env)
16 | {
17 | var builder = new ConfigurationBuilder()
18 | .SetBasePath(env.ContentRootPath)
19 | .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
20 | .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
21 | .AddEnvironmentVariables();
22 | Configuration = builder.Build();
23 | }
24 |
25 | public IConfigurationRoot Configuration { get; }
26 |
27 | // This method gets called by the runtime. Use this method to add services to the container.
28 | public void ConfigureServices(IServiceCollection services)
29 | {
30 | // Add framework services.
31 | services.AddMvc();
32 | }
33 |
34 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
35 | public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
36 | {
37 | loggerFactory.AddConsole(Configuration.GetSection("Logging"));
38 | loggerFactory.AddDebug();
39 |
40 | app.UseMvc();
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/Startup.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Builder;
6 | using Microsoft.AspNetCore.Hosting;
7 | using Microsoft.Extensions.Configuration;
8 | using Microsoft.Extensions.DependencyInjection;
9 | using Microsoft.Extensions.Logging;
10 |
11 | namespace test_1_1
12 | {
13 | public class Startup
14 | {
15 | public Startup(IHostingEnvironment env)
16 | {
17 | var builder = new ConfigurationBuilder()
18 | .SetBasePath(env.ContentRootPath)
19 | .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true)
20 | .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true)
21 | .AddEnvironmentVariables();
22 | Configuration = builder.Build();
23 | }
24 |
25 | public IConfigurationRoot Configuration { get; }
26 |
27 | // This method gets called by the runtime. Use this method to add services to the container.
28 | public void ConfigureServices(IServiceCollection services)
29 | {
30 | // Add framework services.
31 | services.AddMvc();
32 | }
33 |
34 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
35 | public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
36 | {
37 | loggerFactory.AddConsole(Configuration.GetSection("Logging"));
38 | loggerFactory.AddDebug();
39 |
40 | app.UseMvc();
41 | }
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.0/image/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2018 Google Inc. All rights reserved.
2 |
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 |
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM gcr.io/gcp-runtimes/ubuntu_16_0_4
16 |
17 | # Install .NET Core dependencies and timezone data
18 | RUN apt-get update \
19 | && apt-get install -y --no-install-recommends \
20 | libc6 \
21 | libcurl3 \
22 | libgcc1 \
23 | libicu55 \
24 | liblttng-ust0 \
25 | libssl1.0.0 \
26 | libstdc++6 \
27 | libtinfo5 \
28 | libunwind8 \
29 | libuuid1 \
30 | zlib1g \
31 | ca-certificates \
32 | curl \
33 | tzdata \
34 | && apt-get upgrade -y \
35 | && apt-get clean
36 |
37 | # Install the package.
38 | RUN mkdir -p /usr/share/dotnet && \
39 | curl -sL https://storage.googleapis.com/gcp-aspnetcore-packages/dotnet-sdk-2.1.504-linux-x64.tar.gz | tar -xz -C /usr/share/dotnet/ && \
40 | ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
41 |
42 | # Define the environment variables
43 | ENV PORT=8080
44 | ENV ASPNETCORE_URLS=http://*:${PORT}
45 |
46 | # Expose the port for the app.
47 | EXPOSE $PORT
48 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.1/image/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2018 Google Inc. All rights reserved.
2 |
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 |
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM gcr.io/gcp-runtimes/ubuntu_16_0_4
16 |
17 | # Install .NET Core dependencies and timezone data
18 | RUN apt-get update \
19 | && apt-get install -y --no-install-recommends \
20 | libc6 \
21 | libcurl3 \
22 | libgcc1 \
23 | libicu55 \
24 | liblttng-ust0 \
25 | libssl1.0.0 \
26 | libstdc++6 \
27 | libtinfo5 \
28 | libunwind8 \
29 | libuuid1 \
30 | zlib1g \
31 | ca-certificates \
32 | curl \
33 | tzdata \
34 | && apt-get upgrade -y \
35 | && apt-get clean
36 |
37 | # Install the package.
38 | RUN mkdir -p /usr/share/dotnet && \
39 | curl -sL https://storage.googleapis.com/gcp-aspnetcore-packages/dotnet-sdk-2.1.518-linux-x64.tar.gz | tar -xz -C /usr/share/dotnet/ && \
40 | ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
41 |
42 | # Define the environment variables
43 | ENV PORT=8080
44 | ENV ASPNETCORE_URLS=http://*:${PORT}
45 |
46 | # Expose the port for the app.
47 | EXPOSE $PORT
48 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-2.2/image/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2018 Google Inc. All rights reserved.
2 |
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 |
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM gcr.io/gcp-runtimes/ubuntu_16_0_4
16 |
17 | # Install .NET Core dependencies and timezone data
18 | RUN apt-get update \
19 | && apt-get install -y --no-install-recommends \
20 | libc6 \
21 | libcurl3 \
22 | libgcc1 \
23 | libicu55 \
24 | liblttng-ust0 \
25 | libssl1.0.0 \
26 | libstdc++6 \
27 | libtinfo5 \
28 | libunwind8 \
29 | libuuid1 \
30 | zlib1g \
31 | ca-certificates \
32 | curl \
33 | tzdata \
34 | && apt-get upgrade -y \
35 | && apt-get clean
36 |
37 | # Install the package.
38 | RUN mkdir -p /usr/share/dotnet && \
39 | curl -sL https://storage.googleapis.com/gcp-aspnetcore-packages/dotnet-sdk-2.2.110-linux-x64.tar.gz | tar -xz -C /usr/share/dotnet/ && \
40 | ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
41 |
42 | # Define the environment variables
43 | ENV PORT=8080
44 | ENV ASPNETCORE_URLS=http://*:${PORT}
45 |
46 | # Expose the port for the app.
47 | EXPOSE $PORT
48 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.0/image/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2018 Google Inc. All rights reserved.
2 |
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 |
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM gcr.io/gcp-runtimes/ubuntu_16_0_4
16 |
17 | # Install .NET Core dependencies and timezone data
18 | RUN apt-get update \
19 | && apt-get install -y --no-install-recommends \
20 | libc6 \
21 | libcurl3 \
22 | libgcc1 \
23 | libicu55 \
24 | liblttng-ust0 \
25 | libssl1.0.0 \
26 | libstdc++6 \
27 | libtinfo5 \
28 | libunwind8 \
29 | libuuid1 \
30 | zlib1g \
31 | ca-certificates \
32 | curl \
33 | tzdata \
34 | && apt-get upgrade -y \
35 | && apt-get clean
36 |
37 | # Install the package.
38 | RUN mkdir -p /usr/share/dotnet && \
39 | curl -sL https://storage.googleapis.com/gcp-aspnetcore-packages/dotnet-sdk-3.0.103-linux-x64.tar.gz | tar -xz -C /usr/share/dotnet/ && \
40 | ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
41 |
42 | # Define the environment variables
43 | ENV PORT=8080
44 | ENV ASPNETCORE_URLS=http://*:${PORT}
45 |
46 | # Expose the port for the app.
47 | EXPOSE $PORT
48 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-3.1/image/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2018 Google Inc. All rights reserved.
2 |
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 |
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM gcr.io/gcp-runtimes/ubuntu_16_0_4
16 |
17 | # Install .NET Core dependencies and timezone data
18 | RUN apt-get update \
19 | && apt-get install -y --no-install-recommends \
20 | libc6 \
21 | libcurl3 \
22 | libgcc1 \
23 | libicu55 \
24 | liblttng-ust0 \
25 | libssl1.0.0 \
26 | libstdc++6 \
27 | libtinfo5 \
28 | libunwind8 \
29 | libuuid1 \
30 | zlib1g \
31 | ca-certificates \
32 | curl \
33 | tzdata \
34 | && apt-get upgrade -y \
35 | && apt-get clean
36 |
37 | # Install the package.
38 | RUN mkdir -p /usr/share/dotnet && \
39 | curl -sL https://storage.googleapis.com/gcp-aspnetcore-packages/dotnet-sdk-3.1.109-linux-x64.tar.gz | tar -xz -C /usr/share/dotnet/ && \
40 | ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
41 |
42 | # Define the environment variables
43 | ENV PORT=8080
44 | ENV ASPNETCORE_URLS=http://*:${PORT}
45 |
46 | # Expose the port for the app.
47 | EXPOSE $PORT
48 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.0/image/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Google Inc. All rights reserved.
2 |
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 |
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM gcr.io/gcp-runtimes/ubuntu_16_0_4
16 |
17 | # Install .NET Core dependencies and timezone data
18 | RUN apt-get update \
19 | && apt-get install -y --no-install-recommends \
20 | libc6 \
21 | libcurl3 \
22 | libgcc1 \
23 | libicu55 \
24 | liblttng-ust0 \
25 | libssl1.0.0 \
26 | libstdc++6 \
27 | libtinfo5 \
28 | libunwind8 \
29 | libuuid1 \
30 | zlib1g \
31 | ca-certificates \
32 | curl \
33 | tzdata \
34 | && apt-get upgrade -y \
35 | && apt-get clean
36 |
37 | # Install the package.
38 | RUN mkdir -p /usr/share/dotnet && \
39 | curl -sL https://storage.googleapis.com/gcp-aspnetcore-packages/dotnet-dev-ubuntu.16.04-x64.1.1.14.tar.gz | tar -xz -C /usr/share/dotnet/ && \
40 | ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
41 |
42 | # Define the environment variables
43 | ENV PORT=8080
44 | ENV ASPNETCORE_URLS=http://*:${PORT}
45 |
46 | # Expose the port for the app.
47 | EXPOSE $PORT
48 |
--------------------------------------------------------------------------------
/runtimes/versions/aspnetcore-1.1/image/Dockerfile:
--------------------------------------------------------------------------------
1 | # Copyright 2017 Google Inc. All rights reserved.
2 |
3 | # Licensed under the Apache License, Version 2.0 (the "License");
4 | # you may not use this file except in compliance with the License.
5 | # You may obtain a copy of the License at
6 |
7 | # http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | # Unless required by applicable law or agreed to in writing, software
10 | # distributed under the License is distributed on an "AS IS" BASIS,
11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | # See the License for the specific language governing permissions and
13 | # limitations under the License.
14 |
15 | FROM gcr.io/gcp-runtimes/ubuntu_16_0_4
16 |
17 | # Install .NET Core dependencies and timezone data
18 | RUN apt-get update \
19 | && apt-get install -y --no-install-recommends \
20 | libc6 \
21 | libcurl3 \
22 | libgcc1 \
23 | libicu55 \
24 | liblttng-ust0 \
25 | libssl1.0.0 \
26 | libstdc++6 \
27 | libtinfo5 \
28 | libunwind8 \
29 | libuuid1 \
30 | zlib1g \
31 | ca-certificates \
32 | curl \
33 | tzdata \
34 | && apt-get upgrade -y \
35 | && apt-get clean
36 |
37 | # Install the package.
38 | RUN mkdir -p /usr/share/dotnet && \
39 | curl -sL https://storage.googleapis.com/gcp-aspnetcore-packages/dotnet-dev-ubuntu.16.04-x64.1.1.14.tar.gz | tar -xz -C /usr/share/dotnet/ && \
40 | ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet
41 |
42 | # Define the environment variables
43 | ENV PORT=8080
44 | ENV ASPNETCORE_URLS=http://*:${PORT}
45 |
46 | # Expose the port for the app.
47 | EXPOSE $PORT
48 |
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.0/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to find out which attributes exist for C# debugging
3 | // Use hover for the description of the existing attributes
4 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": ".NET Core Launch (web)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | // If you have changed target frameworks, make sure to update the program path.
13 | "program": "${workspaceRoot}/bin/Debug/netcoreapp1.0/test-1.0.dll",
14 | "args": [],
15 | "cwd": "${workspaceRoot}",
16 | "stopAtEntry": false,
17 | "internalConsoleOptions": "openOnSessionStart",
18 | "launchBrowser": {
19 | "enabled": true,
20 | "args": "${auto-detect-url}",
21 | "windows": {
22 | "command": "cmd.exe",
23 | "args": "/C start ${auto-detect-url}"
24 | },
25 | "osx": {
26 | "command": "open"
27 | },
28 | "linux": {
29 | "command": "xdg-open"
30 | }
31 | },
32 | "env": {
33 | "ASPNETCORE_ENVIRONMENT": "Development"
34 | },
35 | "sourceFileMap": {
36 | "/Views": "${workspaceRoot}/Views"
37 | }
38 | },
39 | {
40 | "name": ".NET Core Attach",
41 | "type": "coreclr",
42 | "request": "attach",
43 | "processId": "${command:pickProcess}"
44 | }
45 | ]
46 | }
--------------------------------------------------------------------------------
/integration_tests/apps/test-1.1/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | // Use IntelliSense to find out which attributes exist for C# debugging
3 | // Use hover for the description of the existing attributes
4 | // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
5 | "version": "0.2.0",
6 | "configurations": [
7 | {
8 | "name": ".NET Core Launch (web)",
9 | "type": "coreclr",
10 | "request": "launch",
11 | "preLaunchTask": "build",
12 | // If you have changed target frameworks, make sure to update the program path.
13 | "program": "${workspaceRoot}/bin/Debug/netcoreapp1.1/test-1.1.dll",
14 | "args": [],
15 | "cwd": "${workspaceRoot}",
16 | "stopAtEntry": false,
17 | "internalConsoleOptions": "openOnSessionStart",
18 | "launchBrowser": {
19 | "enabled": true,
20 | "args": "${auto-detect-url}",
21 | "windows": {
22 | "command": "cmd.exe",
23 | "args": "/C start ${auto-detect-url}"
24 | },
25 | "osx": {
26 | "command": "open"
27 | },
28 | "linux": {
29 | "command": "xdg-open"
30 | }
31 | },
32 | "env": {
33 | "ASPNETCORE_ENVIRONMENT": "Development"
34 | },
35 | "sourceFileMap": {
36 | "/Views": "${workspaceRoot}/Views"
37 | }
38 | },
39 | {
40 | "name": ".NET Core Attach",
41 | "type": "coreclr",
42 | "request": "attach",
43 | "processId": "${command:pickProcess}"
44 | }
45 | ]
46 | }
--------------------------------------------------------------------------------
/tools/update_integration_tests.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 |
3 | # Copyright 2017 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This script will build all apps under the test/apps directory and update the
18 | # binaries in the bins directory. To succesfully run this script you need to
19 | # have installed the following .NET Core SDKs:
20 | # * 1.0.4, for 1.0, 1.1 .NET Core apps.
21 | # * 2.0.0, for .NET Core 2.0 apps.
22 |
23 | # Exit on error or undefined variable
24 | set -eu
25 |
26 | readonly workspace=$(dirname $0)/..
27 | readonly apps_dir=${workspace}/integration_tests/apps
28 | readonly published_dir=${workspace}/integration_tests/published
29 |
30 | # Returns the full path of the given relative path.
31 | function get_absolute_path() {
32 | echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
33 | }
34 |
35 | function publish_app() {
36 | local readonly app_name=$(basename $1)
37 | local readonly published=$(get_absolute_path ${published_dir}/${app_name})
38 | echo "Publishing ${app_name} to ${published}"
39 |
40 | # Actually restore and build the app.
41 | pushd $1
42 | dotnet restore
43 | dotnet publish -o ${published}
44 | popd
45 | }
46 |
47 | # Cleanup the existing files.
48 | rm -rf ${published_dir}/*
49 |
50 | # Now publish all of the apps.
51 | for app in $(find ${apps_dir} -maxdepth 1 -type d -name 'test-*'); do
52 | publish_app ${app}
53 | done
54 |
--------------------------------------------------------------------------------
/tools/update_runtimes_tests.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 |
3 | # Copyright 2017 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This script will build, publish and package each functional test app
18 | # for the .NET Core runtime major version.
19 |
20 | # Exit on error or undefined variable
21 | set -eu
22 |
23 | # Returns the full path of the given relative path.
24 | function get_absolute_path() {
25 | echo "$(cd "$(dirname "$1")" && pwd)/$(basename "$1")"
26 | }
27 |
28 | # Get the paths.
29 | readonly workspace=$(dirname $0)/..
30 | readonly runtime_versions=${workspace}/runtimes/versions
31 |
32 | # Publishes the given app.
33 | # $1, the path to the apps source.
34 | # $2, where to store published bits.
35 | function publish_app() {
36 | echo "Publishing $1 to $2"
37 | local readonly published=$(get_absolute_path $2)
38 |
39 | # Actually restore and build the app.
40 | pushd $1
41 | dotnet restore
42 | dotnet publish -o ${published}
43 | popd
44 | }
45 |
46 | # Now publish the test of all of the apps.
47 | for ver in $(find ${runtime_versions} -maxdepth 1 -type d -name 'aspnetcore-*'); do
48 | echo "Publishing test for runtime ${ver}"
49 | if [ -d ${ver}/functional_tests/app/ ]; then
50 | publish_app ${ver}/functional_tests/app/ ${ver}/functional_tests/published/
51 | else
52 | echo "The runtime ${ver} does not have tests."
53 | fi
54 | done
55 |
--------------------------------------------------------------------------------
/integration_tests/README.md:
--------------------------------------------------------------------------------
1 | # Integration tests for the runtimes.
2 | This directory contains the integration test apps used to test the end-to-end functionality of the runtime images. You can use the [`test.sh`](../tools/test.sh) script to run the tests from your machine. The test will include deploying the app to Google App Engine Flexible and using the [integration tests framework](https://github.com/GoogleCloudPlatform/runtimes-common/tree/master/integration_tests) to verify that the app is functional. This means that you need to run with [gcloud](https://cloud.google.com/sdk/gcloud/) configured correctly and with a project to which you can deploy Google App Engine Flexible environment apps.
3 |
4 | The tests are run from the [`published`](./published) directory, where the .NET Core apps are published to by the [`update_integration_tests.sh`](../tools/update_integration_tests.sh) script. The source of the apps is stored in the [`apps`](./apps) directory. To update the tests then it is highly recommended that the [`update_integration_tests.sh`](../tools/update_integration_tests.sh) script is used, as it will take care of building and publishing to the right directory.
5 |
6 | You can update the integration tests, which will rebuild the apps, using the following command line from the root of the repo:
7 | ```bash
8 | ./tools/update_integration_tests.sh
9 | ```
10 |
11 | The test apps currently only implement the [Serving](https://github.com/GoogleCloudPlatform/runtimes-common/tree/master/integration_tests#serving-root) protocol to verify that the app is correctly deployed and serving traffic. More tests will be added soon.
12 |
13 | The test runner will use by default the [`run_tests.yaml`](./run_tests.yaml) build script to run the tests, this can be overriden by having a `run_tests.yaml` inside of the test app, which is useful in case different apps support different protocols from the [integration tests framework](https://github.com/GoogleCloudPlatform/runtimes-common/tree/master/integration_tests).
14 |
--------------------------------------------------------------------------------
/tools/README.md:
--------------------------------------------------------------------------------
1 | # Tools for the repo.
2 | This directory contains tools to be used throught the repo. These tools expect to be invoked within the repo directory.
3 |
4 | ## The submit_build.sh script
5 | The [`submit_build.sh`](./submit_build.sh) script is a helper script to submit builds to Google Cloud Build that require the `_DOCKER_NAMESPACE` and `_TAG` substitutions. The script will determine the default Docker namespace by using the ambient project and a default tag based on the current time.
6 |
7 | ## The test.sh script
8 | The [`test.sh`](./test.sh) script is a helper script to run integration tests on a particular app. This script determines what GCP project you are running under, creating the right file structure for the runtime builders metadata (the `runtimes.yaml`) and setting up the right environment to deploy and test the integration test application.
9 |
10 | This script does not perform cleanup, the idea being that you might want to need to debug tests, re-run the tests manually after you are done, etc... To clean up you can just use `gcloud` to delete the versions created by this script. The versions are named after the directory name.
11 |
12 | ## The build_all.sh script.
13 | The [`build_all.sh`](./build_all.sh) script is a helper script to build all runtime images and the builder image in a single command. It will use the currently selected GCP project as the Docker repository by default but you can override the repo by specifying it as the parameter of the script.
14 |
15 | ## The test_all.sh script.
16 | The [`test_all.sh`](./test_all.sh) script is a helper script to run all of the integration tests in a single command.
17 |
18 | ## The build_runtimes.sh script.
19 | The [`build_runtimes.sh`](./build_runtimes.sh) script is a helper script to build all runtimes stored in the repo from a single command. It will also tag them if possible with the version numbers.
20 |
21 | ## The build_builder.sh script.
22 | The [`build_builder.sh`](./build_builder.sh) script is a helper script to build the builder image. This script will also tag the builder as `latest` after it is done.
23 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Contributor Code of Conduct
2 |
3 | As contributors and maintainers of this project,
4 | and in the interest of fostering an open and welcoming community,
5 | we pledge to respect all people who contribute through reporting issues,
6 | posting feature requests, updating documentation,
7 | submitting pull requests or patches, and other activities.
8 |
9 | We are committed to making participation in this project
10 | a harassment-free experience for everyone,
11 | regardless of level of experience, gender, gender identity and expression,
12 | sexual orientation, disability, personal appearance,
13 | body size, race, ethnicity, age, religion, or nationality.
14 |
15 | Examples of unacceptable behavior by participants include:
16 |
17 | * The use of sexualized language or imagery
18 | * Personal attacks
19 | * Trolling or insulting/derogatory comments
20 | * Public or private harassment
21 | * Publishing other's private information,
22 | such as physical or electronic
23 | addresses, without explicit permission
24 | * Other unethical or unprofessional conduct.
25 |
26 | Project maintainers have the right and responsibility to remove, edit, or reject
27 | comments, commits, code, wiki edits, issues, and other contributions
28 | that are not aligned to this Code of Conduct.
29 | By adopting this Code of Conduct,
30 | project maintainers commit themselves to fairly and consistently
31 | applying these principles to every aspect of managing this project.
32 | Project maintainers who do not follow or enforce the Code of Conduct
33 | may be permanently removed from the project team.
34 |
35 | This code of conduct applies both within project spaces and in public spaces
36 | when an individual is representing the project or its community.
37 |
38 | Instances of abusive, harassing, or otherwise unacceptable behavior
39 | may be reported by opening an issue
40 | or contacting one or more of the project maintainers.
41 |
42 | This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0,
43 | available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Want to contribute? Great! Please read this page so your submission can go through smoothly.
4 |
5 | ## Contributor License Agreement
6 |
7 | Before we can use your code, you must sign the [Google Individual Contributor License Agreement]
8 | (https://cla.developers.google.com/about/google-individual)
9 | (CLA), which you can do online. The CLA is necessary mainly because you own the
10 | copyright to your changes, even after your contribution becomes part of our
11 | codebase, so we need your permission to use and distribute your code. We also
12 | need to be sure of various other things — for instance that you'll tell us if you
13 | know that your code infringes on other people's patents.
14 |
15 | Contributions made by corporations are covered by a different agreement than
16 | the one above. If you work for a company that wants to allow you to contribute your work, then
17 | you'll need to sign a [Software Grant and Corporate Contributor License Agreement]
18 | (https://cla.developers.google.com/about/google-corporate).
19 |
20 | You don't have to sign the CLA until after you've submitted your code for review and
21 | a member has approved it, but you must do it before we can put your code into the
22 | repository. Before you start working on a larger contribution, you should get in touch
23 | with us first through the issue tracker with your idea so that we can help out and
24 | possibly guide you. Coordinating up front makes it much easier to avoid
25 | frustration later on.
26 |
27 | ## Developer Workflow
28 |
29 | If you would like to add a new feature or change, first create a new Issue. There we will
30 | triage the idea and discuss any design or implementation details.
31 |
32 | Contributors are expected to do their work in a local fork and submit code for consideration via a
33 | pull request.
34 |
35 | It is expected that pull requests meet the following:
36 |
37 | - Adds an appropriate amount of test coverage - See the `README.md` files in the various projects for detailed information on how to run tests locally.
38 | - And finally, that you have signed the CLA as mentioned above.
39 |
40 | When the pull request process deems the change ready, it will be merged directly into the tree.
41 | Congratulations and thank you!
42 |
--------------------------------------------------------------------------------
/tools/ci-scripts/integration-test.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 |
3 | # Custom integration tests script for the aspnetcore images. This script needs
4 | # to be custom because we have multiple versions of the .NET Core runtime
5 | # described in this directory and we need to run multiple integraiton tests.
6 |
7 | set -ex
8 |
9 | source $KOKORO_GFILE_DIR/common.sh
10 |
11 | export GOOGLE_CLOUD_PROJECT=gcp-runtimes
12 |
13 | sudo /usr/local/bin/pip install --upgrade -r requirements.txt
14 |
15 | flags=""
16 |
17 | if [ "${SKIP_STANDARD_LOGGING_TESTS}" = "true" ]; then
18 | flags="$flags --skip-standard-logging-tests"
19 | fi
20 |
21 | if [ "${SKIP_CUSTOM_LOGGING_TESTS}" = "true" ]; then
22 | flags="$flags --skip-custom-logging-tests"
23 | fi
24 |
25 | if [ "${SKIP_MONITORING_TESTS}" = "true" ]; then
26 | flags="$flags --skip-monitoring-tests"
27 | fi
28 |
29 | if [ "${SKIP_EXCEPTION_TESTS}" = "true" ]; then
30 | flags="$flags --skip-exception-tests"
31 | fi
32 |
33 | if [ "${SKIP_CUSTOM_TESTS}" = "true" ]; then
34 | flags="$flags --skip-custom-tests"
35 | fi
36 |
37 | # We're always going to use the builder.
38 | flags="$flags --builder ${BUILDER}"
39 | gcloud config set app/use_runtime_builders True
40 |
41 | # Test the major versions of .NET Core supported.
42 |
43 | # Test the .NET Core 1.0 image.
44 | app_dir=${INTEGRATION_TEST_APPS}/test-1.0
45 | gcloud config set app/runtime_builders_root file://${app_dir}
46 | $KOKORO_GFILE_DIR/integration_tests/testsuite/driver.py -d ${app_dir} ${flags} -y ${app_dir}/${APP_YAML_NAME}
47 |
48 | # Test the .NET Core 1.1 image.
49 | app_dir=${INTEGRATION_TEST_APPS}/test-1.1
50 | gcloud config set app/runtime_builders_root file://${app_dir}
51 | $KOKORO_GFILE_DIR/integration_tests/testsuite/driver.py -d ${app_dir} ${flags} -y ${app_dir}/${APP_YAML_NAME}
52 |
53 | # Test the .NET Core 2.0 image.
54 | app_dir=${INTEGRATION_TEST_APPS}/test-2.0
55 | gcloud config set app/runtime_builders_root file://${app_dir}
56 | $KOKORO_GFILE_DIR/integration_tests/testsuite/driver.py -d ${app_dir} ${flags} -y ${app_dir}/${APP_YAML_NAME}
57 |
58 | # Test the .NET Core 2.1 image.
59 | app_dir=${INTEGRATION_TEST_APPS}/test-2.1
60 | gcloud config set app/runtime_builders_root file://${app_dir}
61 | $KOKORO_GFILE_DIR/integration_tests/testsuite/driver.py -d ${app_dir} ${flags} -y ${app_dir}/${APP_YAML_NAME}
62 |
63 | # Test the .NET Core 2.2 image.
64 | app_dir=${INTEGRATION_TEST_APPS}/test-2.2
65 | gcloud config set app/runtime_builders_root file://${app_dir}
66 | $KOKORO_GFILE_DIR/integration_tests/testsuite/driver.py -d ${app_dir} ${flags} -y ${app_dir}/${APP_YAML_NAME}
67 |
--------------------------------------------------------------------------------
/runtimes/README.md:
--------------------------------------------------------------------------------
1 | # .NET Core runtime images
2 | This directory contains the build definition for all of the supported .NET Core runtimes. The main structure is:
3 | * The `cloudbuild.yaml` file contains the instructions to build and test all of the runtime images. This `cloudbuild.yaml` needs two substitutions to succeed, `_DOCKER_NAMESPACE` which is the name of the Docker repository where to store the image, and `_TAG` which is the tag to append to the image name to make it unique, typically this `_TAG` will be date based.
4 | * The `versions` directory contains the definition for each .NET Core version supported. In each version you will find:
5 | + The `image` directory, which contains the `Dockerfile` that defines the runtime image.
6 | + The `structural_tests` directory, which contains the file called `aspnet.yaml`, this file defines what structural tests to run as part of the build for that version. These tests typically check that the right dotnet binary is included in the image and the licenses for all packages used in building the image.
7 | + The `functional_tests` directory, which contains the functional tests (unit tests) for the runtime. These tests are implemented as a simple console app that prints "Hello World !" to stdout. The build script will check that the app succeeded to run (had an exit code of 0) and that is has the expected output.
8 | * The `dockerfile_generator` directory, which contains the a `Dockerfile` generator to build test app images during the build process to test the runtimes.
9 |
10 | ## Updating tests
11 | To update the tests, edit the source code in the `functional_tests/app` directory and then run the [`udpate_runtimes_tests.sh`](../tools/update_runtimes_tests.sh). The script will take care of building all of the apps and publishing them to the `functional_tests/published` directory for each supported runtime.
12 |
13 | To update the test you can use a command line like the following from the root of the repo:
14 | ```bash
15 | ./tools/update_runtimes_tests.sh
16 | ```
17 |
18 | ## Updating the runtimes.
19 | From time to time Microsoft will release new versions of the runtimes. To update the existing images just point the Dockerfile to the latest bits. We use a private GCP bucket to ensure that the bits remain stable.
20 |
21 | You might also need to update the `functional_tests` to be built with the latest .NET Core SDK that corresponds to the new .NET Core runtime being wrapped. This will ensure that the latest .NET Core SDK is correctly supported.
22 |
23 | ## Adding a new version of the runtime.
24 | As new major versions of the runtimes are released we will need to add new build steps to the [`cloudbuid.yaml`](./cloudbuild.yaml) to build it.
25 |
26 | Also following Microsoft's support policy we will be removing old versions of .NET Core that are no longer supported.
27 |
--------------------------------------------------------------------------------
/tools/build_runtimes.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 |
3 | # Copyright 2017 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This script will build the images for the given runtime and tag them using the
18 | # version numbers found in the ./versions directory.
19 | # $1, the Docker repository to use, defaults to gcr.io/$PROJECT_ID
20 |
21 | # Exit on error or undefined variable
22 | set -eu
23 |
24 | readonly workspace=$(dirname $0)/..
25 | source ${workspace}/tools/common.inc
26 |
27 | readonly repo=$(get_docker_namespace "${1:-}")
28 |
29 | # Set the TAG environment to the current timestamp, it will be used to create
30 | # the image names.
31 | if [ -z "${TAG:-}" ]; then
32 | export readonly TAG=$(date +"%Y-%m-%d_%H_%M")
33 | fi
34 |
35 | # build all of the images.
36 | ${workspace}/tools/submit_build.sh ${workspace}/runtimes/cloudbuild.yaml ${repo}
37 |
38 | # Tag major versions.
39 | gcloud container images add-tag ${repo}/aspnetcore:1.0-${TAG} ${repo}/aspnetcore:1.0 --quiet
40 | gcloud container images add-tag ${repo}/aspnetcore:1.1-${TAG} ${repo}/aspnetcore:1.1 --quiet
41 | gcloud container images add-tag ${repo}/aspnetcore:2.0-${TAG} ${repo}/aspnetcore:2.0 --quiet
42 | gcloud container images add-tag ${repo}/aspnetcore:2.1-${TAG} ${repo}/aspnetcore:2.1 --quiet
43 | gcloud container images add-tag ${repo}/aspnetcore:2.2-${TAG} ${repo}/aspnetcore:2.2 --quiet
44 | gcloud container images add-tag ${repo}/aspnetcore:3.0-${TAG} ${repo}/aspnetcore:3.0 --quiet
45 | gcloud container images add-tag ${repo}/aspnetcore:3.1-${TAG} ${repo}/aspnetcore:3.1 --quiet
46 |
47 | # Tag minor versions.
48 | gcloud container images add-tag ${repo}/aspnetcore:1.0-${TAG} ${repo}/aspnetcore:1.0.16 --quiet
49 | gcloud container images add-tag ${repo}/aspnetcore:1.1-${TAG} ${repo}/aspnetcore:1.1.13 --quiet
50 | gcloud container images add-tag ${repo}/aspnetcore:2.0-${TAG} ${repo}/aspnetcore:2.0.9 --quiet
51 | gcloud container images add-tag ${repo}/aspnetcore:2.1-${TAG} ${repo}/aspnetcore:2.1.22 --quiet
52 | gcloud container images add-tag ${repo}/aspnetcore:2.2-${TAG} ${repo}/aspnetcore:2.2.6 --quiet
53 | gcloud container images add-tag ${repo}/aspnetcore:3.0-${TAG} ${repo}/aspnetcore:3.0.3 --quiet
54 | gcloud container images add-tag ${repo}/aspnetcore:3.1-${TAG} ${repo}/aspnetcore:3.1.9 --quiet
55 |
--------------------------------------------------------------------------------
/tools/test.sh:
--------------------------------------------------------------------------------
1 | #! /usr/bin/env bash
2 |
3 | # Copyright 2017 Google Inc.
4 | #
5 | # Licensed under the Apache License, Version 2.0 (the "License");
6 | # you may not use this file except in compliance with the License.
7 | # You may obtain a copy of the License at
8 | #
9 | # http://www.apache.org/licenses/LICENSE-2.0
10 | #
11 | # Unless required by applicable law or agreed to in writing, software
12 | # distributed under the License is distributed on an "AS IS" BASIS,
13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | # See the License for the specific language governing permissions and
15 | # limitations under the License.
16 |
17 | # This script will run the integration tests for the given app.
18 | # $1, the path to the root of the app.
19 | # $2, the project to use.
20 |
21 | # Exit on error or undefined variable
22 | set -eu
23 |
24 | readonly workspace=$(dirname $0)/..
25 | source ${workspace}/tools/common.inc
26 |
27 | if [ -z "${1:-}" ]; then
28 | echo "Must specify the root of the app."
29 | exit 1
30 | fi
31 |
32 | # If no project is given get the ambient project.
33 | if [ -z "${2:-}" ]; then
34 | readonly project_id=$(get_current_project)
35 | echo "Warning: Using ambient project ${project_id}"
36 | else
37 | readonly project_id=$2
38 | fi
39 |
40 | # Where to store the modified app definitions.
41 | readonly temp_builders_root=$(mktemp -d -t test_run.XXXX)
42 |
43 | # Generate the builders root.
44 | cp $1/runtimes.yaml ${temp_builders_root}
45 | if [ -z "${BUILDER_OVERRIDE:-}" ]; then
46 | export readonly STAGING_BUILDER_IMAGE=gcr.io/aspnetcore-staging/aspnetcorebuild:${TAG:-latest}
47 | else
48 | export readonly STAGING_BUILDER_IMAGE=${BUILDER_OVERRIDE}
49 | fi
50 | echo "Using builder: ${STAGING_BUILDER_IMAGE}"
51 | envsubst '$STAGING_BUILDER_IMAGE' < $1/test.yaml.in > ${temp_builders_root}/test.yaml
52 |
53 | # Configure gcloud to use the specified runtime builders.
54 | export readonly CLOUDSDK_APP_USE_RUNTIME_BUILDERS=true
55 | export readonly CLOUDSDK_APP_RUNTIME_BUILDERS_ROOT=file://${temp_builders_root}
56 | export readonly CLOUDSDK_CORE_PROJECT=${project_id}
57 |
58 | readonly app_name=$(basename $1)
59 | readonly version_id=$(echo ${app_name} | tr "." "-")-$(date +"%Y%m%d%H%M")
60 |
61 | # Use the override build script if provided, otherwise use the common one.
62 | if [ -f $1/run_tests.yaml ]; then
63 | readonly run_script=$1/run_tests.yaml
64 | else
65 | readonly run_script=${workspace}/integration_tests/run_tests.yaml
66 | fi
67 |
68 | # Choose the right .yaml file depending on whether we're deploying against the
69 | # canary or not.
70 | if [[ "${USE_FLEX_CANARY:-}" == "1" ]]; then
71 | echo "Warning: Deploying using the canary image."
72 | readonly app_yaml=$1/app-canary.yaml
73 | else
74 | readonly app_yaml=$1/app.yaml
75 | fi
76 |
77 | # Deploy and run the tests.
78 | gcloud app deploy ${app_yaml} --quiet --verbosity=info --version=${version_id} --no-promote
79 | gcloud builds submit \
80 | --config=${run_script} \
81 | --substitutions _VERSION_ID=${version_id} \
82 | --quiet \
83 | --verbosity=info \
84 | --no-source
85 |
86 | # Cleanup the deployed version.
87 | if [[ "${SKIP_CLEANUP:-}" == "1" ]]; then
88 | echo "Skipping cleanup of version: ${version_id}"
89 | else
90 | echo "Cleaning up: ${version_id}"
91 | gcloud app versions delete ${version_id} --quiet
92 | fi
93 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Docker images for ASP.NET Core apps on Google Cloud
2 | This repo containes the definition of the Docker images for the .NET runtime to be able to run ASP.NET Core apps on App Engine Flexible environment as well as the runtime builder which will generate the necessary `Dockerfile` to build ASP.NET Core apps pushed to App Engine Flex.
3 |
4 | The repo is divided in two main directories:
5 | * The [runtimes](./runtimes) directory contains the definition for all of .NET Core runtimes targeting the major versions of .NET Core.
6 | * The [builder](./builder) directory contains the definition for the runtime builder image.
7 |
8 | ## The runtimes
9 | The [runtimes](./runtimes) directory contains definition for the .NET Core runtime images for each major version. The [`cloudbuild.yaml`](./runtimes/cloudbuild.yaml) file defines the build process for the images. To build the images you run the following code from the root of the repo.
10 | ```bash
11 | ./tools/submit_build.sh ./runtimes/cloudbuild.yaml
12 | ```
13 |
14 | This will build all of the runtimes for .NET Core. Tests will run during the build to ensure that the images have the right contents and that the images are functional.
15 |
16 | ## The runtime builder
17 | The [builder](./builder) directory contains the definition for the builder image for the `aspnetcore` runtime for Google App Engine Flexible environment. This builder image is responsible for generating a `Dockerfile` for a given published .NET Core application. This `Dockerfile` is then used during the deployment process to generate the app's image that will ultimately run in Google App Engine Flexible environment.
18 |
19 | ## Using the images to deploy ASP.NET Core apps
20 | Theses images are designed and tested to run apps on App Engine Flexible environment but it can also be used to run .NET Core apps on other Docker hosts such as Kubernetes Engine or just plain Docker.
21 |
22 | Each image is designed to run self-contained .NET Core apps, which means that the app must be published before you can build the app's image. To publish the app run the following command at the root of your app's project:
23 | ```bash
24 | dotnet publish -c Release
25 | ```
26 |
27 | This will produce a directory with the app's code and all its dependencies. For a .NET Core 2.0 app this directory will be under `bin/release/netcoreapp2.0/publish/`; This is the directory where the `Dockerfile` for app's image should be placed.
28 |
29 | ### Using the runtime image in App Engine Flex
30 | Typically you won't need to produce a `Dockerfile` when deploying ASP.NET Core apps to App Engine Flex, the deployment process will generate one for you when you specify the `aspnetcore` runtime in your `app.yaml` file. The minimal `app.yaml` file looks like this:
31 | ```yaml
32 | runtime: aspnetcore
33 | env: flex
34 | ```
35 |
36 | Typically you will have the `app.yaml` in the root of your project, we recommend that you add the `app.yaml` to your `.csproj` file with a line like this:
37 | ```XML
38 |
39 | ```
40 |
41 | This will ensure that the file `app.yaml` is published with the rest of the app. To deploy you will run the comand (assuming you are running from the project's root):
42 | ```bash
43 | gcloud beta app deploy ./bin/release/netcoreapp1.0/publish/app.yaml
44 | ```
45 |
46 | The deployment process will automatically use the runtime builder, which will detect what version of .NET Core you are using and produce the appropriate `Dockerfile` for your app.
47 |
48 | ### Using the runtime image in other environments
49 | The runtime image can be used as the base image for an ASP.NET Core apps and run in other environments such as Google Kubernetes Engine (GKE) and any other Docker host.
50 |
51 | To create a Docker image for your app create a `Dockerfile` that looks like this:
52 | ```Dockerfile
53 | FROM gcr.io/google-appengine/aspnetcore:2.0
54 | ADD ./ /app
55 | ENV ASPNETCORE_URLS=http://*:${PORT}
56 | WORKDIR /app
57 | ENTRYPOINT [ "dotnet", ".dll" ]
58 | ```
59 |
60 | Replace the `` with the name of the entrypoing `.dll` in your project, that should start your app listening on port 8080.
61 |
62 | We recommend that you store the `Dockerfile` on the root of your project and you add it to your `.csproj` so it is published with the rest of the app. You can add the `Dockerfile` with a line like this:
63 | ```XML
64 |
65 | ```
66 |
67 | ## Support
68 | To get help on using the aspnet runtime, please log an issue in this repo
69 |
70 | Patches are encouraged, and may be submitted by forking this project and submitting a Pull Request. See [CONTRIBUTING.md](CONTRIBUTING.md) for more information.
71 |
72 | ## License
73 | Apache 2.0. See [LICENSE](LICENSE) for more information.
74 |
--------------------------------------------------------------------------------
/runtimes/cloudbuild.yaml:
--------------------------------------------------------------------------------
1 | # This file defines the build script for all supported aspnetcore images.
2 | # _DOCKER_NAMESPACE, the repository where to push the images.
3 | # _TAG, the tag to use for the published images.
4 | steps:
5 | # Build the generator for testing later.
6 | - name: gcr.io/cloud-builders/docker
7 | args: [ 'build', '-t', 'generator', './dockerfile_generator' ]
8 | id: 'generator-build'
9 | waitFor: ['-']
10 |
11 | # .NET Core 1.0.x
12 | - name: gcr.io/cloud-builders/docker
13 | args: [ 'build', '-t', '${_DOCKER_NAMESPACE}/aspnetcore:1.0-${_TAG}',
14 | '--no-cache', '--pull', './versions/aspnetcore-1.0/image' ]
15 | id: 'aspnetcore-1-0-build'
16 | waitFor: ['-']
17 | - name: gcr.io/gcp-runtimes/structure_test
18 | args: ['-i', '${_DOCKER_NAMESPACE}/aspnetcore:1.0-${_TAG}',
19 | '--config', '/workspace/versions/aspnetcore-1.0/structural_tests/aspnet.yaml', '-v']
20 | id: 'aspnetcore-1-0-test'
21 | waitFor: [ 'aspnetcore-1-0-build' ]
22 | - name: generator
23 | args: [ './versions/aspnetcore-1.0/functional_tests/published', '${_DOCKER_NAMESPACE}/aspnetcore:1.0-${_TAG}' ]
24 | id: 'generator-run-1-0'
25 | waitFor: [ 'generator-build', 'aspnetcore-1-0-build' ]
26 | - name: gcr.io/cloud-builders/docker
27 | args: [ 'build', '-t', 'test-app-1-0', './versions/aspnetcore-1.0/functional_tests/published' ]
28 | id: 'test-app-build-1-0'
29 | waitFor: [ 'generator-run-1-0' ]
30 | - name: test-app-1-0
31 | id: 'test-app-run-1-0'
32 | entrypoint: 'bash'
33 | args: [ '-c', '[[ "$(dotnet /app/app.dll)" == "Hello World 1.0!" ]]' ]
34 | waitFor: [ 'test-app-build-1-0' ]
35 |
36 | # .NET Core 1.1.x
37 | - name: gcr.io/cloud-builders/docker
38 | args: [ 'build', '-t', '${_DOCKER_NAMESPACE}/aspnetcore:1.1-${_TAG}',
39 | '--no-cache', '--pull', './versions/aspnetcore-1.1/image' ]
40 | id: 'aspnetcore-1-1-build'
41 | waitFor: ['-']
42 | - name: gcr.io/gcp-runtimes/structure_test
43 | args: ['-i', '${_DOCKER_NAMESPACE}/aspnetcore:1.1-${_TAG}',
44 | '--config', '/workspace/versions/aspnetcore-1.1/structural_tests/aspnet.yaml', '-v']
45 | id: 'aspnetcore-1-1-test'
46 | waitFor: [ 'aspnetcore-1-1-build' ]
47 | - name: generator
48 | args: [ './versions/aspnetcore-1.1/functional_tests/published', '${_DOCKER_NAMESPACE}/aspnetcore:1.1-${_TAG}' ]
49 | id: 'generator-run-1-1'
50 | waitFor: [ 'generator-build', 'aspnetcore-1-1-build' ]
51 | - name: gcr.io/cloud-builders/docker
52 | args: [ 'build', '-t', 'test-app-1-1', './versions/aspnetcore-1.1/functional_tests/published' ]
53 | id: 'test-app-build-1-1'
54 | waitFor: [ 'generator-run-1-1' ]
55 | - name: test-app-1-1
56 | id: 'test-app-run-1-1'
57 | entrypoint: 'bash'
58 | args: [ '-c', '[[ "$(dotnet /app/app.dll)" == "Hello World 1.1!" ]]' ]
59 | waitFor: [ 'test-app-build-1-1' ]
60 |
61 | # .NET Core 2.0.x
62 | - name: gcr.io/cloud-builders/docker
63 | args: [ 'build', '-t', '${_DOCKER_NAMESPACE}/aspnetcore:2.0-${_TAG}',
64 | '--no-cache', '--pull', './versions/aspnetcore-2.0/image' ]
65 | id: 'aspnetcore-2-0-build'
66 | waitFor: ['-']
67 | - name: gcr.io/gcp-runtimes/structure_test
68 | args: ['-i', '${_DOCKER_NAMESPACE}/aspnetcore:2.0-${_TAG}',
69 | '--config', '/workspace/versions/aspnetcore-2.0/structural_tests/aspnet.yaml', '-v']
70 | id: 'aspnetcore-2-0-test'
71 | waitFor: [ 'aspnetcore-2-0-build' ]
72 | - name: generator
73 | args: [ './versions/aspnetcore-2.0/functional_tests/published', '${_DOCKER_NAMESPACE}/aspnetcore:2.0-${_TAG}' ]
74 | id: 'generator-run-2-0'
75 | waitFor: [ 'generator-build', 'aspnetcore-2-0-build' ]
76 | - name: gcr.io/cloud-builders/docker
77 | args: [ 'build', '-t', 'test-app-2-0', './versions/aspnetcore-2.0/functional_tests/published' ]
78 | id: 'test-app-build-2-0'
79 | waitFor: [ 'generator-run-2-0' ]
80 | - name: test-app-2-0
81 | id: 'test-app-run-2-0'
82 | entrypoint: 'bash'
83 | args: [ '-c', '[[ "$(dotnet /app/app.dll)" == "Hello World 2.0!" ]]' ]
84 | waitFor: [ 'test-app-build-2-0' ]
85 |
86 | # .NET Core 2.1.x
87 | - name: gcr.io/cloud-builders/docker
88 | args: [ 'build', '-t', '${_DOCKER_NAMESPACE}/aspnetcore:2.1-${_TAG}',
89 | '--no-cache', '--pull', './versions/aspnetcore-2.1/image' ]
90 | id: 'aspnetcore-2-1-build'
91 | waitFor: ['-']
92 | - name: gcr.io/gcp-runtimes/structure_test
93 | args: ['-i', '${_DOCKER_NAMESPACE}/aspnetcore:2.1-${_TAG}',
94 | '--config', '/workspace/versions/aspnetcore-2.1/structural_tests/aspnet.yaml', '-v']
95 | id: 'aspnetcore-2-1-test'
96 | waitFor: [ 'aspnetcore-2-1-build' ]
97 | - name: generator
98 | args: [ './versions/aspnetcore-2.1/functional_tests/published', '${_DOCKER_NAMESPACE}/aspnetcore:2.1-${_TAG}' ]
99 | id: 'generator-run-2-1'
100 | waitFor: [ 'generator-build', 'aspnetcore-2-1-build' ]
101 | - name: gcr.io/cloud-builders/docker
102 | args: [ 'build', '-t', 'test-app-2-1', './versions/aspnetcore-2.1/functional_tests/published' ]
103 | id: 'test-app-build-2-1'
104 | waitFor: [ 'generator-run-2-1' ]
105 | - name: test-app-2-1
106 | id: 'test-app-run-2-1'
107 | entrypoint: 'bash'
108 | args: [ '-c', '[[ "$(dotnet /app/app.dll)" == "Hello World 2.1!" ]]' ]
109 | waitFor: [ 'test-app-build-2-1' ]
110 |
111 | # .NET Core 2.2.x
112 | - name: gcr.io/cloud-builders/docker
113 | args: [ 'build', '-t', '${_DOCKER_NAMESPACE}/aspnetcore:2.2-${_TAG}',
114 | '--no-cache', '--pull', './versions/aspnetcore-2.2/image' ]
115 | id: 'aspnetcore-2-2-build'
116 | waitFor: ['-']
117 | - name: gcr.io/gcp-runtimes/structure_test
118 | args: ['-i', '${_DOCKER_NAMESPACE}/aspnetcore:2.2-${_TAG}',
119 | '--config', '/workspace/versions/aspnetcore-2.2/structural_tests/aspnet.yaml', '-v']
120 | id: 'aspnetcore-2-2-test'
121 | waitFor: [ 'aspnetcore-2-2-build' ]
122 | - name: generator
123 | args: [ './versions/aspnetcore-2.2/functional_tests/published', '${_DOCKER_NAMESPACE}/aspnetcore:2.2-${_TAG}' ]
124 | id: 'generator-run-2-2'
125 | waitFor: [ 'generator-build', 'aspnetcore-2-2-build' ]
126 | - name: gcr.io/cloud-builders/docker
127 | args: [ 'build', '-t', 'test-app-2-2', './versions/aspnetcore-2.2/functional_tests/published' ]
128 | id: 'test-app-build-2-2'
129 | waitFor: [ 'generator-run-2-2' ]
130 | - name: test-app-2-2
131 | id: 'test-app-run-2-2'
132 | entrypoint: 'bash'
133 | args: [ '-c', '[[ "$(dotnet /app/app.dll)" == "Hello World 2.2!" ]]' ]
134 | waitFor: [ 'test-app-build-2-2' ]
135 |
136 | # .NET Core 3.0.x
137 | - name: gcr.io/cloud-builders/docker
138 | args: [ 'build', '-t', '${_DOCKER_NAMESPACE}/aspnetcore:3.0-${_TAG}',
139 | '--no-cache', '--pull', './versions/aspnetcore-3.0/image' ]
140 | id: 'aspnetcore-3-0-build'
141 | waitFor: ['-']
142 | - name: gcr.io/gcp-runtimes/structure_test
143 | args: ['-i', '${_DOCKER_NAMESPACE}/aspnetcore:3.0-${_TAG}',
144 | '--config', '/workspace/versions/aspnetcore-3.0/structural_tests/aspnet.yaml', '-v']
145 | id: 'aspnetcore-3-0-test'
146 | waitFor: [ 'aspnetcore-3-0-build' ]
147 | - name: generator
148 | args: [ './versions/aspnetcore-3.0/functional_tests/published', '${_DOCKER_NAMESPACE}/aspnetcore:3.0-${_TAG}' ]
149 | id: 'generator-run-3-0'
150 | waitFor: [ 'generator-build', 'aspnetcore-3-0-build' ]
151 | - name: gcr.io/cloud-builders/docker
152 | args: [ 'build', '-t', 'test-app-3-0', './versions/aspnetcore-3.0/functional_tests/published' ]
153 | id: 'test-app-build-3-0'
154 | waitFor: [ 'generator-run-3-0' ]
155 | - name: test-app-3-0
156 | id: 'test-app-run-3-0'
157 | entrypoint: 'bash'
158 | args: [ '-c', '[[ "$(dotnet /app/app.dll)" == "Hello World 3.0!" ]]' ]
159 | waitFor: [ 'test-app-build-3-0' ]
160 |
161 | # .NET Core 3.1.x
162 | - name: gcr.io/cloud-builders/docker
163 | args: [ 'build', '-t', '${_DOCKER_NAMESPACE}/aspnetcore:3.1-${_TAG}',
164 | '--no-cache', '--pull', './versions/aspnetcore-3.1/image' ]
165 | id: 'aspnetcore-3-1-build'
166 | waitFor: ['-']
167 | - name: gcr.io/gcp-runtimes/structure_test
168 | args: ['-i', '${_DOCKER_NAMESPACE}/aspnetcore:3.1-${_TAG}',
169 | '--config', '/workspace/versions/aspnetcore-3.1/structural_tests/aspnet.yaml', '-v']
170 | id: 'aspnetcore-3-1-test'
171 | waitFor: [ 'aspnetcore-3-1-build' ]
172 | - name: generator
173 | args: [ './versions/aspnetcore-3.1/functional_tests/published', '${_DOCKER_NAMESPACE}/aspnetcore:3.1-${_TAG}' ]
174 | id: 'generator-run-3-1'
175 | waitFor: [ 'generator-build', 'aspnetcore-3-1-build' ]
176 | - name: gcr.io/cloud-builders/docker
177 | args: [ 'build', '-t', 'test-app-3-1', './versions/aspnetcore-3.1/functional_tests/published' ]
178 | id: 'test-app-build-3-1'
179 | waitFor: [ 'generator-run-3-1' ]
180 | - name: test-app-3-1
181 | id: 'test-app-run-3-1'
182 | entrypoint: 'bash'
183 | args: [ '-c', '[[ "$(dotnet /app/app.dll)" == "Hello World 3.1!" ]]' ]
184 | waitFor: [ 'test-app-build-3-1' ]
185 |
186 | # Publish the images.
187 | images:
188 | - '${_DOCKER_NAMESPACE}/aspnetcore:1.0-${_TAG}'
189 | - '${_DOCKER_NAMESPACE}/aspnetcore:1.1-${_TAG}'
190 | - '${_DOCKER_NAMESPACE}/aspnetcore:2.0-${_TAG}'
191 | - '${_DOCKER_NAMESPACE}/aspnetcore:2.1-${_TAG}'
192 | - '${_DOCKER_NAMESPACE}/aspnetcore:3.0-${_TAG}'
193 | - '${_DOCKER_NAMESPACE}/aspnetcore:3.1-${_TAG}'
194 | - '${_DOCKER_NAMESPACE}/aspnetcore:2.2-${_TAG}'
195 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Apache License
2 | Version 2.0, January 2004
3 | http://www.apache.org/licenses/
4 |
5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6 |
7 | 1. Definitions.
8 |
9 | "License" shall mean the terms and conditions for use, reproduction,
10 | and distribution as defined by Sections 1 through 9 of this document.
11 |
12 | "Licensor" shall mean the copyright owner or entity authorized by
13 | the copyright owner that is granting the License.
14 |
15 | "Legal Entity" shall mean the union of the acting entity and all
16 | other entities that control, are controlled by, or are under common
17 | control with that entity. For the purposes of this definition,
18 | "control" means (i) the power, direct or indirect, to cause the
19 | direction or management of such entity, whether by contract or
20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the
21 | outstanding shares, or (iii) beneficial ownership of such entity.
22 |
23 | "You" (or "Your") shall mean an individual or Legal Entity
24 | exercising permissions granted by this License.
25 |
26 | "Source" form shall mean the preferred form for making modifications,
27 | including but not limited to software source code, documentation
28 | source, and configuration files.
29 |
30 | "Object" form shall mean any form resulting from mechanical
31 | transformation or translation of a Source form, including but
32 | not limited to compiled object code, generated documentation,
33 | and conversions to other media types.
34 |
35 | "Work" shall mean the work of authorship, whether in Source or
36 | Object form, made available under the License, as indicated by a
37 | copyright notice that is included in or attached to the work
38 | (an example is provided in the Appendix below).
39 |
40 | "Derivative Works" shall mean any work, whether in Source or Object
41 | form, that is based on (or derived from) the Work and for which the
42 | editorial revisions, annotations, elaborations, or other modifications
43 | represent, as a whole, an original work of authorship. For the purposes
44 | of this License, Derivative Works shall not include works that remain
45 | separable from, or merely link (or bind by name) to the interfaces of,
46 | the Work and Derivative Works thereof.
47 |
48 | "Contribution" shall mean any work of authorship, including
49 | the original version of the Work and any modifications or additions
50 | to that Work or Derivative Works thereof, that is intentionally
51 | submitted to Licensor for inclusion in the Work by the copyright owner
52 | or by an individual or Legal Entity authorized to submit on behalf of
53 | the copyright owner. For the purposes of this definition, "submitted"
54 | means any form of electronic, verbal, or written communication sent
55 | to the Licensor or its representatives, including but not limited to
56 | communication on electronic mailing lists, source code control systems,
57 | and issue tracking systems that are managed by, or on behalf of, the
58 | Licensor for the purpose of discussing and improving the Work, but
59 | excluding communication that is conspicuously marked or otherwise
60 | designated in writing by the copyright owner as "Not a Contribution."
61 |
62 | "Contributor" shall mean Licensor and any individual or Legal Entity
63 | on behalf of whom a Contribution has been received by Licensor and
64 | subsequently incorporated within the Work.
65 |
66 | 2. Grant of Copyright License. Subject to the terms and conditions of
67 | this License, each Contributor hereby grants to You a perpetual,
68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69 | copyright license to reproduce, prepare Derivative Works of,
70 | publicly display, publicly perform, sublicense, and distribute the
71 | Work and such Derivative Works in Source or Object form.
72 |
73 | 3. Grant of Patent License. Subject to the terms and conditions of
74 | this License, each Contributor hereby grants to You a perpetual,
75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76 | (except as stated in this section) patent license to make, have made,
77 | use, offer to sell, sell, import, and otherwise transfer the Work,
78 | where such license applies only to those patent claims licensable
79 | by such Contributor that are necessarily infringed by their
80 | Contribution(s) alone or by combination of their Contribution(s)
81 | with the Work to which such Contribution(s) was submitted. If You
82 | institute patent litigation against any entity (including a
83 | cross-claim or counterclaim in a lawsuit) alleging that the Work
84 | or a Contribution incorporated within the Work constitutes direct
85 | or contributory patent infringement, then any patent licenses
86 | granted to You under this License for that Work shall terminate
87 | as of the date such litigation is filed.
88 |
89 | 4. Redistribution. You may reproduce and distribute copies of the
90 | Work or Derivative Works thereof in any medium, with or without
91 | modifications, and in Source or Object form, provided that You
92 | meet the following conditions:
93 |
94 | (a) You must give any other recipients of the Work or
95 | Derivative Works a copy of this License; and
96 |
97 | (b) You must cause any modified files to carry prominent notices
98 | stating that You changed the files; and
99 |
100 | (c) You must retain, in the Source form of any Derivative Works
101 | that You distribute, all copyright, patent, trademark, and
102 | attribution notices from the Source form of the Work,
103 | excluding those notices that do not pertain to any part of
104 | the Derivative Works; and
105 |
106 | (d) If the Work includes a "NOTICE" text file as part of its
107 | distribution, then any Derivative Works that You distribute must
108 | include a readable copy of the attribution notices contained
109 | within such NOTICE file, excluding those notices that do not
110 | pertain to any part of the Derivative Works, in at least one
111 | of the following places: within a NOTICE text file distributed
112 | as part of the Derivative Works; within the Source form or
113 | documentation, if provided along with the Derivative Works; or,
114 | within a display generated by the Derivative Works, if and
115 | wherever such third-party notices normally appear. The contents
116 | of the NOTICE file are for informational purposes only and
117 | do not modify the License. You may add Your own attribution
118 | notices within Derivative Works that You distribute, alongside
119 | or as an addendum to the NOTICE text from the Work, provided
120 | that such additional attribution notices cannot be construed
121 | as modifying the License.
122 |
123 | You may add Your own copyright statement to Your modifications and
124 | may provide additional or different license terms and conditions
125 | for use, reproduction, or distribution of Your modifications, or
126 | for any such Derivative Works as a whole, provided Your use,
127 | reproduction, and distribution of the Work otherwise complies with
128 | the conditions stated in this License.
129 |
130 | 5. Submission of Contributions. Unless You explicitly state otherwise,
131 | any Contribution intentionally submitted for inclusion in the Work
132 | by You to the Licensor shall be under the terms and conditions of
133 | this License, without any additional terms or conditions.
134 | Notwithstanding the above, nothing herein shall supersede or modify
135 | the terms of any separate license agreement you may have executed
136 | with Licensor regarding such Contributions.
137 |
138 | 6. Trademarks. This License does not grant permission to use the trade
139 | names, trademarks, service marks, or product names of the Licensor,
140 | except as required for reasonable and customary use in describing the
141 | origin of the Work and reproducing the content of the NOTICE file.
142 |
143 | 7. Disclaimer of Warranty. Unless required by applicable law or
144 | agreed to in writing, Licensor provides the Work (and each
145 | Contributor provides its Contributions) on an "AS IS" BASIS,
146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147 | implied, including, without limitation, any warranties or conditions
148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149 | PARTICULAR PURPOSE. You are solely responsible for determining the
150 | appropriateness of using or redistributing the Work and assume any
151 | risks associated with Your exercise of permissions under this License.
152 |
153 | 8. Limitation of Liability. In no event and under no legal theory,
154 | whether in tort (including negligence), contract, or otherwise,
155 | unless required by applicable law (such as deliberate and grossly
156 | negligent acts) or agreed to in writing, shall any Contributor be
157 | liable to You for damages, including any direct, indirect, special,
158 | incidental, or consequential damages of any character arising as a
159 | result of this License or out of the use or inability to use the
160 | Work (including but not limited to damages for loss of goodwill,
161 | work stoppage, computer failure or malfunction, or any and all
162 | other commercial damages or losses), even if such Contributor
163 | has been advised of the possibility of such damages.
164 |
165 | 9. Accepting Warranty or Additional Liability. While redistributing
166 | the Work or Derivative Works thereof, You may choose to offer,
167 | and charge a fee for, acceptance of support, warranty, indemnity,
168 | or other liability obligations and/or rights consistent with this
169 | License. However, in accepting such obligations, You may act only
170 | on Your own behalf and on Your sole responsibility, not on behalf
171 | of any other Contributor, and only if You agree to indemnify,
172 | defend, and hold each Contributor harmless for any liability
173 | incurred by, or claims asserted against, such Contributor by reason
174 | of your accepting any such warranty or additional liability.
175 |
176 | END OF TERMS AND CONDITIONS
177 |
178 | APPENDIX: How to apply the Apache License to your work.
179 |
180 | To apply the Apache License to your work, attach the following
181 | boilerplate notice, with the fields enclosed by brackets "[]"
182 | replaced with your own identifying information. (Don't include
183 | the brackets!) The text should be enclosed in the appropriate
184 | comment syntax for the file format. We also recommend that a
185 | file or class name and description of purpose be included on the
186 | same "printed page" as the copyright notice for easier
187 | identification within third-party archives.
188 |
189 | Copyright [yyyy] [name of copyright owner]
190 |
191 | Licensed under the Apache License, Version 2.0 (the "License");
192 | you may not use this file except in compliance with the License.
193 | You may obtain a copy of the License at
194 |
195 | http://www.apache.org/licenses/LICENSE-2.0
196 |
197 | Unless required by applicable law or agreed to in writing, software
198 | distributed under the License is distributed on an "AS IS" BASIS,
199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200 | See the License for the specific language governing permissions and
201 | limitations under the License.
202 |
--------------------------------------------------------------------------------