diff --git a/build/azure-devops/apigws/azure-pipelines.yml b/build/azure-devops/apigws/azure-pipelines.yml index 2487e7bce..d2f4708f6 100644 --- a/build/azure-devops/apigws/azure-pipelines.yml +++ b/build/azure-devops/apigws/azure-pipelines.yml @@ -2,6 +2,21 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/ApiGateways/* + - k8s/helm/apigwmm/* + - k8s/helm/apigwms/* + - k8s/helm/apigwwm/* + - k8s/helm/apigwws/* + exclude: + - src/ApiGateways/Mobile.Bff.Shopping/aggregator/* + - src/ApiGateways/Web.Bff.Shopping/aggregator/* steps: - task: DockerCompose@0 displayName: Compose build apigws diff --git a/build/azure-devops/basket-api/azure-pipelines.yml b/build/azure-devops/basket-api/azure-pipelines.yml index 5655c1a12..6d94c5918 100644 --- a/build/azure-devops/basket-api/azure-pipelines.yml +++ b/build/azure-devops/basket-api/azure-pipelines.yml @@ -2,6 +2,16 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Services/Basket/* + - k8s/helm/basket-api/* steps: - task: DockerCompose@0 displayName: Compose build basket diff --git a/build/azure-devops/catalog-api/azure-pipelines.yml b/build/azure-devops/catalog-api/azure-pipelines.yml index f1881f096..d277d4777 100644 --- a/build/azure-devops/catalog-api/azure-pipelines.yml +++ b/build/azure-devops/catalog-api/azure-pipelines.yml @@ -2,6 +2,16 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Services/Catalog/* + - k8s/helm/catalog-api/* steps: - task: DockerCompose@0 displayName: Compose build catalog diff --git a/build/azure-devops/identity-api/azure-pipelines.yml b/build/azure-devops/identity-api/azure-pipelines.yml index 7fc628e1a..454c03d16 100644 --- a/build/azure-devops/identity-api/azure-pipelines.yml +++ b/build/azure-devops/identity-api/azure-pipelines.yml @@ -2,6 +2,16 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Services/Identity/* + - k8s/helm/identity-api/* steps: - task: DockerCompose@0 displayName: Compose build identity diff --git a/build/azure-devops/location-api/azure-pipelines.yml b/build/azure-devops/location-api/azure-pipelines.yml index b0868c17c..ab3d31b3f 100644 --- a/build/azure-devops/location-api/azure-pipelines.yml +++ b/build/azure-devops/location-api/azure-pipelines.yml @@ -2,6 +2,16 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Services/Location/* + - k8s/helm/locations-api/* steps: - task: DockerCompose@0 displayName: Compose build locations diff --git a/build/azure-devops/marketing-api/azure-pipelines.yml b/build/azure-devops/marketing-api/azure-pipelines.yml index d979f51cb..193a0cccf 100644 --- a/build/azure-devops/marketing-api/azure-pipelines.yml +++ b/build/azure-devops/marketing-api/azure-pipelines.yml @@ -2,6 +2,16 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Services/Marketing/* + - k8s/helm/marketing-api/* steps: - task: DockerCompose@0 displayName: Compose build marketing diff --git a/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml b/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml index 635a7e13c..6fb0018a1 100644 --- a/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml +++ b/build/azure-devops/mobile-shopping-agg/azure-pipelines.yml @@ -2,6 +2,15 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/ApiGateways/Mobile.Bff.Shopping/aggregator/* + - k8s/helm/mobileshoppingagg/* steps: - task: DockerCompose@0 displayName: Compose build mobileshoppingagg diff --git a/build/azure-devops/ordering-api/azure-pipelines.yml b/build/azure-devops/ordering-api/azure-pipelines.yml index 48b1995c6..ef0b17a32 100644 --- a/build/azure-devops/ordering-api/azure-pipelines.yml +++ b/build/azure-devops/ordering-api/azure-pipelines.yml @@ -2,6 +2,18 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Services/Ordering/* + - k8s/helm/ordering-api/* + - k8s/helm/ordering-backgroundtasks/* + - k8s/helm/ordering-signalrhub/* steps: - task: DockerCompose@0 displayName: Compose build ordering diff --git a/build/azure-devops/payment-api/azure-pipelines.yml b/build/azure-devops/payment-api/azure-pipelines.yml index b33187ee2..8518c8841 100644 --- a/build/azure-devops/payment-api/azure-pipelines.yml +++ b/build/azure-devops/payment-api/azure-pipelines.yml @@ -2,6 +2,16 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Services/Payment/* + - k8s/helm/payment-api/* steps: - task: DockerCompose@0 displayName: Compose build payment diff --git a/build/azure-devops/web-shopping-agg/azure-pipelines.yml b/build/azure-devops/web-shopping-agg/azure-pipelines.yml index 7ff3f56a5..70a4df950 100644 --- a/build/azure-devops/web-shopping-agg/azure-pipelines.yml +++ b/build/azure-devops/web-shopping-agg/azure-pipelines.yml @@ -2,6 +2,15 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/ApiGateways/Web.Bff.Shopping/aggregator/* + - k8s/helm/webshoppingagg/* steps: - task: DockerCompose@0 displayName: Compose build webshoppingagg diff --git a/build/azure-devops/webhooks-api/azure-pipelines.yml b/build/azure-devops/webhooks-api/azure-pipelines.yml index 90429da3d..b48948111 100644 --- a/build/azure-devops/webhooks-api/azure-pipelines.yml +++ b/build/azure-devops/webhooks-api/azure-pipelines.yml @@ -2,6 +2,16 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Services/Webhooks/* + - k8s/helm/webhooks-api/* steps: - task: DockerCompose@0 displayName: Compose build webhooks diff --git a/build/azure-devops/webhooks-client/azure-pipelines.yml b/build/azure-devops/webhooks-client/azure-pipelines.yml index 607fcd8cf..71e3bbe16 100644 --- a/build/azure-devops/webhooks-client/azure-pipelines.yml +++ b/build/azure-devops/webhooks-client/azure-pipelines.yml @@ -2,6 +2,16 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Web/WebhookClient/* + - k8s/helm/webhooks-web/* steps: - task: DockerCompose@0 displayName: Compose build webhooks.client diff --git a/build/azure-devops/webmvc/azure-pipelines.yml b/build/azure-devops/webmvc/azure-pipelines.yml index 76762fcc5..66b8518fa 100644 --- a/build/azure-devops/webmvc/azure-pipelines.yml +++ b/build/azure-devops/webmvc/azure-pipelines.yml @@ -2,6 +2,16 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Web/WebMVC/* + - k8s/helm/webmvc/* steps: - task: DockerCompose@0 displayName: Compose build webmvc diff --git a/build/azure-devops/webspa/azure-pipelines.yml b/build/azure-devops/webspa/azure-pipelines.yml index 2e00d422a..eee8cd25d 100644 --- a/build/azure-devops/webspa/azure-pipelines.yml +++ b/build/azure-devops/webspa/azure-pipelines.yml @@ -2,6 +2,16 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Web/WebSPA/* + - k8s/helm/webspa/* steps: - task: DockerCompose@0 displayName: Compose build webspa diff --git a/build/azure-devops/webstatus/azure-pipelines.yml b/build/azure-devops/webstatus/azure-pipelines.yml index 4dd4b425e..311c457e2 100644 --- a/build/azure-devops/webstatus/azure-pipelines.yml +++ b/build/azure-devops/webstatus/azure-pipelines.yml @@ -2,6 +2,16 @@ pool: vmImage: 'ubuntu-16.04' variables: registryEndpoint: eshop-registry +trigger: + branches: + include: + - master + - dev + paths: + include: + - src/BuildingBlocks/* + - src/Web/WebStatus/* + - k8s/helm/webstatus/* steps: - task: DockerCompose@0 displayName: Compose build webstatus diff --git a/src/Web/WebhookClient/Pages/Index.cshtml b/src/Web/WebhookClient/Pages/Index.cshtml index 26338b19f..70eaed6ee 100644 --- a/src/Web/WebhookClient/Pages/Index.cshtml +++ b/src/Web/WebhookClient/Pages/Index.cshtml @@ -4,9 +4,17 @@ ViewData["Title"] = "Home page"; } +
+
+
-

Welcome

-

eShopOnContainers - Webhook client

+

 

+ +

eShopOnContainers - Order Management

+

+ This is a sample web client that uses the Webhooks API to show you all orders that reached the "paid" status. This is accomplished by creating a Webhook + that will be called by eShopOnContainers core when the order reached this "paid" status. If not created you can create this webhook going to webhook registration. +

@if (!User.Identity.IsAuthenticated) { Login @@ -15,8 +23,8 @@
-

Current webhooks received

-

(Data since last time web started up)

+

Current webhooks received (orders paid)

+

(Data since last time web started up). Note: Must manually refresh this page.

@foreach (var webhook in Model.WebHooksReceived) { diff --git a/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml b/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml index c0e76b208..15157ee99 100644 --- a/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml +++ b/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml @@ -4,9 +4,9 @@ ViewData["Title"] = "RegisterWebhook"; } -

Register webhook

+

Register a new webhook

-

This page registers the "OrderPaid" Webhook by sending a POST to webhooks.

+

This page registers the "OrderPaid" Webhook by sending a POST to the WebHooks API. Once the Webhook is set, you will be able to see new paid orders from the Index page.

Token:

@@ -15,5 +15,6 @@ @if (Model.ResponseCode != (int)System.Net.HttpStatusCode.OK) { -

Error @Model.ResponseCode (@Model.ResponseMessage) when calling the Webhooks API (@Model.RequestUrl) with GrantUrl: @Model.GrantUrl):(

+

Error @Model.ResponseCode (@Model.ResponseMessage) when calling the Webhooks API (@Model.RequestUrl) with GrantUrl: @Model.GrantUrl)

+

Data sent to the webhooks API was @Model.RequestBodyJson

} \ No newline at end of file diff --git a/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs b/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs index f97693449..3e52cda27 100644 --- a/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs +++ b/src/Web/WebhookClient/Pages/RegisterWebhook.cshtml.cs @@ -10,6 +10,7 @@ using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using Microsoft.Extensions.Options; +using Newtonsoft.Json; using WebhookClient.Models; namespace WebhookClient.Pages @@ -27,7 +28,7 @@ namespace WebhookClient.Pages public string RequestUrl { get; set; } public string GrantUrl { get; set; } public string ResponseMessage { get; set; } - + public string RequestBodyJson { get; set; } public RegisterWebhookModel(IOptions settings, IHttpClientFactory httpClientFactory) { @@ -69,6 +70,7 @@ namespace WebhookClient.Pages } else { + RequestBodyJson = JsonConvert.SerializeObject(payload); ResponseCode = (int)response.StatusCode; ResponseMessage = response.ReasonPhrase; GrantUrl = granturl; diff --git a/src/Web/WebhookClient/Pages/Shared/_Layout.cshtml b/src/Web/WebhookClient/Pages/Shared/_Layout.cshtml index e7269f656..600c82841 100644 --- a/src/Web/WebhookClient/Pages/Shared/_Layout.cshtml +++ b/src/Web/WebhookClient/Pages/Shared/_Layout.cshtml @@ -3,7 +3,7 @@ - @ViewData["Title"] - WebhookClient + @ViewData["Title"] - Order Management @@ -21,7 +21,7 @@