From 2c69caa4a16d52ebeaf0ebf727def29dbecde154 Mon Sep 17 00:00:00 2001 From: angelavl Date: Wed, 25 Nov 2020 13:30:06 +0100 Subject: [PATCH 1/3] Update docker, packages and project version to migrate to .NET 5 --- .github/workflows/aks.yaml | 2 +- .github/workflows/container_appservice.yaml | 2 +- .github/workflows/pr_build_check.yaml | 2 +- Source/Tailwind.Traders.Web/Dockerfile | 8 ++++---- Source/Tailwind.Traders.Web/Dockerfile.develop | 2 +- Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj | 8 ++++---- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/aks.yaml b/.github/workflows/aks.yaml index 50dfd5ba..111c38a3 100644 --- a/.github/workflows/aks.yaml +++ b/.github/workflows/aks.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker build and push working-directory: Source/Tailwind.Traders.Web run: | - docker build . --build-arg sdkTag=3.1 --build-arg runtimeTag=3.1 -t tailwindtraders/web:gh-${{ github.sha }} -t latest + docker build . --build-arg sdkTag=5.0 --build-arg runtimeTag=5.0 -t tailwindtraders/web:gh-${{ github.sha }} -t latest docker push tailwindtraders/web:gh-${{ github.sha }} - uses: azure/login@v1 diff --git a/.github/workflows/container_appservice.yaml b/.github/workflows/container_appservice.yaml index 35b74524..4827fe5f 100644 --- a/.github/workflows/container_appservice.yaml +++ b/.github/workflows/container_appservice.yaml @@ -25,7 +25,7 @@ jobs: - name: Docker build and push working-directory: Source/Tailwind.Traders.Web run: | - docker build . --build-arg sdkTag=3.1 --build-arg runtimeTag=3.1 -t tailwindtraders/web:gh-${{ github.sha }} -t latest + docker build . --build-arg sdkTag=5.0 --build-arg runtimeTag=5.0 -t tailwindtraders/web:gh-${{ github.sha }} -t latest docker push tailwindtraders/web:gh-${{ github.sha }} # - uses: azure/appservice-settings@v1 diff --git a/.github/workflows/pr_build_check.yaml b/.github/workflows/pr_build_check.yaml index 89db195a..1785ee2e 100644 --- a/.github/workflows/pr_build_check.yaml +++ b/.github/workflows/pr_build_check.yaml @@ -14,4 +14,4 @@ jobs: - name: Docker build working-directory: Source/Tailwind.Traders.Web run: | - docker build . --build-arg sdkTag=3.1 --build-arg runtimeTag=3.1 -t tailwindtraders/web:gh-${{ github.sha }} -t latest + docker build . --build-arg sdkTag=5.0 --build-arg runtimeTag=5.0 -t tailwindtraders/web:gh-${{ github.sha }} -t latest diff --git a/Source/Tailwind.Traders.Web/Dockerfile b/Source/Tailwind.Traders.Web/Dockerfile index d8befb15..e3a791c3 100644 --- a/Source/Tailwind.Traders.Web/Dockerfile +++ b/Source/Tailwind.Traders.Web/Dockerfile @@ -1,7 +1,7 @@ -ARG sdkTag=3.1 -ARG runtimeTag=3.1 -ARG image=mcr.microsoft.com/dotnet/core/aspnet -ARG sdkImage=mcr.microsoft.com/dotnet/core/sdk +ARG sdkTag=5.0 +ARG runtimeTag=5.0 +ARG image=mcr.microsoft.com/dotnet/aspnet +ARG sdkImage=mcr.microsoft.com/dotnet/sdk FROM node:10-alpine as build-node WORKDIR /ClientApp diff --git a/Source/Tailwind.Traders.Web/Dockerfile.develop b/Source/Tailwind.Traders.Web/Dockerfile.develop index 6d92b1fb..9db9524f 100644 --- a/Source/Tailwind.Traders.Web/Dockerfile.develop +++ b/Source/Tailwind.Traders.Web/Dockerfile.develop @@ -6,7 +6,7 @@ RUN npm install COPY ClientApp/ . RUN npm run build -FROM mcr.microsoft.com/dotnet/core/sdk:3.1 +FROM mcr.microsoft.com/dotnet/sdk:5.0 ENV BuildingDocker true ARG BUILD_CONFIGURATION=Debug ENV ASPNETCORE_ENVIRONMENT=Development diff --git a/Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj b/Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj index 175c79be..61586d41 100644 --- a/Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj +++ b/Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj @@ -1,7 +1,7 @@  - netcoreapp3.1 + net5.0 true Latest false @@ -17,11 +17,11 @@ - - + + - + From 4c8f14a46843a5a758388decf45adfafac7790a7 Mon Sep 17 00:00:00 2001 From: Anthony Chu Date: Tue, 22 Oct 2019 10:27:59 -0700 Subject: [PATCH 2/3] NET 5 and Bridge to Kubernetes Support --- .devcontainer/Dockerfile | 46 +++++ .devcontainer/devcontainer.json | 30 +++ .devcontainer/docker-compose.yml | 39 ++++ .vscode/launch.json | 34 +++ .vscode/tasks.json | 42 ++++ Demo.md | 82 ++++++++ Deploy/DeployWebAKS.ps1 | 20 +- Documents/Devspaces.md | 21 -- README.md | 2 +- .../ClientApp/package-lock.json | 193 ++++++++++++++---- .../ClientApp/src/services/cartService.js | 2 +- .../ClientApp/src/services/configService.js | 13 +- .../Controllers/SettingsController.cs | 4 +- Source/Tailwind.Traders.Web/Settings.cs | 7 +- .../Controllers/ShoppingCartController.cs | 2 +- .../Tailwind.Traders.Web.csproj | 1 + Source/Tailwind.Traders.Web/azds.yaml | 44 ---- makefile | 20 ++ package-lock.json | 3 + 19 files changed, 468 insertions(+), 137 deletions(-) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json create mode 100644 .devcontainer/docker-compose.yml create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json create mode 100644 Demo.md delete mode 100644 Documents/Devspaces.md delete mode 100644 Source/Tailwind.Traders.Web/azds.yaml create mode 100644 makefile create mode 100644 package-lock.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000..2ad183d9 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,46 @@ +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- + +FROM mcr.microsoft.com/dotnet/core/sdk:2.1 + +# Avoid warnings by switching to noninteractive +ENV DEBIAN_FRONTEND=noninteractive +ENV ASPNETCORE_URLS=http://0.0.0.0:5000 + +# This Dockerfile adds a non-root 'vscode' user with sudo access. However, for Linux, +# this user's GID/UID must match your local user UID/GID to avoid permission issues +# with bind mounts. Update USER_UID / USER_GID if yours is not 1000. See +# https://aka.ms/vscode-remote/containers/non-root-user for details. +ARG USERNAME=vscode +ARG USER_UID=1000 +ARG USER_GID=$USER_UID + +# Configure apt and install packages +RUN apt-get update \ + && apt-get -y install --no-install-recommends apt-utils dialog 2>&1 \ + # + # Verify git, process tools, lsb-release (common in install instructions for CLIs) installed + && apt-get -y install git iproute2 procps lsb-release \ + # + # Install node + && apt-get -y install curl gnupg build-essential \ + && curl -sL https://deb.nodesource.com/setup_10.x | bash - \ + && apt-get -y install nodejs \ + # + # Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user. + && groupadd --gid $USER_GID $USERNAME \ + && useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \ + # [Optional] Add sudo support for the non-root user + && apt-get install -y sudo \ + && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\ + && chmod 0440 /etc/sudoers.d/$USERNAME \ + # + # Clean up + && apt-get autoremove -y \ + && apt-get clean -y \ + && rm -rf /var/lib/apt/lists/* + +# Switch back to dialog for any ad-hoc use of apt-get +ENV DEBIAN_FRONTEND= \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000..f8bd16d5 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,30 @@ +// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at +// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/dotnetcore-2.1 +{ + "name": "TailwindTraders-Website", + "dockerComposeFile": "docker-compose.yml", + "service": "web", + "workspaceFolder": "/workspace", + + // Use 'settings' to set *default* container specific settings.json values on container create. + // You can edit these settings after create using File > Preferences > Settings > Remote. + "settings": { + "terminal.integrated.shell.linux": "/bin/bash" + }, + + // Uncomment the next line if you want to publish any ports. + // "appPort": [], + + // Uncomment the next line to run commands after the container is created. + // "postCreateCommand": "dotnet restore" + + // Uncomment the next line to use a non-root user. On Linux, this will prevent + // new files getting created as root, but you may need to update the USER_UID + // and USER_GID in .devcontainer/Dockerfile to match your user if not 1000. + // "runArgs": [ "-u", "vscode" ], + + // Add the IDs of extensions you want installed when the container is created in the array below. + "extensions": [ + "ms-vscode.csharp" + ] +} \ No newline at end of file diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml new file mode 100644 index 00000000..403f7e47 --- /dev/null +++ b/.devcontainer/docker-compose.yml @@ -0,0 +1,39 @@ +#------------------------------------------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See https://go.microsoft.com/fwlink/?linkid=2090316 for license information. +#------------------------------------------------------------------------------------------------------------- + +version: '3' +services: + web: + # Uncomment the next line to use a non-root user. On Linux, this will prevent + # new files getting created as root, but you may need to update the USER_UID + # and USER_GID in .devcontainer/Dockerfile to match your user if not 1000. + # user: node + + build: + context: . + dockerfile: Dockerfile + volumes: + - ..:/workspace + ports: + - 5000:5000 + + # Overrides default command so things don't shut down after the process ends. + command: sleep infinity + + links: + - mongo + - sql + + mongo: + image: mongo + restart: unless-stopped + + sql: + image: mcr.microsoft.com/mssql/server:2017-latest + restart: unless-stopped + environment: + - ACCEPT_EULA=Y + - SA_PASSWORD=Twtraders123456! + \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..e80b7d42 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,34 @@ +{ + // Use IntelliSense to find out which attributes exist for C# debugging + // Use hover for the description of the existing attributes + // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (web)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/Source/Tailwind.Traders.Web/bin/Debug/netcoreapp2.1/Tailwind.Traders.Web.dll", + "args": [], + "cwd": "${workspaceFolder}/Source/Tailwind.Traders.Web", + "stopAtEntry": false, + "serverReadyAction": { + "action": "openExternally", + "pattern": "^\\s*Now listening on:\\s+(https?://\\S+)" + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "sourceFileMap": { + "/Views": "${workspaceFolder}/Views" + } + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach", + "processId": "${command:pickProcess}" + } +] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..e7ea8ea9 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,42 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "build", + "command": "dotnet", + "type": "process", + "args": [ + "build", + "${workspaceFolder}/Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "publish", + "command": "dotnet", + "type": "process", + "args": [ + "publish", + "${workspaceFolder}/Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + }, + { + "label": "watch", + "command": "dotnet", + "type": "process", + "args": [ + "watch", + "run", + "${workspaceFolder}/Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "problemMatcher": "$msCompile" + } + ] +} \ No newline at end of file diff --git a/Demo.md b/Demo.md new file mode 100644 index 00000000..242a9d75 --- /dev/null +++ b/Demo.md @@ -0,0 +1,82 @@ +# Apps 30 Demo Commands + +### Environment Variables Used + +``` +resourceGroup=live-igniteapps30 +location=eastus +subName="Ignite The Tour" +cosmosDBName=liveapps30twtnosqlge +sqlDBName=liveapps30twtsql +webappName=liveigniteapps30 +acrName=liveigniteapps30acr +adminUser=twtadmin +adminPassword=twtapps30pD +``` + +### Resource Group Creation + +`az group create --subscription "$subName" --name $resourceGroup --location $location` + +### VNet Creation + +`az network vnet create --name igniteapps30vnet --subscription "$subName" --resource-group $resourceGroup --subnet-name default` + +### CosmosDB Creation + +`az cosmosdb create --name $cosmosDBName --resource-group $resourceGroup --kind MongoDB --subscription "$subName"` + +# SQL Server Creation + +`az sql server create --location $location --resource-group $resourceGroup --name $sqlDBName --admin-user $adminUser --admin-password $adminPassword --subscription "$subName"` + +# SQL Server Firewall Rule + +`az sql server firewall-rule create --resource-group $resourceGroup --server $sqlDBName --name azure --start-ip-address 0.0.0.0 --end-ip-address 0.0.0.0 --subscription "$subName"` + +# SQL Server DB Creation + +`az sql db create --resource-group $resourceGroup --server $sqlDBName --name tailwind --subscription "$subName"` + +# Azure Container Registry Creation + +`az acr create --resource-group $resourceGroup --name $acrName --sku Basic --subscription "$subName" --admin-enabled true` + +`az appservice plan create -g $resourceGroup -n $webappName --is-linux --sku S1` + +# Build our image + +``` +cd igniteapps30/TailwindTraders-Website/Source/Tailwind.Traders.Web/ +az acr build --subscription "Ignite The Tour" --registry $acrName --image $webappName . +``` + +# Create our App Service Service Plan + +`az appservice plan create -g $resourceGroup -n $webappName --is-linux --sku S1` + +# Create our App Service Container Web App + +`az webapp create --resource-group $resourceGroup --plan $webappName --name $webappName --deployment-container-image-name $acrName.azurecr.io/$webappName:ca1` + +# Configure loggin on our web app + +`az webapp log config -n $webappName -g $resourceGroup --web-server-logging filesystem` + +# Speficy which image to use for our web app + +`REGISTRY_PASSWORD=$(az acr credential show -n $acrName -o tsv --query 'passwords[0].value')` + +`az webapp config container set --name $webappName --resource-group $resourceGroup --docker-custom-image-name liveigniteapps30acr.azurecr.io/$webappName:ca1 --docker-registry-server-url https://liveigniteapps30acr.azurecr.io --docker-registry-server-user liveigniteapps30acr --docker-registry-server-password $REGISTRY_PASSWORD` + +# Get our Cosmos and SQL Connection strings + +`cosmosConnectionString=$(az cosmosdb list-connection-strings --name $cosmosDBName --resource-group $resourceGroup --query 'connectionStrings[0].connectionString' -o tsv --subscription "$subName")` + +`sqlConnectionString=$(az sql db show-connection-string --server $sqlDBName --name tailwind -c ado.net --subscription "$subName" | jq -r .)` + +**Note:** Be sure to update the sqlConnection String with your + +# Configure environment variables for our webapp to work properly + +`az webapp config appsettings set --resource-group $resourceGroup --name $webappName --settings apiUrl=/api/v1 ApiUrlShoppingCart=/api/v1 productImagesUrl=https://raw.githubusercontent.com/microsoft/TailwindTraders-Backend/master/Deploy/tailwindtraders-images/product-detail SqlConnectionString="sqlConnectionString" MongoConnectionString="$cosmosConnectionString"` diff --git a/Deploy/DeployWebAKS.ps1 b/Deploy/DeployWebAKS.ps1 index d83e1dcd..33c27ebb 100644 --- a/Deploy/DeployWebAKS.ps1 +++ b/Deploy/DeployWebAKS.ps1 @@ -11,7 +11,7 @@ Param( [parameter(Mandatory = $false)][string]$tlsHost = "", [parameter(Mandatory = $false)][string]$tlsSecretName = "", [parameter(Mandatory = $false)][string]$appInsightsName = "", - [parameter(Mandatory = $false)][bool]$build = $false, + [parameter(Mandatory = $false)][string]$build = $false, [parameter(Mandatory = $false)][string]$subscription = "" ) @@ -46,8 +46,8 @@ function validate { } function buildPushImageDocker() { - $sourceFolder = $(./Join-Path-Recursively.ps1 -pathParts .., Source) - Write-Host "Source Folder $sourceFolder" -ForegroundColor Yellow + Push-Location $($MyInvocation.InvocationName | Split-Path) + $sourceFolder = $(./Join-Path-Recursively.ps1 -pathParts .., Source) Write-Host "Getting info from ACR $resourceGroup/$acrName" -ForegroundColor Yellow $acrCredentials = $(az acr credential show -g $resourceGroup -n $acrName -o json | ConvertFrom-Json) @@ -83,7 +83,7 @@ function createHelmCommand([string]$command, $chart) { $newcmd = $command if (-not [string]::IsNullOrEmpty($tlsSecretNameToUse)) { - $newcmd = "$newcmd --set ingress.protocol=https --set ingress.tls[0].secretName=$tlsSecretNameToUse --set ingress.tls[0].hosts='{$aksHost}'" + $newcmd = "$newcmd --set ingress.protocol=https --set ingress.tls[0].secretName=$tlsSecretNameToUse --set ingress.tls[0].hosts={$aksHost}" } else { $newcmd = "$newcmd --set ingress.protocol=http" @@ -104,8 +104,6 @@ Write-Host " Images tag: $tag" -ForegroundColor Red Write-Host " TLS/SSL environment to enable: $tlsEnv" -ForegroundColor Red Write-Host " --------------------------------------------------------" -Push-Location $($MyInvocation.InvocationName | Split-Path) - if ($build -and ([string]::IsNullOrEmpty($acrName))) { $acrName = $(az acr list --resource-group $resourceGroup --subscription $subscription -o json | ConvertFrom-Json).name } @@ -122,15 +120,7 @@ else { $aksHost = $tlsHost } -if ($build) { - # Connecting kubectl to AKS - Write-Host "Retrieving Aks Name" -ForegroundColor Yellow - $aksName = $(az aks list -g $resourceGroup -o json | ConvertFrom-Json).name - Write-Host "The name of your AKS: $aksName" -ForegroundColor Yellow - - Write-Host "Retrieving credentials" -ForegroundColor Yellow - az aks get-credentials -n $aksName -g $resourceGroup - +if ($build) { buildPushImageDocker } diff --git a/Documents/Devspaces.md b/Documents/Devspaces.md deleted file mode 100644 index 4859211c..00000000 --- a/Documents/Devspaces.md +++ /dev/null @@ -1,21 +0,0 @@ -# Devspaces Support - -Tailwind Traders Website supports Azure Dev Spaces deployment. - -## Requirements - -* AKS cluster **with the Backend deployed in a Dev Space**. Please follow the [Dev Spaces Backend documentation](https://github.com/Microsoft/TailwindTraders-Backend/blob/main/Documents/Devspaces.md). The website **must be deployed in a Dev Space that has the backend deployed or in a child one**. - -## Deploying the web - -Just ensure that you are located in a Dev Space that has (or is child of one that has) backend installed. Then just go to `./Source` and type `azds up -d -v`. That will deploy the website in the Devspace. - -The web is deployed using a configuration file stored in `/Deploy/helm/gvalues.azds.yaml`. The file contains the needed values for the default setup to work. - -## Website and devspaces routing - -The web expects configuration variable (named `ApiUrl`) that has the base address of the backend services (Web expect all backend services in the same base address). By default the web is connected against a backend deployed in the same devspace. - -By default the base URL of all backend services is `.tt...azds.io`. If you deploy the web in a parent devspace named "dev" the base URL of the backend services will be like `dev.tt.xxxxxxxxxx.weu.azds.io` and this is the value that will be passed to the web, when the web is deployed in the same devspace. - -If you deploy the web in a devspace child of the "dev", the URL of the web will be like `.s..ttweb...azds.io` and the web in this namespace will be configured to use a backend in the base URL `.s..tt...azds.io`. Even though the backend is not deployed in the child devspace, as the devspace is child of "dev", those URLs for the child devspace exists (child devspace inherits all URLs of their parent one). This ensures the web uses their version of Backend if installed. diff --git a/README.md b/README.md index 29babc8a..6905ab9d 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ And it will return your base [TailwindTraders-Backend](https://github.com/Micros Please follow these steps to deploy the web in the same AKS where Backend is running instead of deploying to an App Service. -**Note**: Website supports [Devspaces deployment](./Documents/Devspaces.md). +**Note**: Website supports [Bridge to Kubernetes Deployment](https://github.com/Microsoft/TailwindTraders-Backend/README.md#running-using-bridge-to-kubernetes). ## Pre-Requisites: diff --git a/Source/Tailwind.Traders.Web/ClientApp/package-lock.json b/Source/Tailwind.Traders.Web/ClientApp/package-lock.json index 35d7acde..81ec6eec 100644 --- a/Source/Tailwind.Traders.Web/ClientApp/package-lock.json +++ b/Source/Tailwind.Traders.Web/ClientApp/package-lock.json @@ -58,6 +58,19 @@ "source-map": "^0.5.0" }, "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "requires": { + "ms": "^2.1.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", @@ -3145,6 +3158,15 @@ "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==" }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", @@ -3966,10 +3988,10 @@ "ms": "2.0.0" } }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" } } }, @@ -4720,11 +4742,6 @@ "requires": { "ms": "2.0.0" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, @@ -4947,9 +4964,9 @@ } }, "emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==" + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" }, "emojis-list": { "version": "3.0.0", @@ -5282,11 +5299,6 @@ "requires": { "ms": "2.0.0" } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" } } }, @@ -5338,8 +5350,21 @@ }, "ms": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" }, "p-limit": { "version": "1.3.0", @@ -5449,10 +5474,14 @@ "path-exists": "^3.0.0" } }, - "ms": { + "locate-path": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } }, "p-limit": { "version": "1.3.0", @@ -6373,20 +6402,25 @@ "rimraf": "2" } }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" + "graceful-fs": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.3.tgz", + "integrity": "sha512-a30VEBm4PEdx1dRB7MFK7BejejvCvBronbLjht+sHuGYj8PHs7M/5Z+rt5lw551vZ7yfTCj4Vuyy3mSJytDWRQ==" }, - "functional-red-black-tree": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", - "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=" + "growly": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz", + "integrity": "sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=" + }, + "gud": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz", + "integrity": "sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw==" }, - "gauge": { - "version": "2.7.4", - "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", - "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "gzip-size": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-5.1.1.tgz", + "integrity": "sha512-FNHi6mmoHvs1mxZAds4PpdCS6QG8B4C1krxJsMutgxl5t3+GlRTzzI3NEkifXx2pVsOvJdOGSmIgDhQ55FwdPA==", "requires": { "aproba": "^1.0.3", "console-control-strings": "^1.0.0", @@ -7254,6 +7288,11 @@ "call-bind": "^1.0.0" } }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==" + }, "is-arrayish": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", @@ -9514,6 +9553,11 @@ "vm-browserify": "^1.0.1" }, "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, "punycode": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", @@ -9567,6 +9611,30 @@ "true-case-path": "^1.0.2" } }, + "node-sass": { + "version": "4.13.1", + "resolved": "https://registry.npmjs.org/node-sass/-/node-sass-4.13.1.tgz", + "integrity": "sha512-TTWFx+ZhyDx1Biiez2nB0L3YrCZ/8oHagaDalbuBSlqXgUPsdkUSzJsVxeDO9LtPB49+Fh3WQl3slABo6AotNw==", + "requires": { + "async-foreach": "^0.1.3", + "chalk": "^1.1.1", + "cross-spawn": "^3.0.0", + "gaze": "^1.0.0", + "get-stdin": "^4.0.1", + "glob": "^7.0.3", + "in-publish": "^2.0.0", + "lodash": "^4.17.15", + "meow": "^3.7.0", + "mkdirp": "^0.5.1", + "nan": "^2.13.2", + "node-gyp": "^3.8.0", + "npmlog": "^4.0.0", + "request": "^2.88.0", + "sass-graph": "^2.2.4", + "stdout-stream": "^1.4.0", + "true-case-path": "^1.0.2" + } + }, "nopt": { "version": "3.0.6", "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", @@ -9701,6 +9769,16 @@ "define-properties": "^1.1.3" } }, + "object-inspect": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz", + "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw==" + }, + "object-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.0.2.tgz", + "integrity": "sha512-Epah+btZd5wrrfjkJZq1AOB9O6OxUQto45hzFd7lXGrpHPGE0W1k+426yrZV+k6NJOzLNNW/nVsmZdIWsAqoOQ==" + }, "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", @@ -9899,6 +9977,14 @@ "p-reduce": "^1.0.0" } }, + "p-each-series": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-each-series/-/p-each-series-1.0.0.tgz", + "integrity": "sha1-kw89Et0fUOdDRFeiLNbwSsatf3E=", + "requires": { + "p-reduce": "^1.0.0" + } + }, "p-finally": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", @@ -10384,6 +10470,14 @@ "postcss": "^7.0.14" } }, + "postcss-custom-media": { + "version": "7.0.8", + "resolved": "https://registry.npmjs.org/postcss-custom-media/-/postcss-custom-media-7.0.8.tgz", + "integrity": "sha512-c9s5iX0Ge15o00HKbuRuTqNndsJUbaXdiNsksnVH8H4gdc+zbLzr/UasOwNG6CTDpLFekVY4672eWdiiWu2GUg==", + "requires": { + "postcss": "^7.0.14" + } + }, "postcss-custom-properties": { "version": "8.0.11", "resolved": "https://registry.npmjs.org/postcss-custom-properties/-/postcss-custom-properties-8.0.11.tgz", @@ -13056,6 +13150,19 @@ "requires": { "websocket-driver": ">=0.5.1" } + }, + "faye-websocket": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/faye-websocket/-/faye-websocket-0.11.3.tgz", + "integrity": "sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA==", + "requires": { + "websocket-driver": ">=0.5.1" + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" } } }, @@ -13448,9 +13555,9 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" }, "style-loader": { - "version": "0.23.1", - "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-0.23.1.tgz", - "integrity": "sha512-XK+uv9kWwhZMZ1y7mysB+zoihsEj4wneFWAS5qoiLwzW0WzSqMrrsIy+a3zkQJq0ipFtBpX5W3MqyRIBF/WFGg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-1.0.0.tgz", + "integrity": "sha512-B0dOCFwv7/eY31a5PCieNwMgMhVGFe9w+rh7s/Bx8kfFkrth9zfTZquoYvdw8URgiqxObQKcpW51Ugz1HjfdZw==", "requires": { "loader-utils": "^1.1.0", "schema-utils": "^1.0.0" @@ -14209,9 +14316,9 @@ "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==" }, "util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", "requires": { "inherits": "2.0.3" }, @@ -14874,9 +14981,9 @@ } }, "which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=" }, "wide-align": { "version": "1.1.3", diff --git a/Source/Tailwind.Traders.Web/ClientApp/src/services/cartService.js b/Source/Tailwind.Traders.Web/ClientApp/src/services/cartService.js index 8a44d00e..5ddb6f77 100644 --- a/Source/Tailwind.Traders.Web/ClientApp/src/services/cartService.js +++ b/Source/Tailwind.Traders.Web/ClientApp/src/services/cartService.js @@ -24,7 +24,7 @@ const CartService = { const product = products.find(product => product.id === detailProduct.id); if (product) { return this.updateQuantity(product._cdbid, product.qty + 1, token) - .then(() => ({message: "Product added on shopping cart"})) + .then(() => ({message: "Product added to shopping cart"})) .catch(() => ({ errMessage: "The product could not be added to the cart" })) } diff --git a/Source/Tailwind.Traders.Web/ClientApp/src/services/configService.js b/Source/Tailwind.Traders.Web/ClientApp/src/services/configService.js index 64d07092..cb79d8cb 100644 --- a/Source/Tailwind.Traders.Web/ClientApp/src/services/configService.js +++ b/Source/Tailwind.Traders.Web/ClientApp/src/services/configService.js @@ -10,12 +10,13 @@ const B2cAuthority = process.env.REACT_APP_B2CAUTHORITY; const B2cClientId = process.env.REACT_APP_B2CCLIENTID; const B2cScopes = process.env.REACT_APP_B2CSCOPES; -const _HeadersConfig = (token, devspaces = undefined) => { +const _HeadersConfig = (token, lpkRouteHeader = undefined) => { const headers = token ? { Authorization: `Bearer ${token}` } : {}; - if (devspaces) { - headers['kubernetes-route-as'] = devspaces; - } + if (lpkRouteHeader) { + headers['kubernetes-route-as'] = lpkRouteHeader; + } + console.log("kubernetes-route-as= ", lpkRouteHeader); return { headers: headers }; }; @@ -44,14 +45,14 @@ const ConfigService = { this._B2cScopes = settingsResponse.data.b2CAuth.scopes; } - this._devspacesName = settingsResponse.data.devspacesName; + this._lpkRouteHeader = settingsResponse.data.lpkRouteHeader; this._applicationInsightsIntrumentationKey = settingsResponse.data.applicationInsights.instrumentationKey; this._debugInformation = settingsResponse.data.debugInformation; } }, HeadersConfig(token = undefined) { - return _HeadersConfig(token, this._devspacesName); + return _HeadersConfig(token, this._lpkRouteHeader); } } diff --git a/Source/Tailwind.Traders.Web/Controllers/SettingsController.cs b/Source/Tailwind.Traders.Web/Controllers/SettingsController.cs index b9c29e99..ecdfd68c 100644 --- a/Source/Tailwind.Traders.Web/Controllers/SettingsController.cs +++ b/Source/Tailwind.Traders.Web/Controllers/SettingsController.cs @@ -34,10 +34,10 @@ public SettingsController(IOptionsSnapshot settings, IConfiguration co public ActionResult GetSettings() { var settings = _settings; - if (Request.Headers.TryGetValue("kubernetes-route-as", out var devspaceName)) + if (Request.Headers.TryGetValue("kubernetes-route-as", out var lpkRouteHeader)) { settings = _settings.Clone(); - settings.UseDevspacesName(devspaceName.FirstOrDefault() ?? string.Empty); + settings.UselpkRouteHeader(lpkRouteHeader.FirstOrDefault() ?? string.Empty); } return Ok(settings); } diff --git a/Source/Tailwind.Traders.Web/Settings.cs b/Source/Tailwind.Traders.Web/Settings.cs index 118b052b..539d13cf 100644 --- a/Source/Tailwind.Traders.Web/Settings.cs +++ b/Source/Tailwind.Traders.Web/Settings.cs @@ -6,7 +6,7 @@ public class Settings { public Settings() { - DevspacesName = string.Empty; + LPKRouteHeader = string.Empty; } public string Auth {get; set;} public string ApiUrl {get; set;} @@ -28,11 +28,12 @@ public Settings() public bool ByPassShoppingCartApi {get; set;} // This is set by the SettingsController, do not set via config because will be overriden - public string DevspacesName {get; private set;} + + public string LPKRouteHeader { get; private set; } public string ProductImagesUrl { get; set; } - public void UseDevspacesName(string devspacesName) => DevspacesName = devspacesName; + public void UselpkRouteHeader(string lpkRouteHeader) => LPKRouteHeader = lpkRouteHeader; public PersonalizerSettings Personalizer { get; set; } diff --git a/Source/Tailwind.Traders.Web/Standalone/Controllers/ShoppingCartController.cs b/Source/Tailwind.Traders.Web/Standalone/Controllers/ShoppingCartController.cs index 2f9ba4a0..a3164e0a 100644 --- a/Source/Tailwind.Traders.Web/Standalone/Controllers/ShoppingCartController.cs +++ b/Source/Tailwind.Traders.Web/Standalone/Controllers/ShoppingCartController.cs @@ -57,7 +57,7 @@ await collection.InsertOneAsync(new ShoppingCartItemDocument return Created("/api/v1/shoppingcart", new { - message = "Product added on shopping cart", + message = "Product added to shopping cart", id = guid }); } diff --git a/Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj b/Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj index 61586d41..18a51d60 100644 --- a/Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj +++ b/Source/Tailwind.Traders.Web/Tailwind.Traders.Web.csproj @@ -18,6 +18,7 @@ + diff --git a/Source/Tailwind.Traders.Web/azds.yaml b/Source/Tailwind.Traders.Web/azds.yaml deleted file mode 100644 index bcafb9e3..00000000 --- a/Source/Tailwind.Traders.Web/azds.yaml +++ /dev/null @@ -1,44 +0,0 @@ -kind: helm-release -apiVersion: 1.1 -build: - context: . - dockerfile: Dockerfile -install: - chart: ../../Deploy/helm/web - values: - - ../../Deploy/helm/gvalues.azds.yaml - - values.dev.yaml? - - secrets.dev.yaml? - set: - replicaCount: 1 - image: - repository: tailwindtradersweb - tag: $(tag) - pullPolicy: Never - ingress: - annotations: - kubernetes.io/ingress.class: traefik-azds - hosts: - # This expands to form the service's public URL: [space.s.][rootSpace.]tailwindtradersweb...azds.io - # Customize the public URL by changing the 'tailwindtradersweb' text between the $(rootSpacePrefix) and $(hostSuffix) tokens - # For more information see https://aka.ms/devspaces/routing - - $(spacePrefix)$(rootSpacePrefix)ttweb$(hostSuffix) - apihost: $(spacePrefix)$(rootSpacePrefix)tt$(hostSuffix) -configurations: - develop: - build: - dockerfile: Dockerfile.develop - useGitIgnore: true - args: - BUILD_CONFIGURATION: ${BUILD_CONFIGURATION:-Debug} - container: - sync: - - "**/Pages/**" - - "**/Views/**" - - "**/wwwroot/**" - - "!**/*.{sln,csproj}" - command: [dotnet, run, --no-restore, --no-build, --no-launch-profile, -c, "${BUILD_CONFIGURATION:-Debug}"] - iterate: - processesToKill: [dotnet, vsdbg] - buildCommands: - - [dotnet, build, --no-restore, -c, "${BUILD_CONFIGURATION:-Debug}"] diff --git a/makefile b/makefile new file mode 100644 index 00000000..913f9182 --- /dev/null +++ b/makefile @@ -0,0 +1,20 @@ +BRANCH ?= jessica-node-player-fix +CONTAINER ?= twt-apps30 +resourceGroup ?= live-igniteapps30 +subName ?= "Ignite The Tour" +webappName ?= liveigniteapps30 +acrName ?= liveigniteapps30acr +sqlDBName ?= liveapps30twtsql + +.PHONY: clean + +clean: + -make docker-clean + -make az-clean + +docker-clean: + docker rm -f $(CONTAINER) + +az-clean: + -az webapp delete --resource-group $(resourceGroup) --name $(webappName) + -az appservice plan delete --resource-group $(resourceGroup) --name $(webappName) -y \ No newline at end of file diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000..48e341a0 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,3 @@ +{ + "lockfileVersion": 1 +} From fdb1369f1841c1eb498f268e3b102f5bda8fecd4 Mon Sep 17 00:00:00 2001 From: jldeen Date: Mon, 1 Feb 2021 16:27:05 -0800 Subject: [PATCH 3/3] Update workflow tags to .NET 5.0 --- .github/workflows/tt-website.cicd.yml | 6 +++--- makefile | 20 -------------------- 2 files changed, 3 insertions(+), 23 deletions(-) delete mode 100644 makefile diff --git a/.github/workflows/tt-website.cicd.yml b/.github/workflows/tt-website.cicd.yml index 0b7390b7..0f6f2040 100644 --- a/.github/workflows/tt-website.cicd.yml +++ b/.github/workflows/tt-website.cicd.yml @@ -19,7 +19,7 @@ jobs: - name: Docker build working-directory: Source/Tailwind.Traders.Web run: | - docker build . --build-arg sdkTag=3.1 --build-arg runtimeTag=3.1 -t tailwindtraders/web:gh-${{ github.sha }} -t latest + docker build . --build-arg sdkTag=5.0 --build-arg runtimeTag=5.0 -t tailwindtraders/web:gh-${{ github.sha }} -t latest main-build: if: ${{ github.ref == 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.merged == true) }} @@ -31,7 +31,7 @@ jobs: - name: Docker build working-directory: Source/Tailwind.Traders.Web run: | - docker build . --build-arg sdkTag=3.1 --build-arg runtimeTag=3.1 -t tailwindtraders/web:gh-${{ github.sha }} -t latest + docker build . --build-arg sdkTag=5.0 --build-arg runtimeTag=5.0 -t tailwindtraders/web:gh-${{ github.sha }} -t latest nightly-build-and-deploy: if: ${{ github.event_name == 'schedule' }} @@ -53,7 +53,7 @@ jobs: - name: Docker build and push working-directory: Source/Tailwind.Traders.Web run: | - docker build . --build-arg sdkTag=3.1 --build-arg runtimeTag=3.1 -t tailwindtraders/web:gh-${{ github.sha }} -t latest + docker build . --build-arg sdkTag=5.0 --build-arg runtimeTag=5.0 -t tailwindtraders/web:gh-${{ github.sha }} -t latest docker push tailwindtraders/web:gh-${{ github.sha }} - uses: azure/webapps-deploy@v2 diff --git a/makefile b/makefile deleted file mode 100644 index 913f9182..00000000 --- a/makefile +++ /dev/null @@ -1,20 +0,0 @@ -BRANCH ?= jessica-node-player-fix -CONTAINER ?= twt-apps30 -resourceGroup ?= live-igniteapps30 -subName ?= "Ignite The Tour" -webappName ?= liveigniteapps30 -acrName ?= liveigniteapps30acr -sqlDBName ?= liveapps30twtsql - -.PHONY: clean - -clean: - -make docker-clean - -make az-clean - -docker-clean: - docker rm -f $(CONTAINER) - -az-clean: - -az webapp delete --resource-group $(resourceGroup) --name $(webappName) - -az appservice plan delete --resource-group $(resourceGroup) --name $(webappName) -y \ No newline at end of file