Skip to content

Commit 3c1e52f

Browse files
committed
Merge branch 'v9/contrib' into temp-11381
2 parents aee9bbb + e5549b7 commit 3c1e52f

File tree

20 files changed

+38902
-5769
lines changed

20 files changed

+38902
-5769
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ There are two big areas that you should know about:
159159
You may need to run the following commands to set up gulp properly:
160160
```
161161
npm cache clean --force
162-
npm install
162+
npm ci
163163
npm run build
164164
```
165165
The caching for the back office has been described as 'aggressive' so we often find it's best when making back office changes to disable caching in the browser to help you to see the changes you're making.

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ cypress.env.json
9090
tests/Umbraco.Tests.AcceptanceTest/cypress/screenshots/
9191
tests/Umbraco.Tests.AcceptanceTest/cypress/support/chainable.ts
9292
tests/Umbraco.Tests.AcceptanceTest/cypress/videos/
93-
tests/Umbraco.Tests.AcceptanceTest/package-lock.json
9493
tests/Umbraco.Tests.Integration.SqlCe/DatabaseContextTests.sdf
9594
tests/Umbraco.Tests.Integration.SqlCe/umbraco/Data/TEMP/
9695
tests/Umbraco.Tests.Integration/TEMP/*

.vscode/launch.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"args": [],
1515
"cwd": "${workspaceFolder}/src/Umbraco.Web.UI",
1616
"stopAtEntry": false,
17+
"requireExactSource": false,
1718
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
1819
"serverReadyAction": {
1920
"action": "openExternally",

build/azure-pipelines.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ variables:
33
buildConfiguration: Release
44
SA_PASSWORD: UmbracoIntegration123!
55
UmbracoBuild: AzurePipeline
6+
nodeVersion: 14.18.1
67
resources:
78
containers:
89
- container: mssql
@@ -194,12 +195,13 @@ stages:
194195
# command: build
195196
# projects: '**/Umbraco.Web.UI.csproj'
196197
- task: NodeTool@0
197-
displayName: Use Node 11.x
198+
displayName: Use Node $(nodeVersion)
198199
inputs:
199-
versionSpec: 11.x
200+
versionSpec: $(nodeVersion)
200201
- task: Npm@1
201-
displayName: npm install (Client)
202+
displayName: npm ci (Client)
202203
inputs:
204+
command: ci
203205
workingDir: src\Umbraco.Web.UI.Client
204206
verbose: false
205207
- task: gulp@0
@@ -220,8 +222,9 @@ stages:
220222
@{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "tests\Umbraco.Tests.AcceptanceTest\cypress.env.json"
221223
- task: Npm@1
222224
name: PrepareTask
223-
displayName: npm install (AcceptanceTest)
225+
displayName: npm ci (AcceptanceTest)
224226
inputs:
227+
command: ci
225228
workingDir: 'tests\Umbraco.Tests.AcceptanceTest'
226229
- task: Npm@1
227230
displayName: Run Cypress (Desktop)
@@ -287,12 +290,13 @@ stages:
287290
DBNAME: $(UmbracoDatabaseName)
288291
SA_PASSWORD: $(SA_PASSWORD)
289292
- task: NodeTool@0
290-
displayName: Use Node 11.x
293+
displayName: Use Node $(nodeVersion)
291294
inputs:
292-
versionSpec: 11.x
295+
versionSpec: $(nodeVersion)
293296
- task: Npm@1
294-
displayName: npm install (Client)
297+
displayName: npm ci (Client)
295298
inputs:
299+
command: ci
296300
workingDir: src/Umbraco.Web.UI.Client
297301
verbose: false
298302
- task: gulp@0
@@ -301,11 +305,16 @@ stages:
301305
gulpFile: src/Umbraco.Web.UI.Client/gulpfile.js
302306
targets: build
303307
workingDirectory: src/Umbraco.Web.UI.Client
308+
- task: DotNetCoreCLI@2
309+
displayName: dotnet build
310+
inputs:
311+
command: build
312+
projects: src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
304313
- task: Bash@3
305314
displayName: dotnet run
306315
inputs:
307316
targetType: 'inline'
308-
script: 'nohup dotnet run -p ./src/Umbraco.Web.UI/Umbraco.Web.UI.csproj &'
317+
script: 'nohup dotnet run --no-build -p ./src/Umbraco.Web.UI/ > $(Build.ArtifactStagingDirectory)/dotnet_run_log_linux.txt &'
309318
- task: Bash@3
310319
displayName: Generate Cypress.env.json
311320
inputs:
@@ -316,8 +325,9 @@ stages:
316325
PASSWORD: $(Umbraco__CMS__Unattended__UnattendedUserPassword)
317326
- task: Npm@1
318327
name: PrepareTask
319-
displayName: npm install (AcceptanceTest)
328+
displayName: npm ci (AcceptanceTest)
320329
inputs:
330+
command: ci
321331
workingDir: 'tests/Umbraco.Tests.AcceptanceTest'
322332
- task: Npm@1
323333
displayName: Run Cypress (Desktop)
@@ -327,7 +337,6 @@ stages:
327337
workingDir: tests/Umbraco.Tests.AcceptanceTest
328338
command: 'custom'
329339
customCommand: 'run test -- --reporter junit --reporter-options "mochaFile=results/test-output-D-[hash].xml,toConsole=true" --config="viewportHeight=1600,viewportWidth=2560,screenshotsFolder=cypress/artifacts/desktop/screenshots,videosFolder=cypress/artifacts/desktop/videos,videoUploadOnPasses=false"'
330-
331340
- task: PublishTestResults@2
332341
condition: always()
333342
inputs:
@@ -356,6 +365,12 @@ stages:
356365
inputs:
357366
targetPath: '$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/cypress/artifacts'
358367
artifact: 'Test artifacts - Linux'
368+
- task: PublishPipelineArtifact@1
369+
displayName: "Publish run log"
370+
condition: failed()
371+
inputs:
372+
targetPath: '$(Build.ArtifactStagingDirectory)/dotnet_run_log_linux.txt'
373+
artifact: Test Run logs - Linux
359374
- stage: Artifacts
360375
dependsOn: []
361376
jobs:
@@ -443,12 +458,13 @@ stages:
443458
444459
$ubuild.CompileJsonSchema()
445460
- task: NodeTool@0
446-
displayName: Use Node 11.x
461+
displayName: Use Node $(nodeVersion)
447462
inputs:
448-
versionSpec: 11.x
463+
versionSpec: $(nodeVersion)
449464
- task: Npm@1
450-
displayName: npm install
465+
displayName: npm ci (Client)
451466
inputs:
467+
command: ci
452468
workingDir: src\Umbraco.Web.UI.Client
453469
verbose: false
454470
- task: gulp@0

build/build.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,10 @@
119119
npm cache clean --force >> $log 2>&1
120120
$error.Clear() # that one can fail 'cos security bug - ignore
121121

122-
Write-Output "### npm install" >> $log 2>&1
123-
npm install >> $log 2>&1
122+
Write-Output "### npm ci" >> $log 2>&1
123+
npm ci >> $log 2>&1
124124
Write-Output ">> $? $($error.Count)" >> $log 2>&1
125-
# Don't really care about the messages from npm install making us think there are errors
125+
# Don't really care about the messages from npm ci making us think there are errors
126126
$error.Clear()
127127

128128
Write-Output "### gulp build for version $($this.Version.Release)" >> $log 2>&1
@@ -489,7 +489,7 @@
489489
cd $src\Umbraco.Web.UI.Docs
490490

491491
"Generating the docs and waiting before executing the next commands"
492-
& npm install
492+
& npm ci
493493
& npx gulp docs
494494

495495
Pop-Location

src/Umbraco.PublishedCache.NuCache/ContentStore.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ private bool BuildKit(ContentNodeKit kit, out LinkedNode<ContentNode> parent)
524524
parent = GetParentLink(kit.Node, null);
525525
if (parent == null)
526526
{
527-
_logger.LogWarning("Skip item id={kit.Node.Id}, could not find parent id={kit.Node.ParentContentId}.", kit.Node.Id, kit.Node.ParentContentId);
527+
_logger.LogWarning("Skip item id={kitNodeId}, could not find parent id={kitNodeParentContentId}.", kit.Node.Id, kit.Node.ParentContentId);
528528
return false;
529529
}
530530

@@ -533,21 +533,21 @@ private bool BuildKit(ContentNodeKit kit, out LinkedNode<ContentNode> parent)
533533
// because the data sort operation is by path.
534534
if (parent.Value == null)
535535
{
536-
_logger.LogWarning("Skip item id={kit.Node.Id}, no Data assigned for linked node with path {kit.Node.Path} and parent id {kit.Node.ParentContentId}. This can indicate data corruption for the Path value for node {kit.Node.Id}. See the Health Check dashboard in Settings to resolve data integrity issues.", kit.Node.Id, kit.Node.ParentContentId);
536+
_logger.LogWarning("Skip item id={kitNodeId}, no Data assigned for linked node with path {kitNodePath} and parent id {kitNodeParentContentId}. This can indicate data corruption for the Path value for node {kitNodeId}. See the Health Check dashboard in Settings to resolve data integrity issues.", kit.Node.Id, kit.Node.Path, kit.Node.ParentContentId, kit.Node.Id);
537537
return false;
538538
}
539539

540540
// make sure the kit is valid
541541
if (kit.DraftData == null && kit.PublishedData == null)
542542
{
543-
_logger.LogWarning("Skip item id={kit.Node.Id}, both draft and published data are null.", kit.Node.Id);
543+
_logger.LogWarning("Skip item id={kitNodeId}, both draft and published data are null.", kit.Node.Id);
544544
return false;
545545
}
546546

547547
// unknown = bad
548548
if (_contentTypesById.TryGetValue(kit.ContentTypeId, out var link) == false || link.Value == null)
549549
{
550-
_logger.LogWarning("Skip item id={kit.Node.Id}, could not find content type id={kit.ContentTypeId}.", kit.Node.Id, kit.ContentTypeId);
550+
_logger.LogWarning("Skip item id={kitNodeId}, could not find content type id={kitContentTypeId}.", kit.Node.Id, kit.ContentTypeId);
551551
return false;
552552
}
553553

@@ -723,7 +723,7 @@ public bool SetAllFastSortedLocked(IEnumerable<ContentNodeKit> kits, bool fromDb
723723
previousNode = null; // there is no previous sibling
724724
}
725725

726-
_logger.LogDebug("Set {thisNode.Id} with parent {thisNode.ParentContentId}", thisNode.Id, thisNode.ParentContentId);
726+
_logger.LogDebug("Set {thisNodeId} with parent {thisNodeParentContentId}", thisNode.Id, thisNode.ParentContentId);
727727
SetValueLocked(_contentNodes, thisNode.Id, thisNode);
728728

729729
// if we are initializing from the database source ensure the local db is updated
@@ -780,7 +780,7 @@ public bool SetAllLocked(IEnumerable<ContentNodeKit> kits)
780780
ok = false;
781781
continue; // skip that one
782782
}
783-
_logger.LogDebug("Set {kit.Node.Id} with parent {kit.Node.ParentContentId}", kit.Node.Id, kit.Node.ParentContentId);
783+
_logger.LogDebug("Set {kitNodeId} with parent {kitNodeParentContentId}", kit.Node.Id, kit.Node.ParentContentId);
784784
SetValueLocked(_contentNodes, kit.Node.Id, kit.Node);
785785

786786
if (_localDb != null) RegisterChange(kit.Node.Id, kit);

src/Umbraco.Web.UI.Client/gulpfile.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,15 @@ const { watchTask } = require('./gulp/tasks/watchTask');
2424
// set default current compile mode:
2525
config.compile.current = config.compile.build;
2626

27+
const coreBuild = parallel(dependencies, js, less, views);
28+
2729
// ***********************************************************
2830
// These Exports are the new way of defining Tasks in Gulp 4.x
2931
// ***********************************************************
30-
exports.build = series(parallel(dependencies, js, less, views), testUnit);
31-
exports.dev = series(setDevelopmentMode, parallel(dependencies, js, less, views), runUnitTestServer, watchTask);
32+
33+
exports.build = series(coreBuild, testUnit);
34+
exports.coreBuild = coreBuild;
35+
exports.dev = series(setDevelopmentMode, coreBuild, runUnitTestServer, watchTask);
3236
exports.watch = series(watchTask);
3337
//
3438
exports.runTests = series(setTestMode, series(js, testUnit));

0 commit comments

Comments
 (0)