Skip to content

Set up CI with Azure Pipelines #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jan 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GitHubReleaseNotes.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
https://github.com./StefH/GitHubReleaseNotes

GitHubReleaseNotes.exe . --output ReleaseNotes.md --skip-empty-releases --language en --version 1.0.6
GitHubReleaseNotes.exe . --output ReleaseNotes.md --skip-empty-releases --language en --version 1.0.6.1
4 changes: 2 additions & 2 deletions StandAlone.NETCoreApp/StandAlone.NETCoreApp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="WireMock.Net" Version="1.0.6" />
<PackageReference Include="WireMock.Net.StandAlone" Version="1.0.6" />
<PackageReference Include="WireMock.Net" Version="1.0.6.1" />
<PackageReference Include="WireMock.Net.StandAlone" Version="1.0.6.1" />
</ItemGroup>

</Project>
72 changes: 34 additions & 38 deletions Docker Solutions.sln → WireMock.Net Docker Solution.sln
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2041
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StandAlone.NETCoreApp", "StandAlone.NETCoreApp\StandAlone.NETCoreApp.csproj", "{053EA9FA-E42A-4E57-9EC5-7F0F2D6E4014}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "dotnet-web-example", "dotnet-web-example\dotnet-web-example.csproj", "{85F83B63-7FFE-4035-BFCC-54EFF774C608}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5AC62511-0096-4DE2-A53D-A899F8F5FD4A}"
ProjectSection(SolutionItems) = preProject
GitHubReleaseNotes.txt = GitHubReleaseNotes.txt
README.md = README.md
ReleaseNotes.md = ReleaseNotes.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{053EA9FA-E42A-4E57-9EC5-7F0F2D6E4014}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{053EA9FA-E42A-4E57-9EC5-7F0F2D6E4014}.Debug|Any CPU.Build.0 = Debug|Any CPU
{053EA9FA-E42A-4E57-9EC5-7F0F2D6E4014}.Release|Any CPU.ActiveCfg = Release|Any CPU
{053EA9FA-E42A-4E57-9EC5-7F0F2D6E4014}.Release|Any CPU.Build.0 = Release|Any CPU
{85F83B63-7FFE-4035-BFCC-54EFF774C608}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{85F83B63-7FFE-4035-BFCC-54EFF774C608}.Debug|Any CPU.Build.0 = Debug|Any CPU
{85F83B63-7FFE-4035-BFCC-54EFF774C608}.Release|Any CPU.ActiveCfg = Release|Any CPU
{85F83B63-7FFE-4035-BFCC-54EFF774C608}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EFD20BD3-6DD3-4AC5-AAFE-E33F89A4653A}
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.28010.2041
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StandAlone.NETCoreApp", "StandAlone.NETCoreApp\StandAlone.NETCoreApp.csproj", "{053EA9FA-E42A-4E57-9EC5-7F0F2D6E4014}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5AC62511-0096-4DE2-A53D-A899F8F5FD4A}"
ProjectSection(SolutionItems) = preProject
azure-pipelines.nano.yml = azure-pipelines.nano.yml
azure-pipelines.yml = azure-pipelines.yml
GitHubReleaseNotes.txt = GitHubReleaseNotes.txt
README.md = README.md
ReleaseNotes.md = ReleaseNotes.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{053EA9FA-E42A-4E57-9EC5-7F0F2D6E4014}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{053EA9FA-E42A-4E57-9EC5-7F0F2D6E4014}.Debug|Any CPU.Build.0 = Debug|Any CPU
{053EA9FA-E42A-4E57-9EC5-7F0F2D6E4014}.Release|Any CPU.ActiveCfg = Release|Any CPU
{053EA9FA-E42A-4E57-9EC5-7F0F2D6E4014}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {EFD20BD3-6DD3-4AC5-AAFE-E33F89A4653A}
EndGlobalSection
EndGlobal
32 changes: 32 additions & 0 deletions azure-pipelines.nano.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
pool:
vmImage: 'vs2017-win2016'

variables:
buildConfiguration: 'Release'
imageName: 'wiremock.net-nano'
buildProjects: '**/StandAlone.NETCoreApp.csproj'
tag: '1.0.6.1'

steps:
# Build StandAlone.NETCoreApp
- task: DotNetCoreCLI@2
displayName: Build StandAlone.NETCoreApp
inputs:
command: 'build'
arguments: /p:Configuration=$(buildConfiguration)
projects: $(buildProjects)

# Docker
- script: docker build -t $(DOCKER_ID)/$(imageName) -f ./StandAlone.NETCoreApp/Dockerfile.nano ./StandAlone.NETCoreApp
displayName: 'Build Docker image [$(imageName):latest]'

- script: docker tag $(DOCKER_ID)/$(imageName):latest $(DOCKER_ID)/$(imageName):$(tag)
displayName: 'Tag Docker image [$(imageName):$(tag)]'

# https://stackoverflow.com/questions/51489359/docker-using-password-via-the-cli-is-insecure-use-password-stdin
# https://github.com./Microsoft/azure-pipelines-tasks/issues/6480#issuecomment-453765536
- script: |
echo | set /p="$(DOCKER_PWD)" | docker login --username $(DOCKER_ID) --password-stdin
docker push $(DOCKER_ID)/$(imageName):latest
docker push $(DOCKER_ID)/$(imageName):$(tag)
displayName: 'Push Docker images [$(imageName):latest and $(imageName):$(tag)]'
31 changes: 31 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
pool:
vmImage: 'Ubuntu 16.04'

variables:
buildConfiguration: 'Release'
imageName: 'wiremock.net'
buildProjects: '**/StandAlone.NETCoreApp.csproj'
tag: '1.0.6.1'

steps:
# Build StandAlone.NETCoreApp
- task: DotNetCoreCLI@2
displayName: Build StandAlone.NETCoreApp
inputs:
command: 'build'
arguments: /p:Configuration=$(buildConfiguration)
projects: $(buildProjects)

# Docker
- script: docker build -t $(DOCKER_ID)/$(imageName) -f ./StandAlone.NETCoreApp/Dockerfile ./StandAlone.NETCoreApp
displayName: 'Build Docker image [$(imageName):latest]'

- script: docker tag $(DOCKER_ID)/$(imageName):latest $(DOCKER_ID)/$(imageName):$(tag)
displayName: 'Tag Docker image [$(imageName):$(tag)]'

# https://stackoverflow.com/questions/51489359/docker-using-password-via-the-cli-is-insecure-use-password-stdin
- script: |
echo "$(DOCKER_PWD)" | docker login --username $(DOCKER_ID) --password-stdin
docker push $(DOCKER_ID)/$(imageName):latest
docker push $(DOCKER_ID)/$(imageName):$(tag)
displayName: 'Push Docker images [$(imageName):latest and $(imageName):$(tag)]'
24 changes: 0 additions & 24 deletions dotnet-web-example/Dockerfile

This file was deleted.

27 changes: 0 additions & 27 deletions dotnet-web-example/Dockerfile.nano

This file was deleted.

39 changes: 0 additions & 39 deletions dotnet-web-example/Program.cs

This file was deleted.

31 changes: 0 additions & 31 deletions dotnet-web-example/Startup.cs

This file was deleted.

24 changes: 0 additions & 24 deletions dotnet-web-example/WireMockMiddleware.cs

This file was deleted.

18 changes: 0 additions & 18 deletions dotnet-web-example/dotnet-web-example.csproj

This file was deleted.