Skip to content
Open
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
4 changes: 2 additions & 2 deletions OpenHack.Challenge02/OpenHack.Challenge02.API/CreateRating.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public static async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Func

rating.UserNotes = data?.userNotes;
rating.Rating = data?.rating;
rating.LocationName = data?.locationName;
rating.LocationName = data?.locationName;
rating.Rating = data?.rating;
rating.Version = "1.4";

Expand All @@ -65,7 +65,7 @@ public static async Task<IActionResult> Run([HttpTrigger(AuthorizationLevel.Func

public static async Task<Models.Product> GetProductId(Models.UserRating rating)
{
HttpResponseMessage response = await CallApi("https://serverlessohproduct.trafficmanager.net/api/","GetProduct?productId=" + rating.ProductId);
HttpResponseMessage response = await CallApi("https://serverlessohproduct.trafficmanager.net/api/", "GetProduct?productId=" + rating.ProductId);
if (response.IsSuccessStatusCode)
{
Models.Product product = await response.Content.ReadAsAsync<Models.Product>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public static async Task<IActionResult> Run(
{
log.LogInformation("C# HTTP trigger function processed a request.");

return new OkObjectResult(new { version = "2.0.0.0", timestamp = DateTime.Now.ToString() });
return new OkObjectResult(new { version = "2.1.0.0", timestamp = DateTime.Now.ToString() });
}
}
}
33 changes: 26 additions & 7 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,33 @@
# ASP.NET Core
# Build and test ASP.NET Core projects targeting .NET Core.
# Add steps that run tests, create a NuGet package, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core
# ASP.NET
# Build and test ASP.NET projects.
# Add steps that publish symbols, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/apps/aspnet/build-aspnet-4

pool:
vmImage: 'Ubuntu 16.04'
vmImage: 'VS2017-Win2016'

variables:
solution: '**/*.sln'
buildPlatform: 'Any CPU'
buildConfiguration: 'Release'

steps:
- script: dotnet build --configuration $(buildConfiguration)
displayName: 'dotnet build $(buildConfiguration)'
- task: NuGetToolInstaller@0

- task: NuGetCommand@2
inputs:
restoreSolution: '$(solution)'

- task: VSBuild@1
inputs:
solution: '$(solution)'
msbuildArgs: '/p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactStagingDirectory)"'
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'

- task: VSTest@2
inputs:
platform: '$(buildPlatform)'
configuration: '$(buildConfiguration)'

- task: PublishBuildArtifacts@1