diff --git a/.gitignore b/.gitignore
index 348a17b..2902834 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,7 +9,11 @@
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
+# Test results
+*.trx
+
# Build results
+*.trx
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
@@ -21,7 +25,7 @@ bld/
[Oo]bj/
[Ll]og/
-# Visual Studio 2015 cache/options directory
+# Visual Studio 2015+ cache/options directory
.vs/
*_i.c
@@ -77,12 +81,6 @@ _ReSharper*/
# JustCode is a .NET coding add-in
.JustCode
-# TeamCity is a build add-in
-_TeamCity*
-
-# DotCover is a Code Coverage Tool
-*.dotCover
-
# NCrunch
_NCrunch_*
.*crunch*.local.xml
diff --git a/CallPolly.sln b/CallPolly.sln
index 139c9d7..fdbb7b0 100644
--- a/CallPolly.sln
+++ b/CallPolly.sln
@@ -11,8 +11,9 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "CallPolly.Tests", "tests\Ca
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".project", ".project", "{6047ADD6-C48C-4583-A5C6-58FDF7A0DC10}"
ProjectSection(SolutionItems) = preProject
- build.cmd = build.cmd
+ azure-pipelines.yml = azure-pipelines.yml
build.proj = build.proj
+ build.ps1 = build.ps1
Directory.Build.props = Directory.Build.props
global.json = global.json
LICENSE = LICENSE
diff --git a/Directory.Build.props b/Directory.Build.props
index 0b8cc7c..cf30f28 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -1,6 +1,5 @@
- 0.0.5
@jet @bartelink and contributors
Jet.com
Apply systemwide resilience strategies consistently across subsystems, standing on Polly's shoulders
@@ -13,5 +12,8 @@
true
true
$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb
+
+ false
+ $(EnableSourceLink)
\ No newline at end of file
diff --git a/README.md b/README.md
index 331bc1a..3ddd007 100644
--- a/README.md
+++ b/README.md
@@ -46,6 +46,12 @@ In service of this, the assumption is that most extensions to CallPolly should l
=> **"can we make CallPolly help you achieve that without making it more complex for everyone else?**
+# Building
+ ```
+# verify the integrity of the repo wrt being able to build/pack/test
+./build.ps1
+```
+
# Taster: example policy
Yes, there should be a real README with real examples; we'll get there :sweat_smile:
diff --git a/azure-pipelines.yml b/azure-pipelines.yml
new file mode 100644
index 0000000..d719dc1
--- /dev/null
+++ b/azure-pipelines.yml
@@ -0,0 +1,64 @@
+name: $(Rev:r)
+jobs:
+- job: Windows
+ pool:
+ vmImage: 'vs2017-win2016'
+ steps:
+ - powershell: |
+ $buildId = $env:BUILD_BUILDNUMBER.PadLeft(7, '0');
+ $versionSuffixPR = "ci-$buildId-pr$($env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER)";
+ $branchName = "$env:BUILD_SOURCEBRANCHNAME".Replace("_","");
+ $versionSuffixBRANCH = "ci-$buildId";
+ $isTag = "$env:BUILD_SOURCEBRANCH".StartsWith('refs/tags/');
+ $isPR = "$env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER" -ne ""
+ $versionSuffix = if ($isTag) { "" } else { if ($isPR) { $versionSuffixPR } else { $versionSuffixBRANCH } };
+ Write-Host "##vso[task.setvariable variable=VersionSuffix]$versionSuffix";
+ displayName: compute VersionSuffix
+ - script: dotnet msbuild build.proj
+ displayName: Test + Build
+ env:
+ VersionSuffix: '$(VersionSuffix)'
+ - task: PublishTestResults@2
+ inputs:
+ testResultsFormat: 'VSTest'
+ testResultsFiles: 'tests/**/*.trx'
+ condition: succeededOrFailed()
+ - task: PublishBuildArtifacts@1
+ inputs:
+ pathtoPublish: 'bin'
+ artifactName: 'nupkgs'
+ - task: NuGetCommand@2
+ condition: and(succeeded(), or(eq(variables['Build.Reason'], 'PullRequest'), eq(variables['Build.SourceBranch'], 'refs/heads/master')))
+ inputs:
+ command: push
+ nuGetFeedType: external
+ publishFeedCredentials: 'Jet-MyGet'
+ versioningScheme: byEnvVar
+ versionEnvVar: Version
+ packagesToPush: 'bin/*.nupkg;bin/*.symbols.nupkg'
+- job: Linux
+ pool:
+ vmImage: 'ubuntu-16.04'
+ steps:
+ - script: echo "##vso[task.setvariable variable=FrameworkPathOverride]$(dirname $(which mono))/../lib/mono/4.5/"
+ displayName: Workaround .NET reference assemblies on linux
+ - script: dotnet msbuild build.proj
+ displayName: Test + Build
+ - task: PublishTestResults@2
+ inputs:
+ testResultsFormat: 'VSTest'
+ testResultsFiles: 'tests/**/*.trx'
+ condition: succeededOrFailed()
+- job: MacOS
+ pool:
+ vmImage: 'macOS-10.13'
+ steps:
+ - script: echo "##vso[task.setvariable variable=FrameworkPathOverride]$(dirname $(which mono))/../lib/mono/4.5/"
+ displayName: Workaround .NET reference assemblies on linux
+ - script: dotnet msbuild build.proj
+ displayName: Test + Build
+ - task: PublishTestResults@2
+ inputs:
+ testResultsFormat: 'VSTest'
+ testResultsFiles: 'tests/**/*.trx'
+ condition: succeededOrFailed()
\ No newline at end of file
diff --git a/build.cmd b/build.cmd
deleted file mode 100644
index 9b4809c..0000000
--- a/build.cmd
+++ /dev/null
@@ -1 +0,0 @@
-dotnet msbuild build.proj %*
\ No newline at end of file
diff --git a/build.proj b/build.proj
index 848ba32..77aa6f3 100644
--- a/build.proj
+++ b/build.proj
@@ -1,26 +1,25 @@
-
+
+
+
CallPolly
--configuration Release
- $([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)"))
- -o $(RepoRootDir)bin
-
- $([System.String]::Format('{0:0000000}',$([MSBuild]::Add($(BuildNumber), 0))))
- --version-suffix CI$(BuildNumber)-pr$(PullRequestId)
- --version-suffix CI$(BuildNumber)
+ $([System.IO.Path]::GetFullPath("$(MSBuildThisFileDirectory)"))
+ -o $(ThisDirAbsolute)bin --version-suffix "$(VersionSuffix)"
+ --logger:trx
-
+
-
-
+
+
\ No newline at end of file
diff --git a/build.ps1 b/build.ps1
new file mode 100644
index 0000000..338405a
--- /dev/null
+++ b/build.ps1
@@ -0,0 +1 @@
+& dotnet msbuild build.proj @args
\ No newline at end of file
diff --git a/tests/CallPolly.Acceptance/CallPolly.Acceptance.fsproj b/tests/CallPolly.Acceptance/CallPolly.Acceptance.fsproj
index 4cb320e..a065967 100644
--- a/tests/CallPolly.Acceptance/CallPolly.Acceptance.fsproj
+++ b/tests/CallPolly.Acceptance/CallPolly.Acceptance.fsproj
@@ -17,6 +17,10 @@
+
+
+
+
@@ -28,8 +32,11 @@
+
-
+
+ PreserveNewest
+
diff --git a/tests/CallPolly.Acceptance/xunit.runner.json b/tests/CallPolly.Acceptance/xunit.runner.json
new file mode 100644
index 0000000..b5cc7ae
--- /dev/null
+++ b/tests/CallPolly.Acceptance/xunit.runner.json
@@ -0,0 +1,3 @@
+{
+ "appDomain": "denied"
+}
diff --git a/tests/CallPolly.Tests/CallPolly.Tests.fsproj b/tests/CallPolly.Tests/CallPolly.Tests.fsproj
index d7c34a2..638de4b 100644
--- a/tests/CallPolly.Tests/CallPolly.Tests.fsproj
+++ b/tests/CallPolly.Tests/CallPolly.Tests.fsproj
@@ -14,6 +14,10 @@
+
+
+
+
@@ -24,8 +28,11 @@
+
-
+
+ PreserveNewest
+
diff --git a/tests/CallPolly.Tests/xunit.runner.json b/tests/CallPolly.Tests/xunit.runner.json
new file mode 100644
index 0000000..b5cc7ae
--- /dev/null
+++ b/tests/CallPolly.Tests/xunit.runner.json
@@ -0,0 +1,3 @@
+{
+ "appDomain": "denied"
+}