Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 55d241e362 | |||
| cb03b91c6c | |||
| 0da92cfb5a | |||
| b0ea5ea098 | |||
| 30cde40d5b | |||
| 32eeb24558 | |||
| 5abe7a1476 | |||
| bead8314da | |||
| ace7eeef8e | |||
| 5c3ceeeb83 | |||
| e21fd59b12 | |||
| fcc0b3845e |
+5
-1
@@ -23,7 +23,7 @@ trigger:
|
|||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
name: package
|
name: package
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: docker-build
|
- name: docker-build
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
@@ -31,6 +31,10 @@ steps:
|
|||||||
registry: nexus.khongisa.co.za
|
registry: nexus.khongisa.co.za
|
||||||
repo: nexus.khongisa.co.za/midrandbooks
|
repo: nexus.khongisa.co.za/midrandbooks
|
||||||
tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ]
|
tags: [ latest, "1.${DRONE_BUILD_NUMBER}" ]
|
||||||
|
use_cache: true
|
||||||
|
cache_from: nexus.khongisa.co.za/midrandbooks:latest
|
||||||
|
build_args:
|
||||||
|
- BUILDKIT_INLINE_CACHE=1
|
||||||
custom_labels:
|
custom_labels:
|
||||||
- org.opencontainers.image.source=https://gitea.khongisa.co.za/litecharms/midrandbooks
|
- org.opencontainers.image.source=https://gitea.khongisa.co.za/litecharms/midrandbooks
|
||||||
- org.opencontainers.image.version=1.${DRONE_BUILD_NUMBER}
|
- org.opencontainers.image.version=1.${DRONE_BUILD_NUMBER}
|
||||||
|
|||||||
@@ -38,13 +38,13 @@ public sealed class HydrationService(AuthenticationStateProvider authStateProvid
|
|||||||
|
|
||||||
if (existingCustomer.IsFailed)
|
if (existingCustomer.IsFailed)
|
||||||
{
|
{
|
||||||
var name = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Name)!.Value!;
|
var name = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Name)?.Value ?? string.Empty;
|
||||||
var lastname = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Surname)!.Value!;
|
var lastname = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.Surname)?.Value ?? string.Empty;
|
||||||
var mobile = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.MobilePhone)!.Value!;
|
var mobile = User!.Claims.FirstOrDefault(c => c.Type == ClaimTypes.MobilePhone)?.Value ?? string.Empty;
|
||||||
|
|
||||||
var customerCreate = await customerService.CreateCustomerAsync(new CreateCustomer { Email = email }, cancellationToken);
|
var customerCreate = await customerService.CreateCustomerAsync(new CreateCustomer { Email = email }, cancellationToken);
|
||||||
|
|
||||||
if (customerCreate.IsSuccess)
|
if (customerCreate.IsSuccess && !string.IsNullOrWhiteSpace(name))
|
||||||
{
|
{
|
||||||
ShoppingCart.CustomerId = customerCreate.Value;
|
ShoppingCart.CustomerId = customerCreate.Value;
|
||||||
|
|
||||||
|
|||||||
@@ -27,13 +27,6 @@ app.UseHealthChecks("/health", new HealthCheckOptions
|
|||||||
});
|
});
|
||||||
|
|
||||||
app.MapStaticAssets();
|
app.MapStaticAssets();
|
||||||
app.Use((context, next) =>
|
|
||||||
{
|
|
||||||
if (context.Request.Host.Value!.Contains("midrandbooks.co.za", StringComparison.OrdinalIgnoreCase))
|
|
||||||
context.Request.Scheme = "https";
|
|
||||||
|
|
||||||
return next();
|
|
||||||
});
|
|
||||||
app.UseCookiePolicy();
|
app.UseCookiePolicy();
|
||||||
|
|
||||||
app.UseAuthentication();
|
app.UseAuthentication();
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ metadata:
|
|||||||
name: midrandbooks
|
name: midrandbooks
|
||||||
namespace: midrandbooks-uat
|
namespace: midrandbooks-uat
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 2
|
||||||
|
revisionHistoryLimit: 0
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: midrandbooks
|
app: midrandbooks
|
||||||
|
|||||||
Reference in New Issue
Block a user