From 0f56025f6dc864c206a3ef680730e82044690d5b Mon Sep 17 00:00:00 2001 From: Matt Cole Date: Mon, 18 Sep 2017 00:31:50 +0100 Subject: [PATCH] Fix Docker build - Make sure XML docs are included - Ensure DLLs have versions set properly - Update .NET Core SDK image used --- .gitignore | 7 ++++++- Gelf.Extensions.Logging.sln | 3 ++- README.md | 2 +- docker-compose.ci.build.yml | 7 +++---- docker-compose.ci.publish.yml | 4 ++-- docker-compose.yml | 2 +- .../Gelf.Extensions.Logging.csproj | 13 +++++++++---- 7 files changed, 24 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 15f3536..f289026 100644 --- a/.gitignore +++ b/.gitignore @@ -260,5 +260,10 @@ paket-files/ __pycache__/ *.pyc +## Project specific files and directories + # Graylog -graylog/data/ \ No newline at end of file +graylog/data/ + +# XML Documentation +Gelf.Extensions.Logging.xml diff --git a/Gelf.Extensions.Logging.sln b/Gelf.Extensions.Logging.sln index dc2ccb6..72b8bcd 100644 --- a/Gelf.Extensions.Logging.sln +++ b/Gelf.Extensions.Logging.sln @@ -6,6 +6,7 @@ MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8D2DBBD0-2141-4B3D-BEA5-5FF4B15F0919}" ProjectSection(SolutionItems) = preProject .editorconfig = .editorconfig + .gitignore = .gitignore .travis.yml = .travis.yml docker-compose.ci.build.yml = docker-compose.ci.build.yml docker-compose.ci.publish.yml = docker-compose.ci.publish.yml @@ -26,7 +27,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{7D94 EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gelf.Extensions.Logging.Samples.NetCore2", "samples\Gelf.Extensions.Logging.Samples.NetCore2\Gelf.Extensions.Logging.Samples.NetCore2.csproj", "{0A2D1AF3-16F9-4081-A3BE-35331BEF58B5}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Gelf.Extensions.Logging.Samples.NetCore1", "samples\Gelf.Extensions.Logging.Samples.NetCore1\Gelf.Extensions.Logging.Samples.NetCore1.csproj", "{C55B368D-E4C1-42D0-97C2-4AD2F443743B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gelf.Extensions.Logging.Samples.NetCore1", "samples\Gelf.Extensions.Logging.Samples.NetCore1\Gelf.Extensions.Logging.Samples.NetCore1.csproj", "{C55B368D-E4C1-42D0-97C2-4AD2F443743B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/README.md b/README.md index 8c10139..94830c9 100644 --- a/README.md +++ b/README.md @@ -93,4 +93,4 @@ This repository contains a Docker Compose file that can be used for creating loc ## Contributing -Pull requests welcome! In order to run tests, first run `docker-compose up` to create the Graylog stack. Existing tests log messages and use the Graylog API to assert that they have been sent correctly. A UDP input will be created as part of the test setup (if not already present), so there is no need to create one manually. Build and tests are run on CI in Docker, meaning it is possible to run the build locally in identical conditions using `docker-compose -f docker-compose.ci.build.yml -f docker-compose.yml up`. +Pull requests welcome! In order to run tests, first run `docker-compose up` to create the Graylog stack. Existing tests log messages and use the Graylog API to assert that they have been sent correctly. A UDP input will be created as part of the test setup (if not already present), so there is no need to create one manually. Build and tests are run on CI in Docker, meaning it is possible to run the build locally in identical conditions using `docker-compose -f docker-compose.ci.build.yml -f docker-compose.yml up --abort-on-container-exit`. diff --git a/docker-compose.ci.build.yml b/docker-compose.ci.build.yml index c4d6701..7af147a 100644 --- a/docker-compose.ci.build.yml +++ b/docker-compose.ci.build.yml @@ -1,8 +1,8 @@ -version: '2' +version: '3' services: ci-build: - image: microsoft/dotnet:1.1-sdk + image: microsoft/dotnet:2.0-sdk volumes: - .:/src working_dir: /src @@ -10,8 +10,7 @@ services: - GRAYLOG_HOST=graylog-server command: > /bin/bash -c ' - versionArg=$$([[ ! -z "$VERSION" ]] && echo "/p:PackageVersion=$VERSION" || echo "") && - dotnet restore && + versionArg=$$([[ ! -z "$VERSION" ]] && echo "/p:Version=$VERSION" || echo "") && dotnet build -c Release $$versionArg && find test/*/*Tests.csproj | xargs -n 1 dotnet test -c Release --no-build ' diff --git a/docker-compose.ci.publish.yml b/docker-compose.ci.publish.yml index 6fc1e07..e7df7e0 100644 --- a/docker-compose.ci.publish.yml +++ b/docker-compose.ci.publish.yml @@ -1,8 +1,8 @@ -version: '2' +version: '3' services: ci-build: - image: microsoft/dotnet:1.1-sdk + image: microsoft/dotnet:2.0-sdk volumes: - .:/src working_dir: /src diff --git a/docker-compose.yml b/docker-compose.yml index 4a2b9cc..23a4a7c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2' +version: '3' services: graylog-mongo: diff --git a/src/Gelf.Extensions.Logging/Gelf.Extensions.Logging.csproj b/src/Gelf.Extensions.Logging/Gelf.Extensions.Logging.csproj index 35c7e1b..dac2caf 100644 --- a/src/Gelf.Extensions.Logging/Gelf.Extensions.Logging.csproj +++ b/src/Gelf.Extensions.Logging/Gelf.Extensions.Logging.csproj @@ -14,10 +14,15 @@ - bin\Debug\netstandard1.3\.xml - 1591 - True - + true + + + + + true + + Gelf.Extensions.Logging.xml + 1701;1702;1705;1591