Skip to content

Commit 9fbf677

Browse files
Runtime workarounds, Upgrade of SixLabors for .net core 2.1
1 parent ce42e95 commit 9fbf677

File tree

12 files changed

+2242
-2234
lines changed

12 files changed

+2242
-2234
lines changed

categories/deploy/microservice.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
"type": "config",
9999
"apiVersion": "2014-11-01",
100100
"properties": {
101-
"FUNCTIONS_EXTENSION_VERSION": "2.0.11651-alpha",
101+
"FUNCTIONS_EXTENSION_VERSION": "beta",
102102
"APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(resourceId('Microsoft.Insights/components', variables('applicationInsightsName')), '2014-04-01').InstrumentationKey]",
103103
"EventGridTopicEndpoint": "[reference(variables('eventGridTopicResourceId'), '2018-01-01').endpoint]",
104104
"EventGridTopicKey": "[listKeys(variables('eventGridTopicResourceId'), '2018-01-01').key1]",
@@ -142,7 +142,7 @@
142142
"type": "config",
143143
"apiVersion": "2014-11-01",
144144
"properties": {
145-
"FUNCTIONS_EXTENSION_VERSION": "2.0.11651-alpha",
145+
"FUNCTIONS_EXTENSION_VERSION": "beta",
146146
"APPINSIGHTS_INSTRUMENTATIONKEY": "[reference(resourceId('Microsoft.Insights/components', variables('applicationInsightsName')), '2014-04-01').InstrumentationKey]",
147147
"EventGridTopicEndpoint": "[reference(variables('eventGridTopicResourceId'), '2018-01-01').endpoint]",
148148
"EventGridTopicKey": "[listKeys(variables('eventGridTopicResourceId'), '2018-01-01').key1]",

images/src/ContentReactor.Images/ContentReactor.Images.Services.Tests/ContentReactor.Images.Services.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<ItemGroup>
1515
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.6.1" />
1616
<PackageReference Include="Moq" Version="4.8.2" />
17-
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0002" />
17+
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0004" />
1818
<PackageReference Include="xunit" Version="2.3.1" />
1919
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
2020
<DotNetCliToolReference Include="dotnet-xunit" Version="2.3.1" />

images/src/ContentReactor.Images/ContentReactor.Images.Services.Tests/ImagePreviewServiceTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System.IO;
22
using System.Reflection;
33
using SixLabors.ImageSharp;
4-
using SixLabors.ImageSharp.Helpers;
54
using SixLabors.Primitives;
65
using Xunit;
76

images/src/ContentReactor.Images/ContentReactor.Images.Services/ContentReactor.Images.Services.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0002" />
8+
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0-beta0004" />
99
</ItemGroup>
1010

1111
<ItemGroup>

images/src/ContentReactor.Images/ContentReactor.Images.Services/ImagePreviewService.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
using System.IO;
22
using SixLabors.ImageSharp;
33
using SixLabors.ImageSharp.Formats.Jpeg;
4+
using SixLabors.ImageSharp.Processing;
5+
using SixLabors.ImageSharp.Processing.Transforms;
46

57
namespace ContentReactor.Images.Services
68
{

scripts/build.sh

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ echo "Building Categories Microservice..."
2424
HOME=`pwd`
2525
cd $HOME/categories/src/ContentReactor.Categories
2626
dotnet build
27+
cd $HOME/categories/src/ContentReactor.Categories/ContentReactor.Categories.Services.Tests
2728
dotnet test
29+
cd $HOME/categories/src/ContentReactor.Categories
2830
dotnet publish -c Release
29-
cd $HOME
3031
cd $HOME/categories/src/ContentReactor.Categories/ContentReactor.Categories.Api/bin/Release/netstandard2.0
3132
zip -r ContentReactor.Categories.Api.zip .
3233
cd $HOME/categories/src/ContentReactor.Categories/ContentReactor.Categories.WorkerApi/bin/Release/netstandard2.0
@@ -36,9 +37,10 @@ zip -r ContentReactor.Categories.WorkerApi.zip .
3637
echo "Building Images Microservice..."
3738
cd $HOME/images/src/ContentReactor.Images
3839
dotnet build
40+
cd $HOME/images/src/ContentReactor.Images/ContentReactor.Images.Services.Tests
3941
dotnet test
42+
cd $HOME/images/src/ContentReactor.Images
4043
dotnet publish -c Release
41-
cd $HOME
4244
cd $HOME/images/src/ContentReactor.Images/ContentReactor.Images.Api/bin/Release/netstandard2.0
4345
zip -r ContentReactor.Images.Api.zip .
4446
cd $HOME/images/src/ContentReactor.Images/ContentReactor.Images.WorkerApi/bin/Release/netstandard2.0
@@ -47,9 +49,10 @@ zip -r ContentReactor.Images.WorkerApi.zip .
4749
echo "Building Audio Microservice..."
4850
cd $HOME/audio/src/ContentReactor.Audio
4951
dotnet build
52+
cd $HOME/audio/src/ContentReactor.Audio/ContentReactor.Audio.Services.Tests
5053
dotnet test
54+
cd $HOME/audio/src/ContentReactor.Audio
5155
dotnet publish -c Release
52-
cd $HOME
5356
cd $HOME/audio/src/ContentReactor.Audio/ContentReactor.Audio.Api/bin/Release/netstandard2.0
5457
zip -r ContentReactor.Audio.Api.zip .
5558
cd $HOME/audio/src/ContentReactor.Audio/ContentReactor.Audio.WorkerApi/bin/Release/netstandard2.0
@@ -58,9 +61,22 @@ zip -r ContentReactor.Audio.WorkerApi.zip .
5861
echo "Building Text Microservice..."
5962
cd $HOME/text/src/ContentReactor.Text
6063
dotnet build
64+
cd $HOME/text/src/ContentReactor.Text/ContentReactor.Text.Services.Tests
6165
dotnet test
66+
cd $HOME/text/src/ContentReactor.Text
6267
dotnet publish -c Release
63-
cd $HOME
6468
cd $HOME/text/src/ContentReactor.Text/ContentReactor.Text.Api/bin/Release/netstandard2.0
6569
zip -r ContentReactor.Text.Api.zip .
6670

71+
echo "Building proxy artifact..."
72+
cd $HOME/proxy/proxies
73+
zip -r proxies.zip .
74+
75+
echo "Building Web..."
76+
cd $HOME/web/src/signalr-web/SignalRMiddleware/EventApp
77+
npm install
78+
npm run ubuntu-dev-build
79+
cd $HOME/web/src/signalr-web/SignalRMiddleware/
80+
dotnet build
81+
dotnet test
82+
dotnet publish -c Release

scripts/deploy.sh

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ AUDIO_API_NAME=craudapi$uniqueSuffixString
8686
AUDIO_WORKER_API_NAME=craudwapi$uniqueSuffixString
8787

8888
echo "Creating Audio Blob Storage..."
89-
=AUDIO_BLOB_STORAGE_ACCOUNT_NAME=craudblob$uniqueSuffixString
89+
AUDIO_BLOB_STORAGE_ACCOUNT_NAME=craudblob$uniqueSuffixString
9090
az storage container create --account-name $AUDIO_BLOB_STORAGE_ACCOUNT_NAME --name audio
9191

9292
echo "Creating CORS Policy for Blob Storage"
93-
=az storage cors clear --account-name $AUDIO_BLOB_STORAGE_ACCOUNT_NAME --services b
93+
az storage cors clear --account-name $AUDIO_BLOB_STORAGE_ACCOUNT_NAME --services b
9494
az storage cors add --account-name $AUDIO_BLOB_STORAGE_ACCOUNT_NAME --services b --methods POST GET PUT --origins * --allowed-headers * --exposed-headers *
9595

9696
echo "Deploying Audio Functions..."
97-
=az webapp deployment source config-zip --resource-group ContentReactor-Audio --name $AUDIO_API_NAME --src $HOME/audio/src/ContentReactor.Audio/ContentReactor.Audio.Api/bin/Release/netstandard2.0/ContentReactor.Audio.Api.zip
97+
az webapp deployment source config-zip --resource-group ContentReactor-Audio --name $AUDIO_API_NAME --src $HOME/audio/src/ContentReactor.Audio/ContentReactor.Audio.Api/bin/Release/netstandard2.0/ContentReactor.Audio.Api.zip
9898
az webapp deployment source config-zip --resource-group ContentReactor-Audio --name $AUDIO_WORKER_API_NAME --src $HOME/audio/src/ContentReactor.Audio/ContentReactor.Audio.WorkerApi/bin/Release/netstandard2.0/ContentReactor.Audio.WorkerApi.zip
9999

100100
echo "Deploying Event Grid Subscription for Audio"
@@ -123,10 +123,11 @@ PROXY_API_NAME=crapiproxy$uniqueSuffixString
123123
az webapp deployment source config-zip --resource-group ContentReactor-Proxy --name $PROXY_API_NAME --src $HOME/proxy/proxies/proxies.zip
124124

125125
# Deploy Web
126-
#cho "Starting deploy of Web..."
127-
#az group create -n ContentReactor-Web -l westus2
126+
echo "Starting deploy of Web..."
127+
az group create -n ContentReactor-Web -l westus2
128128

129-
#az group deployment create --name ContentReactorWeb-Deployment --resource-group ContentReactor-Web --template-file $HOME/web/deploy/template.json --parameters uniqueResourceNameSuffix=$uniqueSuffixString functionAppProxyName=crapiproxy$uniqueSuffixString
130-
#WEB_APP_NAME=crweb$uniqueSuffixString
129+
az group deployment create --name ContentReactorWeb-Deployment --resource-group ContentReactor-Web --template-file $HOME/web/deploy/template.json --parameters uniqueResourceNameSuffix=$uniqueSuffixString functionAppProxyName=crapiproxy$uniqueSuffixString
130+
WEB_APP_NAME=crweb$uniqueSuffixString
131131

132-
#az webapp deployment source config-zip --resource-group ContentReactor-Web --name $WEB_APP_NAME --src $HOME/web/src/signalr-web/SignalRMiddleware/SignalRMiddleware/obj/Release/netcoreapp2.1/SignalRMiddleware.dll
132+
az webapp deployment source config-zip --resource-group ContentReactor-Web --name $WEB_APP_NAME --src $HOME/web/src/signalr-web/SignalRMiddleware/SignalRMiddleware/bin/Release/netcoreapp2.1/publish/SignalRMiddleware.zip
133+
az group deployment create -g ContentReactor-Events --template-file $HOME/web/deploy/eventGridSubscriptions.json --parameters eventGridTopicName=c$EVENT_GRID_TOPIC_NAME appServiceName=$WEB_APP_NAME

shared/src/ContentReactor.Shared/EventGridSubscriberService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public IActionResult HandleSubscriptionValidationEvent(HttpRequest req)
4141

4242
foreach (var dataEvent in data)
4343
{
44-
if (req.Headers.Contains(new KeyValuePair<string, StringValues>(EventGridSubscriptionValidationHeaderKey, "SubscriptionValidation")) &&
44+
if (req.Headers.TryGetValue(EventGridSubscriptionValidationHeaderKey, out StringValues values) && values.Equals("SubscriptionValidation") &&
4545
dataEvent.eventType == "Microsoft.EventGrid.SubscriptionValidationEvent")
4646
{
4747
// this is a special event type that needs an echo response for Event Grid to work

web/deploy/template.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,6 @@
9494
"FUNCTION_API_PROXY_ROOT": "[variables('functionAppProxyUrl')]",
9595
"WEBSITE_NODE_DEFAULT_VERSION" : "6.9.1"
9696
}
97-
},
98-
{
99-
"type": "siteextensions",
100-
"name": "AspNetCoreRuntime",
101-
"apiVersion": "2016-08-01",
102-
"location": "[resourceGroup().location]",
103-
"properties": {
104-
"version": "[parameters('aspnetcoreVersion')]"
105-
},
106-
"dependsOn": [
107-
"[resourceId('Microsoft.Web/sites', variables('appServiceName'))]"
108-
]
10997
}
11098
],
11199
"tags": {

0 commit comments

Comments
 (0)