diff --git a/.gitignore b/.gitignore
index 0cffac8343..95295e44c4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -201,3 +201,4 @@ src/Umbraco.Tests/TEMP/
/src/Umbraco.Web.UI/config/umbracoSettings.config
/src/Umbraco.Web.UI.NetCore/Umbraco/models/*
+/src/Umbraco.Web.UI.NetCore/appsettings.Local.json
diff --git a/build/NuSpecs/UmbracoCms.StaticAssets.nuspec b/build/NuSpecs/UmbracoCms.StaticAssets.nuspec
new file mode 100644
index 0000000000..b8109dbfa9
--- /dev/null
+++ b/build/NuSpecs/UmbracoCms.StaticAssets.nuspec
@@ -0,0 +1,33 @@
+
+
+
+ Umbraco.Cms.StaticAssets
+ 9.0.0
+ Umbraco Cms Static Assets
+ Umbraco HQ
+ Umbraco HQ
+ MIT
+ https://umbraco.com/
+ https://umbraco.com/dist/nuget/logo-small.png
+ false
+ Contains the static assets that is required to run Umbraco CMS.
+ Contains the static assets that is required to run Umbraco CMS.
+ en-US
+ umbraco
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/NuSpecs/UmbracoCms.nuspec b/build/NuSpecs/UmbracoCms.nuspec
index c031d71704..0c9c914d6c 100644
--- a/build/NuSpecs/UmbracoCms.nuspec
+++ b/build/NuSpecs/UmbracoCms.nuspec
@@ -19,6 +19,7 @@
+
-
-
-
-
-
-
-
-
-
diff --git a/build/NuSpecs/build/Umbraco.Cms.props b/build/NuSpecs/build/Umbraco.Cms.StaticAssets.props
similarity index 100%
rename from build/NuSpecs/build/Umbraco.Cms.props
rename to build/NuSpecs/build/Umbraco.Cms.StaticAssets.props
diff --git a/build/NuSpecs/build/Umbraco.Cms.StaticAssets.targets b/build/NuSpecs/build/Umbraco.Cms.StaticAssets.targets
new file mode 100644
index 0000000000..37b65e320c
--- /dev/null
+++ b/build/NuSpecs/build/Umbraco.Cms.StaticAssets.targets
@@ -0,0 +1,38 @@
+
+
+
+ $(MSBuildThisFileDirectory)..\content\**\*.*
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/NuSpecs/build/Umbraco.Cms.targets b/build/NuSpecs/build/Umbraco.Cms.targets
deleted file mode 100644
index 29d972d480..0000000000
--- a/build/NuSpecs/build/Umbraco.Cms.targets
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
- $(MSBuildThisFileDirectory)..\content\**\*.*
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml
index 5537391bbf..d798e0de48 100644
--- a/build/azure-pipelines.yml
+++ b/build/azure-pipelines.yml
@@ -1,277 +1,529 @@
-#############################################################################
-## ASP.NET Core ##
-## Build and test ASP.NET Core projects targeting .NET Core. ##
-## Runs tests, creates NuGet packages: ##
-## https://docs.microsoft.com/azure/devops/pipelines/languages/dotnet-core ##
-#############################################################################
-
-# Variables & their default values
variables:
- buildConfiguration: 'Release'
- SA_PASSWORD: UmbracoIntegration123!
-
+ buildConfiguration: Release
+ SA_PASSWORD: UmbracoIntegration123!
resources:
- containers:
- - container: mssql
- image: mcr.microsoft.com/mssql/server:2017-latest
- env:
- ACCEPT_EULA: Y
- SA_PASSWORD: $(SA_PASSWORD)
- MSSQL_PID: Developer
- ports:
- - 1433:1433
- options: --name mssql
-
+ containers:
+ - container: mssql
+ image: 'mcr.microsoft.com/mssql/server:2017-latest'
+ env:
+ ACCEPT_EULA: 'Y'
+ SA_PASSWORD: $(SA_PASSWORD)
+ MSSQL_PID: Developer
+ ports:
+ - '1433:1433'
+ options: '--name mssql'
stages:
-- stage: Linux
- dependsOn: [] # this removes the implicit dependency on previous stage and causes this to run in parallel
- jobs:
+ - stage: Unit_Tests
+ displayName: Unit Tests
+ dependsOn: []
+ jobs:
+ - job: Linux_Unit_Tests
+ displayName: Linux
+ pool:
+ vmImage: ubuntu-latest
+ steps:
+ - task: UseDotNet@2
+ displayName: Use .Net Core sdk 5.x
+ inputs:
+ version: 5.x
+ - task: DotNetCoreCLI@2
+ displayName: dotnet test
+ inputs:
+ command: test
+ projects: '**/*.Tests.UnitTests.csproj'
+ - job: MacOS_Unit_Tests
+ displayName: Mac OS
+ pool:
+ vmImage: macOS-latest
+ steps:
+ - task: UseDotNet@2
+ displayName: Use .Net Core sdk 5.x
+ inputs:
+ version: 5.x
+ - task: DotNetCoreCLI@2
+ displayName: dotnet test
+ inputs:
+ command: test
+ projects: '**/*.Tests.UnitTests.csproj'
+ - job: Windows_Unit_Tests
+ displayName: Windows
+ pool:
+ vmImage: windows-latest
+ steps:
+ - task: UseDotNet@2
+ displayName: Use .Net Core sdk 5.x
+ inputs:
+ version: 5.x
+ - task: DotNetCoreCLI@2
+ displayName: dotnet test
+ inputs:
+ command: test
+ projects: '**/*.Tests.UnitTests.csproj'
+ - stage: Integration_Tests
+ displayName: Integration Tests
+ dependsOn: []
+ jobs:
+ - job: Linux_Integration_Tests
+ services:
+ mssql: mssql
+ timeoutInMinutes: 120
+ displayName: Linux
+ pool:
+ vmImage: ubuntu-latest
+ steps:
+ - task: UseDotNet@2
+ displayName: Use .Net Core sdk 5.x
+ inputs:
+ version: 5.x
+ - task: DotNetCoreCLI@2
+ displayName: dotnet test
+ inputs:
+ command: test
+ projects: '**/Umbraco.Tests.Integration.csproj'
+ env:
+ UmbracoIntegrationTestConnectionString: 'Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD);'
+ - job: Windows_Integration_Tests
+ timeoutInMinutes: 120
+ displayName: Windows
+ pool:
+ vmImage: windows-latest
+ steps:
+ - task: UseDotNet@2
+ displayName: Use .Net Core sdk 5.x
+ inputs:
+ version: 5.x
+ - powershell: sqllocaldb start mssqllocaldb
+ displayName: Start MSSQL LocalDb
+ - task: DotNetCoreCLI@2
+ displayName: dotnet test
+ inputs:
+ command: test
+ projects: '**\Umbraco.Tests.Integration.csproj'
+ - stage: Acceptance_Tests
+ displayName: Acceptance Tests
+ dependsOn: []
+ variables:
+ - name: Umbraco__CMS__Unattended__InstallUnattended
+ value: true
+ - name: Umbraco__CMS__Unattended__UnattendedUserName
+ value: Cypress Test
+ - name: Umbraco__CMS__Unattended__UnattendedUserEmail
+ value: cypress@umbraco.com
+ - name: Umbraco__CMS__Unattended__UnattendedUserPassword
+ value: UmbracoAcceptance123!
+ jobs:
+ - job: Windows_Acceptance_tests
+ variables:
+ - name: UmbracoDatabaseServer
+ value: (LocalDB)\MSSQLLocalDB
+ - name: UmbracoDatabaseName
+ value: Cypress
+ - name: ConnectionStrings__umbracoDbDSN
+ value: Server=$(UmbracoDatabaseServer);Database=$(UmbracoDatabaseName);Integrated Security=true;
+ displayName: Windows
+ pool:
+ vmImage: windows-latest
+ steps:
+ - task: UseDotNet@2
+ displayName: Use .Net Core sdk 5.x
+ inputs:
+ version: 5.x
- - job: Unit_Tests
- displayName: 'Unit Tests'
- pool:
- vmImage: 'ubuntu-latest'
- steps:
+ - powershell: sqllocaldb start mssqllocaldb
+ displayName: Start MSSQL LocalDb
+ - powershell: Invoke-Sqlcmd -Query "CREATE DATABASE $env:UmbracoDatabaseName" -ServerInstance $env:UmbracoDatabaseServer
+ displayName: Create database
+# - task: DotNetCoreCLI@2
+# displayName: dotnet build (Netcore)
+# inputs:
+# command: build
+# projects: '**/Umbraco.Web.UI.Netcore.csproj'
+ - task: NodeTool@0
+ displayName: Use Node 11.x
+ inputs:
+ versionSpec: 11.x
+ - task: Npm@1
+ displayName: npm install (Client)
+ inputs:
+ workingDir: src\Umbraco.Web.UI.Client
+ verbose: false
+ - task: gulp@0
+ displayName: gulp build
+ inputs:
+ gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js
+ targets: build
+ workingDirectory: src\Umbraco.Web.UI.Client
+ - powershell: Start-Process -FilePath "dotnet" -ArgumentList "run", "-p", "src\Umbraco.Web.UI.Netcore\Umbraco.Web.UI.Netcore.csproj"
+ displayName: dotnet run (Netcore)
+# - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj
+# displayName: dotnet run (Netcore)
+ - task: PowerShell@1
+ displayName: Generate Cypress.env.json
+ inputs:
+ scriptType: inlineScript
+ inlineScript: >
+ @{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json"
+ - task: Npm@1
+ name: PrepareTask
+ displayName: npm install (AcceptanceTest)
+ inputs:
+ workingDir: 'src\Umbraco.Tests.AcceptanceTest'
+ - task: Npm@1
+ displayName: Run Cypress (Desktop)
+ condition: always()
+ continueOnError: true
+ inputs:
+ workingDir: src\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: UseDotNet@2
- displayName: 'Use .Net Core sdk 5.0.x'
- inputs:
- version: 5.0.x
+ - task: PublishTestResults@2
+ condition: always()
+ inputs:
+ testResultsFormat: 'JUnit'
+ testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml'
+ mergeTestResults: true
+ testRunTitle: "Test results Desktop"
+# - task: Npm@1
+# displayName: Run Cypress (Tablet portrait)
+# condition: always()
+# inputs:
+# workingDir: src\Umbraco.Tests.AcceptanceTest
+# command: 'custom'
+# customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"'
+#
+# - task: Npm@1
+# displayName: Run Cypress (Mobile protrait)
+# condition: always()
+# inputs:
+# workingDir: src\Umbraco.Tests.AcceptanceTest
+# command: 'custom'
+# customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"'
+ - task: PublishPipelineArtifact@1
+ displayName: "Publish test artifacts"
+ condition: failed()
+ inputs:
+ targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts'
+ artifact: 'Test artifacts - Windows'
+ - job: Linux_Acceptance_tests
+ displayName: Linux
+ variables:
+ - name: UmbracoDatabaseServer
+ value: localhost
+ - name: UmbracoDatabaseName
+ value: Cypress
+ - name: ConnectionStrings__umbracoDbDSN
+ value: Server=localhost,1433;Database=$(UmbracoDatabaseName);User Id=sa;Password=$(SA_PASSWORD);
+ services:
+ mssql: mssql
+ pool:
+ vmImage: ubuntu-latest
+ steps:
+ - task: UseDotNet@2
+ displayName: Use .Net Core sdk 5.x
+ inputs:
+ version: 5.x
+ - task: Bash@3
+ displayName: Create database
+ inputs:
+ targetType: 'inline'
+ script: 'sqlcmd -S . -U sa -P $SA_PASSWORD -Q "CREATE DATABASE $DBNAME"'
+ env:
+ DBNAME: $(UmbracoDatabaseName)
+ SA_PASSWORD: $(SA_PASSWORD)
+ - task: NodeTool@0
+ displayName: Use Node 11.x
+ inputs:
+ versionSpec: 11.x
+ - task: Npm@1
+ displayName: npm install (Client)
+ inputs:
+ workingDir: src/Umbraco.Web.UI.Client
+ verbose: false
+ - task: gulp@0
+ displayName: gulp build
+ inputs:
+ gulpFile: src/Umbraco.Web.UI.Client/gulpfile.js
+ targets: build
+ workingDirectory: src/Umbraco.Web.UI.Client
+ - task: Bash@3
+ displayName: dotnet run (Netcore)
+ inputs:
+ targetType: 'inline'
+ script: 'nohup dotnet run -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj &'
+ - task: Bash@3
+ displayName: Generate Cypress.env.json
+ inputs:
+ targetType: 'inline'
+ script: 'echo "{ \"username\": \"$USERNAME\", \"password\": \"$PASSWORD\" }" > "src/Umbraco.Tests.AcceptanceTest/cypress.env.json"'
+ env:
+ USERNAME: $(Umbraco__CMS__Unattended__UnattendedUserEmail)
+ PASSWORD: $(Umbraco__CMS__Unattended__UnattendedUserPassword)
+ - task: Npm@1
+ name: PrepareTask
+ displayName: npm install (AcceptanceTest)
+ inputs:
+ workingDir: 'src/Umbraco.Tests.AcceptanceTest'
+ - task: Npm@1
+ displayName: Run Cypress (Desktop)
+ condition: always()
+ continueOnError: true
+ inputs:
+ workingDir: src/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: DotNetCoreCLI@2
- displayName: 'dotnet test'
- inputs:
- command: test
- projects: '**/*.Tests.UnitTests.csproj'
+ - task: PublishTestResults@2
+ condition: always()
+ inputs:
+ testResultsFormat: 'JUnit'
+ testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml'
+ mergeTestResults: true
+ testRunTitle: "Test results Desktop"
+ # - task: Npm@1
+ # displayName: Run Cypress (Tablet portrait)
+ # condition: always()
+ # inputs:
+ # workingDir: src/Umbraco.Tests.AcceptanceTest
+ # command: 'custom'
+ # customCommand: 'run test -- --config="viewportHeight=1366,viewportWidth=1024,screenshotsFolder=cypress/artifacts/tablet/screenshots,videosFolder=cypress/artifacts/tablet/videos,videoUploadOnPasses=false"'
+ #
+ # - task: Npm@1
+ # displayName: Run Cypress (Mobile protrait)
+ # condition: always()
+ # inputs:
+ # workingDir: src/Umbraco.Tests.AcceptanceTest
+ # command: 'custom'
+ # customCommand: 'run test -- --config="viewportHeight=812,viewportWidth=375,screenshotsFolder=cypress/artifacts/mobile/screenshots,videosFolder=cypress/artifacts/mobile/videos,videoUploadOnPasses=false"'
+ - task: PublishPipelineArtifact@1
+ displayName: "Publish test artifacts"
+ condition: failed()
+ inputs:
+ targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts'
+ artifact: 'Test artifacts - Linux'
+ - stage: Artifacts
+ dependsOn: []
+ jobs:
+ - job: Build_Artifacts
+ displayName: Build Artifacts
+ pool:
+ vmImage: windows-latest
+ steps:
+ - task: UseDotNet@2
+ displayName: Use .Net Core sdk 5.x
+ inputs:
+ version: 5.x
+ - task: NuGetToolInstaller@1
+ displayName: Use NuGet Latest
+ - task: NuGetCommand@2
+ displayName: Restore NuGet Packages
+ inputs:
+ restoreSolution: '*\src\umbraco.sln'
+ feedsToUse: config
+ - task: PowerShell@1
+ displayName: Update Version
+ condition: 'eq(variables[''Umbraco.IsReleaseBuild''], ''false'')'
+ inputs:
+ scriptType: inlineScript
+ inlineScript: >
+ Write-Host "Working folder: $pwd"
- - job: Integration_Tests
- services:
- mssql: mssql
- timeoutInMinutes: 120
- displayName: 'Integration Tests'
- pool:
- vmImage: 'ubuntu-latest'
- steps:
+ $ubuild = build/build.ps1 -get -continue
- - task: UseDotNet@2
- displayName: 'Use .Net Core sdk 5.0.x'
- inputs:
- version: 5.0.x
- - task: DotNetCoreCLI@2
- displayName: 'dotnet test'
- inputs:
- command: test
- projects: '**/Umbraco.Tests.Integration.csproj'
- env:
- UmbracoIntegrationTestConnectionString: 'Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD);'
+ $version = $ubuild.GetUmbracoVersion()
-- stage: MacOS
- dependsOn: [] # this removes the implicit dependency on previous stage and causes this to run in parallel
- jobs:
+ if ($version.Comment -ne "")
+ {
+ # 8.0.0-beta.33.1234
+ $continuous = "$($version.Semver).$(Build.BuildNumber)"
+ }
+ else
+ {
+ # 8.0.0-alpha.1234
+ $continuous = "$($version.Release)-alpha.$(Build.BuildNumber)"
+ }
+ $ubuild.SetUmbracoVersion($continuous)
- - job: Unit_Tests
- displayName: 'Unit Tests'
- pool:
- vmImage: 'macOS-latest'
- steps:
- - task: UseDotNet@2
- displayName: 'Use .Net Core sdk 5.0.x'
- inputs:
- version: 5.0.x
+ #Update the version in templates also
- - task: DotNetCoreCLI@2
- displayName: 'dotnet test'
- inputs:
- command: test
- projects: '**/*.Tests.UnitTests.csproj'
+ $templatePath =
+ 'build/templates/UmbracoSolution/.template.config/template.json'
-- stage: Windows
- dependsOn: [] # this removes the implicit dependency on previous stage and causes this to run in parallel
- jobs:
+ $a = Get-Content $templatePath -raw | ConvertFrom-Json
- - job: Unit_Tests
- displayName: 'Unit Tests'
- pool:
- vmImage: 'windows-latest'
- steps:
+ $a.symbols.version.defaultValue = $continuous
- - task: UseDotNet@2
- displayName: 'Use .Net Core sdk 5.0.x'
- inputs:
- version: 5.0.x
+ $a | ConvertTo-Json -depth 32| set-content $templatePath
- - task: DotNetCoreCLI@2
- displayName: 'dotnet test'
- inputs:
- command: test
- projects: '**\*.Tests.UnitTests.csproj'
- - job: Integration_Tests
- timeoutInMinutes: 120
- displayName: 'Integration Tests'
- pool:
- vmImage: 'windows-latest'
- steps:
+ $templatePath =
+ 'build/templates/UmbracoPackage/.template.config/template.json'
- - task: UseDotNet@2
- displayName: 'Use .Net Core sdk 5.0.x'
- inputs:
- version: 5.0.x
+ $a = Get-Content $templatePath -raw | ConvertFrom-Json
- - powershell: 'sqllocaldb start mssqllocaldb'
- displayName: 'Start MSSQL LocalDb'
+ $a.symbols.version.defaultValue = $continuous
- - task: DotNetCoreCLI@2
- displayName: 'dotnet test'
- inputs:
- command: test
- projects: '**\Umbraco.Tests.Integration.csproj'
+ $a | ConvertTo-Json -depth 32| set-content $templatePath
- - job: Build_Artifacts
- displayName: 'Build Artifacts'
- pool:
- vmImage: 'windows-latest'
- steps:
- - task: UseDotNet@2
- displayName: 'Use .Net Core sdk 5.0.x'
- inputs:
- version: 5.0.x
+ Write-Host "Building: $continuous"
+ - task: PowerShell@1
+ displayName: Prepare Build
+ inputs:
+ scriptType: inlineScript
+ inlineScript: |
+ Write-Host "Working folder: $pwd"
+ $ubuild = build\build.ps1 -get
- - task: NuGetToolInstaller@1
- displayName: 'Use NuGet Latest'
+ $ubuild.PrepareBuild("vso")
+ - task: NodeTool@0
+ displayName: Use Node 11.x
+ inputs:
+ versionSpec: 11.x
+ - task: Npm@1
+ displayName: npm install
+ inputs:
+ workingDir: src\Umbraco.Web.UI.Client
+ verbose: false
+ - task: gulp@0
+ displayName: gulp build
+ inputs:
+ gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js
+ targets: build
+ workingDirectory: src\Umbraco.Web.UI.Client
+ publishJUnitResults: true
+ testResultsFiles: '**\TESTS-*.xml'
+ - task: PowerShell@1
+ displayName: Prepare Packages & Zip
+ inputs:
+ scriptType: inlineScript
+ inlineScript: |
+ Write-Host "Working folder: $pwd"
+ $ubuild = build\build.ps1 -get -continue
- - task: NuGetCommand@2
- displayName: 'Restore NuGet Packages'
- inputs:
- restoreSolution: '*\src\umbraco.sln'
- feedsToUse: config
+ $ubuild.CompileUmbraco()
+ $ubuild.PreparePackages()
+ $ubuild.PackageZip()
+ - task: CopyFiles@2
+ displayName: Copy Zip Files to Staging
+ inputs:
+ SourceFolder: build.out
+ Contents: '*.zip'
+ TargetFolder: $(build.artifactstagingdirectory)
+ CleanTargetFolder: true
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Zip Files
+ inputs:
+ PathtoPublish: $(build.artifactstagingdirectory)
+ ArtifactName: zips
+ - task: PowerShell@1
+ displayName: Verify & Package NuGet
+ inputs:
+ scriptType: inlineScript
+ inlineScript: |
+ Write-Host "Working folder: $pwd"
+ $ubuild = build\build.ps1 -get -continue
- - task: PowerShell@1
- displayName: 'Update Version'
- condition: eq(variables['Umbraco.IsReleaseBuild'], 'false')
- inputs:
- scriptType: inlineScript
- inlineScript: |
- Write-Host "Working folder: $pwd"
- $ubuild = build/build.ps1 -get -continue
+ $ubuild.VerifyNuGet()
+ $ubuild.PackageNuGet()
+ - task: CopyFiles@2
+ displayName: Copy NuPkg Files to Staging
+ inputs:
+ SourceFolder: build.out
+ Contents: '*.nupkg'
+ TargetFolder: $(build.artifactstagingdirectory)
+ CleanTargetFolder: true
+ - task: PublishBuildArtifacts@1
+ displayName: Publish NuPkg Files
+ inputs:
+ PathtoPublish: $(build.artifactstagingdirectory)
+ ArtifactName: nupkg
+ - task: CopyFiles@2
+ displayName: Copy Log Files to Staging
+ inputs:
+ SourceFolder: build.tmp
+ Contents: '*.log'
+ TargetFolder: $(build.artifactstagingdirectory)
+ CleanTargetFolder: true
+ condition: succeededOrFailed()
+ - task: PublishBuildArtifacts@1
+ displayName: Publish Log Files
+ inputs:
+ PathtoPublish: $(build.artifactstagingdirectory)
+ ArtifactName: logs
+ condition: succeededOrFailed()
+ - stage: Artifacts_Docs
+ displayName: 'Static Code Documentation'
+ dependsOn: []
+ condition: 'ne(variables[''Umbraco.IsReleaseBuild''], ''false'')'
+ jobs:
+ - job: Generate_Docs_CSharp
+ timeoutInMinutes: 60
+ displayName: Generate C# Docs
+ pool:
+ vmImage: windows-latest
+ steps:
+ - task: UseDotNet@2
+ displayName: Use .Net Core sdk 5.x
+ inputs:
+ version: 5.x
+ - task: PowerShell@2
+ displayName: 'Prep build tool - C# Docs'
+ inputs:
+ targetType: inline
+ script: |
+ choco install docfx -y
+ if ($lastexitcode -ne 0){
+ throw ("Error installing DocFX")
+ }
+ docfx metadata --loglevel Verbose "$(Build.SourcesDirectory)\src\ApiDocs\docfx.json"
+ if ($lastexitcode -ne 0){
+ throw ("Error generating docs.")
+ }
+ docfx build --loglevel Verbose "$(Build.SourcesDirectory)\src\ApiDocs\docfx.json"
+ if ($lastexitcode -ne 0){
+ throw ("Error generating docs.")
+ }
+ errorActionPreference: continue
+ workingDirectory: build
+ - task: ArchiveFiles@2
+ displayName: 'Zip C# Docs'
+ inputs:
+ rootFolderOrFile: $(Build.SourcesDirectory)\src\ApiDocs\_site
+ includeRootFolder: false
+ archiveType: zip
+ archiveFile: $(Build.ArtifactStagingDirectory)\docs\csharp-docs.zip
+ replaceExistingArchive: true
+ - task: PublishPipelineArtifact@1
+ displayName: Publish to artifacts - C# Docs
+ inputs:
+ targetPath: $(Build.ArtifactStagingDirectory)\docs\csharp-docs.zip
+ artifact: docs-cs
+ publishLocation: pipeline
- $version = $ubuild.GetUmbracoVersion()
- if ($version.Comment -ne "")
- {
- # 8.0.0-beta.33.1234
- $continuous = "$($version.Semver).$(Build.BuildNumber)"
- }
- else
- {
- # 8.0.0-alpha.1234
- $continuous = "$($version.Release)-alpha.$(Build.BuildNumber)"
- }
- $ubuild.SetUmbracoVersion($continuous)
-
- #Update the version in template also
- $templatePath = 'build/templates/UmbracoSolution/.template.config/template.json'
- $a = Get-Content $templatePath -raw | ConvertFrom-Json
- $a.symbols.version.defaultValue = $continuous
- $a | ConvertTo-Json -depth 32| set-content $templatePath
-
- Write-Host "Building: $continuous"
-
- - task: PowerShell@1
- displayName: 'Prepare Build'
- inputs:
- scriptType: inlineScript
- inlineScript: |
- Write-Host "Working folder: $pwd"
- $ubuild = build\build.ps1 -get
-
- $ubuild.PrepareBuild("vso")
-
- - task: NodeTool@0
- displayName: 'Use Node 11.x'
- inputs:
- versionSpec: 11.x
-
- - task: Npm@1
- displayName: 'npm install'
- inputs:
- workingDir: src\Umbraco.Web.UI.Client
- verbose: false
-
- - task: gulp@0
- displayName: 'gulp build'
- inputs:
- gulpFile: src\Umbraco.Web.UI.Client\gulpfile.js
- targets: build
- workingDirectory: src\Umbraco.Web.UI.Client
- publishJUnitResults: true
- testResultsFiles: '**\TESTS-*.xml'
-
- - task: PowerShell@1
- displayName: 'Prepare Packages & Zip'
- inputs:
- scriptType: inlineScript
- inlineScript: |
- Write-Host "Working folder: $pwd"
- $ubuild = build\build.ps1 -get -continue
-
- $ubuild.CompileUmbraco()
- $ubuild.PreparePackages()
- $ubuild.PackageZip()
-
- - task: CopyFiles@2
- displayName: 'Copy Zip Files to Staging'
- inputs:
- SourceFolder: build.out
- Contents: '*.zip'
- TargetFolder: '$(build.artifactstagingdirectory)'
- CleanTargetFolder: true
-
- - task: PublishBuildArtifacts@1
- displayName: 'Publish Zip Files'
- inputs:
- PathtoPublish: '$(build.artifactstagingdirectory)'
- ArtifactName: zips
-
- - task: PowerShell@1
- displayName: 'Verify & Package NuGet'
- inputs:
- scriptType: inlineScript
- inlineScript: |
- Write-Host "Working folder: $pwd"
- $ubuild = build\build.ps1 -get -continue
-
- $ubuild.VerifyNuGet()
- $ubuild.PackageNuGet()
-
- - task: CopyFiles@2
- displayName: 'Copy NuPkg Files to Staging'
- inputs:
- SourceFolder: build.out
- Contents: '*.nupkg'
- TargetFolder: '$(build.artifactstagingdirectory)'
- CleanTargetFolder: true
-
- - task: PublishBuildArtifacts@1
- displayName: 'Publish NuPkg Files'
- inputs:
- PathtoPublish: '$(build.artifactstagingdirectory)'
- ArtifactName: nupkg
-
- - task: CopyFiles@2
- displayName: 'Copy Log Files to Staging'
- inputs:
- SourceFolder: build.tmp
- Contents: '*.log'
- TargetFolder: '$(build.artifactstagingdirectory)'
- CleanTargetFolder: true
- condition: succeededOrFailed()
-
- - task: PublishBuildArtifacts@1
- displayName: 'Publish Log Files'
- inputs:
- PathtoPublish: '$(build.artifactstagingdirectory)'
- ArtifactName: logs
- condition: succeededOrFailed()
+ - job: Generate_Docs_JS
+ timeoutInMinutes: 60
+ displayName: Generate JS Docs
+ pool:
+ vmImage: windows-latest
+ steps:
+ - task: PowerShell@2
+ displayName: Prep build tool - JS Docs
+ inputs:
+ targetType: inline
+ script: |
+ $uenv=./build.ps1 -get -doc
+ $uenv.SandboxNode()
+ $uenv.CompileBelle()
+ $uenv.PrepareAngularDocs()
+ $uenv.RestoreNode()
+ errorActionPreference: continue
+ workingDirectory: build
+ - task: PublishPipelineArtifact@1
+ displayName: Publish to artifacts - JS Docs
+ inputs:
+ targetPath: $(Build.Repository.LocalPath)\build.out\
+ artifact: docs
+ publishLocation: pipeline
diff --git a/build/build.ps1 b/build/build.ps1
index bc39d04083..8581fa93ca 100644
--- a/build/build.ps1
+++ b/build/build.ps1
@@ -448,6 +448,12 @@
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cmssqlce.log"
if (-not $?) { throw "Failed to pack NuGet UmbracoCms.SqlCe." }
+ &$this.BuildEnv.NuGet Pack "$nuspecs\UmbracoCms.StaticAssets.nuspec" `
+ -Properties BuildTmp="$($this.BuildTemp)" `
+ -Version "$($this.Version.Semver.ToString())" `
+ -Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cmsstaticassets.log"
+ if (-not $?) { throw "Failed to pack NuGet UmbracoCms.StaticAssets." }
+
&$this.BuildEnv.NuGet Pack "$templates\Umbraco.Templates.nuspec" `
-Properties BuildTmp="$($this.BuildTemp)" `
-Version "$($this.Version.Semver.ToString())" `
diff --git a/build/templates/UmbracoPackage/.template.config/dotnetcli.host.json b/build/templates/UmbracoPackage/.template.config/dotnetcli.host.json
new file mode 100644
index 0000000000..141f7bf97c
--- /dev/null
+++ b/build/templates/UmbracoPackage/.template.config/dotnetcli.host.json
@@ -0,0 +1,6 @@
+{
+ "$schema": "http://json.schemastore.org/dotnetcli.host",
+ "symbolInfo": {
+
+ }
+}
diff --git a/build/templates/UmbracoPackage/.template.config/icon.png b/build/templates/UmbracoPackage/.template.config/icon.png
new file mode 100644
index 0000000000..9500140b38
Binary files /dev/null and b/build/templates/UmbracoPackage/.template.config/icon.png differ
diff --git a/build/templates/UmbracoPackage/.template.config/ide.host.json b/build/templates/UmbracoPackage/.template.config/ide.host.json
new file mode 100644
index 0000000000..8d3bae3e3c
--- /dev/null
+++ b/build/templates/UmbracoPackage/.template.config/ide.host.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "http://json.schemastore.org/vs-2017.3.host",
+ "order" : 0,
+ "icon": "icon.png",
+ "description": {
+ "id": "UmbracoPackage",
+ "text": "Umbraco Package - An empty Umbraco CMS package (Plugin)"
+ },
+ "symbolInfo": [
+
+ ]
+
+}
diff --git a/build/templates/UmbracoPackage/.template.config/template.json b/build/templates/UmbracoPackage/.template.config/template.json
new file mode 100644
index 0000000000..56989e3e97
--- /dev/null
+++ b/build/templates/UmbracoPackage/.template.config/template.json
@@ -0,0 +1,59 @@
+{
+ "$schema": "http://json.schemastore.org/template",
+ "author": "Umbraco HQ",
+ "description": "An empty Umbraco Package/Plugin ready to get started",
+ "classifications": [ "Web", "CMS", "Umbraco", "Package", "Plugin"],
+ "groupIdentity": "Umbraco.Templates.UmbracoPackage",
+ "identity": "Umbraco.Templates.UmbracoPackage.CSharp",
+ "name": "Umbraco Package",
+ "shortName": "umbracopackage",
+ "defaultName": "UmbracoPackage1",
+ "preferNameDirectory": true,
+ "tags": {
+ "language": "C#",
+ "type": "project"
+ },
+ "primaryOutputs": [
+ {
+ "path": "UmbracoPackage.csproj"
+ }
+ ],
+ "sourceName": "UmbracoPackage",
+ "preferNameDirectory": true,
+ "symbols": {
+ "version": {
+ "type": "parameter",
+ "datatype": "string",
+ "defaultValue": "9.0.0-beta001",
+ "description": "The version of Umbraco to load using NuGet",
+ "replaces": "UMBRACO_VERSION_FROM_TEMPLATE"
+ },
+ "namespaceReplacer": {
+ "type": "generated",
+ "generator": "coalesce",
+ "parameters": {
+ "sourceVariableName": "name",
+ "defaultValue": "UmbracoPackage",
+ "fallbackVariableName": "name"
+ },
+ "replaces":"UmbracoPackage"
+ },
+ "Framework": {
+ "type": "parameter",
+ "description": "The target framework for the project.",
+ "datatype": "choice",
+ "choices": [
+ {
+ "choice": "net5.0",
+ "description": "Target net5.0"
+ },
+ {
+ "choice": "net6.0",
+ "description": "Target net6.0"
+ }
+ ],
+ "replaces": "net5.0",
+ "defaultValue": "net5.0"
+ }
+ }
+}
diff --git a/build/templates/UmbracoPackage/App_Plugins/UmbracoPackage/package.manifest b/build/templates/UmbracoPackage/App_Plugins/UmbracoPackage/package.manifest
new file mode 100644
index 0000000000..8593c62d96
--- /dev/null
+++ b/build/templates/UmbracoPackage/App_Plugins/UmbracoPackage/package.manifest
@@ -0,0 +1,2 @@
+{
+}
\ No newline at end of file
diff --git a/build/templates/UmbracoPackage/UmbracoPackage.csproj b/build/templates/UmbracoPackage/UmbracoPackage.csproj
new file mode 100644
index 0000000000..e688419184
--- /dev/null
+++ b/build/templates/UmbracoPackage/UmbracoPackage.csproj
@@ -0,0 +1,28 @@
+
+
+ net5.0
+ .
+ UmbracoPackage
+ UmbracoPackage
+ UmbracoPackage
+ ...
+ ...
+ umbraco plugin package
+
+
+
+
+
+
+
+
+
+ true
+ Always
+
+
+ True
+ build
+
+
+
diff --git a/build/templates/UmbracoPackage/build/UmbracoPackage.targets b/build/templates/UmbracoPackage/build/UmbracoPackage.targets
new file mode 100644
index 0000000000..7a0dc0338a
--- /dev/null
+++ b/build/templates/UmbracoPackage/build/UmbracoPackage.targets
@@ -0,0 +1,27 @@
+
+
+
+ $(MSBuildThisFileDirectory)..\App_Plugins\UmbracoPackage\**\*.*
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/templates/UmbracoSolution/.template.config/dotnetcli.host.json b/build/templates/UmbracoSolution/.template.config/dotnetcli.host.json
new file mode 100644
index 0000000000..d8ae0f76c7
--- /dev/null
+++ b/build/templates/UmbracoSolution/.template.config/dotnetcli.host.json
@@ -0,0 +1,13 @@
+{
+ "$schema": "http://json.schemastore.org/dotnetcli.host",
+ "symbolInfo": {
+ "PackageTestSiteName": {
+ "longName": "PackageTestSiteName",
+ "shortName": "p"
+ },
+ "UseSqlCe": {
+ "longName": "SqlCe",
+ "shortName": "ce"
+ }
+ }
+}
diff --git a/build/templates/UmbracoSolution/.template.config/icon.png b/build/templates/UmbracoSolution/.template.config/icon.png
new file mode 100644
index 0000000000..9500140b38
Binary files /dev/null and b/build/templates/UmbracoSolution/.template.config/icon.png differ
diff --git a/build/templates/UmbracoSolution/.template.config/ide.host.json b/build/templates/UmbracoSolution/.template.config/ide.host.json
new file mode 100644
index 0000000000..7604d3b1f4
--- /dev/null
+++ b/build/templates/UmbracoSolution/.template.config/ide.host.json
@@ -0,0 +1,26 @@
+{
+ "$schema": "http://json.schemastore.org/vs-2017.3.host",
+ "order" : 0,
+ "icon": "icon.png",
+ "description": {
+ "id": "UmbracoSolution",
+ "text": "Umbraco Web Application - An empty Umbraco CMS web application"
+ },
+ "symbolInfo": [
+ {
+ "id": "PackageTestSiteName",
+ "name": {
+ "text": "Optional: Specific the name of a package that this should be a test site for.",
+ },
+ "isVisible": "true"
+ },
+ {
+ "id": "UseSqlCe",
+ "name": {
+ "text": "Use Sql Compact Edition (SqlCE)"
+ },
+ "isVisible": "true"
+ }
+ ]
+
+}
diff --git a/build/templates/UmbracoSolution/.template.config/template.json b/build/templates/UmbracoSolution/.template.config/template.json
index a85a4f4af8..7e45b01f4d 100644
--- a/build/templates/UmbracoSolution/.template.config/template.json
+++ b/build/templates/UmbracoSolution/.template.config/template.json
@@ -1,21 +1,30 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Umbraco HQ",
+ "description": "An empty Umbraco Solution ready to get started",
"classifications": [ "Web", "CMS", "Umbraco"],
- "identity": "Umbraco.Templates",
- "name": "Umbraco - Empty Solution",
+ "groupIdentity": "Umbraco.Templates.UmbracoSolution",
+ "identity": "Umbraco.Templates.UmbracoSolution.CSharp",
+ "name": "Umbraco Solution",
"shortName": "umbraco",
+ "defaultName": "UmbracoSolution1",
+ "preferNameDirectory": true,
"tags": {
"language": "C#",
"type": "project"
},
+ "primaryOutputs": [
+ {
+ "path": "UmbracoSolution.csproj"
+ }
+ ],
"sourceName": "UmbracoSolution",
"preferNameDirectory": true,
"symbols": {
"version": {
"type": "parameter",
"datatype": "string",
- "defaultValue": "9.0.0-alpha004",
+ "defaultValue": "9.0.0-beta001",
"description": "The version of Umbraco to load using NuGet",
"replaces": "UMBRACO_VERSION_FROM_TEMPLATE"
},
@@ -29,10 +38,18 @@
},
"replaces":"Umbraco.Web.UI.NetCore"
},
+ "PackageTestSiteName": {
+ "type": "parameter",
+ "datatype":"text",
+ "defaultValue": "",
+ "replaces":"PackageTestSiteName",
+ "description": "The name of the package this should be a test site for (Default: '')"
+ },
"UseSqlCe":{
"type": "parameter",
"datatype":"bool",
- "defaultValue": "false"
+ "defaultValue": "false",
+ "description": "Adds the required dependencies to use SqlCE (Windows only) (Default: false)"
},
"Framework": {
"type": "parameter",
@@ -42,6 +59,10 @@
{
"choice": "net5.0",
"description": "Target net5.0"
+ },
+ {
+ "choice": "net6.0",
+ "description": "Target net6.0"
}
],
"replaces": "net5.0",
diff --git a/build/templates/UmbracoSolution/UmbracoSolution.csproj b/build/templates/UmbracoSolution/UmbracoSolution.csproj
index 278720afef..08643bb150 100644
--- a/build/templates/UmbracoSolution/UmbracoSolution.csproj
+++ b/build/templates/UmbracoSolution/UmbracoSolution.csproj
@@ -9,6 +9,11 @@
+
+
+
+
+
@@ -28,12 +33,10 @@
true
- PreserveNewest
Always
true
- PreserveNewest
Always
diff --git a/src/ApiDocs/docfx.filter.yml b/src/ApiDocs/docfx.filter.yml
index e96fbaafff..db82957d00 100644
--- a/src/ApiDocs/docfx.filter.yml
+++ b/src/ApiDocs/docfx.filter.yml
@@ -1,10 +1,8 @@
apiRules:
- include:
- uidRegex: ^Umbraco\.Core
- - exclude:
- uidRegex: ^umbraco\.Web\.org
+ uidRegex: ^Umbraco\.Cms
- include:
- uidRegex: ^Umbraco\.Web
+ uidRegex: ^Umbraco\.Extensions
- exclude:
hasAttribute:
uid: System.ComponentModel.EditorBrowsableAttribute
@@ -13,6 +11,6 @@ apiRules:
- exclude:
uidRegex: ^umbraco\.
- exclude:
- uidRegex: ^CookComputing\.
+ uidRegex: ^CookComputing\.
- exclude:
- uidRegex: ^.*$
\ No newline at end of file
+ uidRegex: ^.*$
diff --git a/src/ApiDocs/docfx.json b/src/ApiDocs/docfx.json
index 76677d45d5..2e9d9c0836 100644
--- a/src/ApiDocs/docfx.json
+++ b/src/ApiDocs/docfx.json
@@ -2,15 +2,20 @@
"metadata": [
{
"src": [
- {
+ {
"src": "../",
"files": [
- "Umbraco.Core/Umbraco.Core.csproj",
- "Umbraco.Web/Umbraco.Web.csproj"
+ "**/*.csproj",
+ "**/Umbraco.Infrastructure/**/*.cs"
],
"exclude": [
"**/obj/**",
- "**/bin/**"
+ "**/bin/**",
+ "**/Umbraco.Web.csproj",
+ "**/Umbraco.Infrastructure.csproj",
+ "**/Umbraco.Web.UI.csproj",
+ "**/Umbraco.Web.UI.Netcore.csproj",
+ "**/**.Test**/*.csproj"
]
}
],
@@ -53,7 +58,7 @@
"_enableSearch": true,
"_disableContribution": false
},
- "dest": "../../build.tmp/_site",
+ "dest": "_site",
"template": [
"default", "umbracotemplate"
]
diff --git a/src/ApiDocs/index.md b/src/ApiDocs/index.md
index b90b816312..2de11c438a 100644
--- a/src/ApiDocs/index.md
+++ b/src/ApiDocs/index.md
@@ -3,5 +3,9 @@
## Quick Links:
-### [Umbraco.Core](api/Umbraco.Core.html) docs
-### [Umbraco.Web](api/Umbraco.Web.html) docs
+### [Core](api/Umbraco.Cms.Core.html) docs
+### [Infrastructure](api/Umbraco.Cms.Infrastructure.html) docs
+### [Web](api/Umbraco.Cms.Web.Common.html) docs
+### [Extensions](api/Umbraco.Extensions.html) docs
+
+
diff --git a/src/ApiDocs/toc.yml b/src/ApiDocs/toc.yml
index 23e2f3b8e1..8e9fc8b2c2 100644
--- a/src/ApiDocs/toc.yml
+++ b/src/ApiDocs/toc.yml
@@ -1,5 +1,9 @@
+- name: Core
+ href: api/Umbraco.Cms.Core.html
+- name: Infrastructure
+ href: api/Umbraco.Cms.Infrastructure.html
+- name: Web
+ href: api/Umbraco.Cms.Web.Common.html
+- name: Extensions
+ href: api/Umbraco.Extensions.html
-- name: Umbraco.Core Documentation
- href: https://our.umbraco.com/apidocs/csharp/api/Umbraco.Core.html
-- name: Umbraco.Web Documentation
- href: https://our.umbraco.com/apidocs/csharp/api/Umbraco.Web.html
\ No newline at end of file
diff --git a/src/ApiDocs/umbracotemplate/partials/navbar.tmpl.partial b/src/ApiDocs/umbracotemplate/partials/navbar.tmpl.partial
index e9ee0af1c7..e221e75c7c 100644
--- a/src/ApiDocs/umbracotemplate/partials/navbar.tmpl.partial
+++ b/src/ApiDocs/umbracotemplate/partials/navbar.tmpl.partial
@@ -9,7 +9,7 @@
-
+