Restore BelleBuild target (for back-office assets) and use npm ci (#11364)
Co-authored-by: Ronald Barendse <ronald@barend.se>
This commit is contained in:
2
.github/CONTRIBUTING.md
vendored
2
.github/CONTRIBUTING.md
vendored
@@ -159,7 +159,7 @@ There are two big areas that you should know about:
|
||||
You may need to run the following commands to set up gulp properly:
|
||||
```
|
||||
npm cache clean --force
|
||||
npm install
|
||||
npm ci
|
||||
npm run build
|
||||
```
|
||||
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.
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -90,7 +90,6 @@ cypress.env.json
|
||||
tests/Umbraco.Tests.AcceptanceTest/cypress/screenshots/
|
||||
tests/Umbraco.Tests.AcceptanceTest/cypress/support/chainable.ts
|
||||
tests/Umbraco.Tests.AcceptanceTest/cypress/videos/
|
||||
tests/Umbraco.Tests.AcceptanceTest/package-lock.json
|
||||
tests/Umbraco.Tests.Integration.SqlCe/DatabaseContextTests.sdf
|
||||
tests/Umbraco.Tests.Integration.SqlCe/umbraco/Data/TEMP/
|
||||
tests/Umbraco.Tests.Integration/TEMP/*
|
||||
|
||||
@@ -3,6 +3,7 @@ variables:
|
||||
buildConfiguration: Release
|
||||
SA_PASSWORD: UmbracoIntegration123!
|
||||
UmbracoBuild: AzurePipeline
|
||||
nodeVersion: 14.18.1
|
||||
resources:
|
||||
containers:
|
||||
- container: mssql
|
||||
@@ -194,12 +195,13 @@ stages:
|
||||
# command: build
|
||||
# projects: '**/Umbraco.Web.UI.csproj'
|
||||
- task: NodeTool@0
|
||||
displayName: Use Node 11.x
|
||||
displayName: Use Node $(nodeVersion)
|
||||
inputs:
|
||||
versionSpec: 11.x
|
||||
versionSpec: $(nodeVersion)
|
||||
- task: Npm@1
|
||||
displayName: npm install (Client)
|
||||
displayName: npm ci (Client)
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: src\Umbraco.Web.UI.Client
|
||||
verbose: false
|
||||
- task: gulp@0
|
||||
@@ -220,8 +222,9 @@ stages:
|
||||
@{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "tests\Umbraco.Tests.AcceptanceTest\cypress.env.json"
|
||||
- task: Npm@1
|
||||
name: PrepareTask
|
||||
displayName: npm install (AcceptanceTest)
|
||||
displayName: npm ci (AcceptanceTest)
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: 'tests\Umbraco.Tests.AcceptanceTest'
|
||||
- task: Npm@1
|
||||
displayName: Run Cypress (Desktop)
|
||||
@@ -287,12 +290,13 @@ stages:
|
||||
DBNAME: $(UmbracoDatabaseName)
|
||||
SA_PASSWORD: $(SA_PASSWORD)
|
||||
- task: NodeTool@0
|
||||
displayName: Use Node 11.x
|
||||
displayName: Use Node $(nodeVersion)
|
||||
inputs:
|
||||
versionSpec: 11.x
|
||||
versionSpec: $(nodeVersion)
|
||||
- task: Npm@1
|
||||
displayName: npm install (Client)
|
||||
displayName: npm ci (Client)
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: src/Umbraco.Web.UI.Client
|
||||
verbose: false
|
||||
- task: gulp@0
|
||||
@@ -301,11 +305,16 @@ stages:
|
||||
gulpFile: src/Umbraco.Web.UI.Client/gulpfile.js
|
||||
targets: build
|
||||
workingDirectory: src/Umbraco.Web.UI.Client
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: dotnet build
|
||||
inputs:
|
||||
command: build
|
||||
projects: src/Umbraco.Web.UI/Umbraco.Web.UI.csproj
|
||||
- task: Bash@3
|
||||
displayName: dotnet run
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: 'nohup dotnet run -p ./src/Umbraco.Web.UI/Umbraco.Web.UI.csproj &'
|
||||
script: 'nohup dotnet run --no-build -p ./src/Umbraco.Web.UI/ > $(Build.ArtifactStagingDirectory)/dotnet_run_log_linux.txt &'
|
||||
- task: Bash@3
|
||||
displayName: Generate Cypress.env.json
|
||||
inputs:
|
||||
@@ -316,8 +325,9 @@ stages:
|
||||
PASSWORD: $(Umbraco__CMS__Unattended__UnattendedUserPassword)
|
||||
- task: Npm@1
|
||||
name: PrepareTask
|
||||
displayName: npm install (AcceptanceTest)
|
||||
displayName: npm ci (AcceptanceTest)
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: 'tests/Umbraco.Tests.AcceptanceTest'
|
||||
- task: Npm@1
|
||||
displayName: Run Cypress (Desktop)
|
||||
@@ -327,7 +337,6 @@ stages:
|
||||
workingDir: tests/Umbraco.Tests.AcceptanceTest
|
||||
command: 'custom'
|
||||
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"'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
condition: always()
|
||||
inputs:
|
||||
@@ -356,6 +365,12 @@ stages:
|
||||
inputs:
|
||||
targetPath: '$(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/cypress/artifacts'
|
||||
artifact: 'Test artifacts - Linux'
|
||||
- task: PublishPipelineArtifact@1
|
||||
displayName: "Publish run log"
|
||||
condition: failed()
|
||||
inputs:
|
||||
targetPath: '$(Build.ArtifactStagingDirectory)/dotnet_run_log_linux.txt'
|
||||
artifact: Test Run logs - Linux
|
||||
- stage: Artifacts
|
||||
dependsOn: []
|
||||
jobs:
|
||||
@@ -443,12 +458,13 @@ stages:
|
||||
|
||||
$ubuild.CompileJsonSchema()
|
||||
- task: NodeTool@0
|
||||
displayName: Use Node 11.x
|
||||
displayName: Use Node $(nodeVersion)
|
||||
inputs:
|
||||
versionSpec: 11.x
|
||||
versionSpec: $(nodeVersion)
|
||||
- task: Npm@1
|
||||
displayName: npm install
|
||||
displayName: npm ci (Client)
|
||||
inputs:
|
||||
command: ci
|
||||
workingDir: src\Umbraco.Web.UI.Client
|
||||
verbose: false
|
||||
- task: gulp@0
|
||||
|
||||
@@ -119,10 +119,10 @@
|
||||
npm cache clean --force >> $log 2>&1
|
||||
$error.Clear() # that one can fail 'cos security bug - ignore
|
||||
|
||||
Write-Output "### npm install" >> $log 2>&1
|
||||
npm install >> $log 2>&1
|
||||
Write-Output "### npm ci" >> $log 2>&1
|
||||
npm ci >> $log 2>&1
|
||||
Write-Output ">> $? $($error.Count)" >> $log 2>&1
|
||||
# Don't really care about the messages from npm install making us think there are errors
|
||||
# Don't really care about the messages from npm ci making us think there are errors
|
||||
$error.Clear()
|
||||
|
||||
Write-Output "### gulp build for version $($this.Version.Release)" >> $log 2>&1
|
||||
@@ -489,7 +489,7 @@
|
||||
cd $src\Umbraco.Web.UI.Docs
|
||||
|
||||
"Generating the docs and waiting before executing the next commands"
|
||||
& npm install
|
||||
& npm ci
|
||||
& npx gulp docs
|
||||
|
||||
Pop-Location
|
||||
|
||||
@@ -24,11 +24,15 @@ const { watchTask } = require('./gulp/tasks/watchTask');
|
||||
// set default current compile mode:
|
||||
config.compile.current = config.compile.build;
|
||||
|
||||
const coreBuild = parallel(dependencies, js, less, views);
|
||||
|
||||
// ***********************************************************
|
||||
// These Exports are the new way of defining Tasks in Gulp 4.x
|
||||
// ***********************************************************
|
||||
exports.build = series(parallel(dependencies, js, less, views), testUnit);
|
||||
exports.dev = series(setDevelopmentMode, parallel(dependencies, js, less, views), runUnitTestServer, watchTask);
|
||||
|
||||
exports.build = series(coreBuild, testUnit);
|
||||
exports.coreBuild = coreBuild;
|
||||
exports.dev = series(setDevelopmentMode, coreBuild, runUnitTestServer, watchTask);
|
||||
exports.watch = series(watchTask);
|
||||
//
|
||||
exports.runTests = series(setTestMode, series(js, testUnit));
|
||||
|
||||
28308
src/Umbraco.Web.UI.Client/package-lock.json
generated
28308
src/Umbraco.Web.UI.Client/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,10 +1,12 @@
|
||||
{
|
||||
"name": "ui",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"test": "gulp runTests",
|
||||
"unit": "gulp runUnit",
|
||||
"e2e": "gulp testE2e",
|
||||
"build": "gulp build",
|
||||
"build:skip-tests": "gulp coreBuild",
|
||||
"dev": "gulp dev",
|
||||
"fastdev": "gulp fastdev",
|
||||
"watch": "gulp watch"
|
||||
|
||||
@@ -5,7 +5,7 @@ This project builds the documentation for the UI of the Umbraco backoffice, it i
|
||||
In order to build the documentation, please follow the following two steps:
|
||||
|
||||
```
|
||||
npm install
|
||||
npm ci
|
||||
npx gulp docs
|
||||
```
|
||||
|
||||
|
||||
8538
src/Umbraco.Web.UI.Docs/package-lock.json
generated
Normal file
8538
src/Umbraco.Web.UI.Docs/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,5 @@
|
||||
{
|
||||
"name": "docs",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"docs": "gulp docs",
|
||||
|
||||
@@ -108,7 +108,8 @@
|
||||
|
||||
</Target>
|
||||
<Target Name="BelleBuild">
|
||||
<!-- <Exec WorkingDirectory="$(ProjectDir)/../../src/Umbraco.Web.UI.Client/" Command="powershell -ExecutionPolicy RemoteSigned -Command '&{ npm install ; npm run build }'" />-->
|
||||
<Exec WorkingDirectory="$(ProjectDir)/../Umbraco.Web.UI.Client/" Command="npm ci" />
|
||||
<Exec WorkingDirectory="$(ProjectDir)/../Umbraco.Web.UI.Client/" Command="npm run build:skip-tests" />
|
||||
</Target>
|
||||
<Target Name="JsonSchemaBuild">
|
||||
<!-- <Exec WorkingDirectory="$(ProjectDir)/../../" Command="powershell -ExecutionPolicy RemoteSigned -Command '&dotnet run --project $pwd/src/JsonSchema/JsonSchema.csproj -c Release -- --outputFile $pwd/src/Umbraco.Web.UI/$(JsonSchemaPath)'" />-->
|
||||
|
||||
@@ -56,9 +56,9 @@
|
||||
<ol>
|
||||
<li>Make sure you have <a href="https://nodejs.org" target="_blank">Node.js</a> installed.</li>
|
||||
<li>Open command prompt and cd to \src\Umbraco.Web.UI.Client.</li>
|
||||
<li>Check to see if \src\Umbraco.Web.UI.Client\node_modules folder exists (this could be hidden); if so delete it.</li>
|
||||
<li>Run npm install; if successfull the node_modules folder should be created in the Umbraco.Web.UI.Client directory.</li>
|
||||
<li>Run build\Build.bat.</li>
|
||||
<li>Check to see if \src\Umbraco.Web.UI.Client\node_modules folder exists (this could be hidden); if so, delete it.</li>
|
||||
<li>Run npm ci; if successfull the node_modules folder should be created in the Umbraco.Web.UI.Client directory.</li>
|
||||
<li>Run \build\build.ps1.</li>
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
|
||||
5022
tests/Umbraco.Tests.AcceptanceTest/package-lock.json
generated
Normal file
5022
tests/Umbraco.Tests.AcceptanceTest/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,6 @@
|
||||
{
|
||||
"name": "acceptancetest",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"postinstall": "node postinstall.js",
|
||||
"config": "node config.js",
|
||||
@@ -7,10 +9,10 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"cross-env": "^7.0.2",
|
||||
"cypress": "^6.7.0",
|
||||
"cypress": "^6.8.0",
|
||||
"del": "^6.0.0",
|
||||
"ncp": "^2.0.0",
|
||||
"prompt": "^1.0.0",
|
||||
"prompt": "^1.2.0",
|
||||
"umbraco-cypress-testhelpers": "^1.0.0-beta-58"
|
||||
},
|
||||
"dependencies": {
|
||||
|
||||
Reference in New Issue
Block a user