Files
Umbraco-CMS/build/azure-pipelines.yml

518 lines
23 KiB
YAML
Raw Normal View History

variables:
Netcore: Update code docs generation (#9885) * Updated the code docs to work with new assemblies and namespaces+added conditional build to default pipeline * updated script that generate docs to use .NET 5 * Increased timeout of docs generation + changed to 5.x instead of 5.0.x Fixed wrong namespace, that would be we not have docs for it. * Fixed names in toc, so they are not that long and changed ordering * try custom hack https://github.com/dotnet/docfx/issues/1254#issuecomment-294080535 * revert nonworking hack - Divide prep steps into two. * Changed ordering * Try to generate docs without the build.ps1 script * Try to generate docs without the build.ps1 script * Try to generate docs without the build.ps1 script * Try to remove the examine one, to test if that is the reason it fails on azure pipeline * Try to remove the sqlce one, to test if that is the reason it fails on azure pipeline * Reintroduce Examine and SqlCE docs, as these was not the reason it will not work on azure pipeline. * Test if azure wanna build the docs without explicit version * Fixed two malformed xml docs * hardcode version of docfx, to hopefully let it pass on azure pipeline * hardcode version of docfx, to hopefully let it pass on azure pipeline * Restructure azure pipeline yaml to have stages as areas instead of OS * Restructure azure pipeline yaml to have stages as areas instead of OS * yml restructure * yml restructure * yml restructure * Not hardcoding docfx as the old versions also fail on azure * Fixed Badly formed XML comments * moved condition from job to stage * split build and metadata * indentation * removed wrong char * Try to add more loging on azure pipeline * include less * include less projects * add one more project * More azure pipeline test * indentation * All except infrastructure * publish tasks * Fix link on logo * Extensions also included * Less links * re-introduced infrastructure to the list of projects for generate docfx for. * Add filter * Remove single warning for xmldocs * more logging? * skip some things from the metadata * test using other image * Test if exclude filter works * Test with more explict filters, allowing some docs from Infrastructure * binary search for the file that is the issue * binary search for the file that is the issue * binary search for the file that is the issue * Exclude more folders * Exclude more folders and files * Only exclude files in root of namespace? * more filter trials * more filter trials * add 2 nested folders * all cs files? * Remove test projects * Toc * Update build/azure-pipelines.yml * move display name element * Update build/azure-pipelines.yml Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2021-03-18 14:48:22 +01:00
buildConfiguration: Release
SA_PASSWORD: UmbracoIntegration123!
2020-12-11 14:35:12 +00:00
resources:
Netcore: Update code docs generation (#9885) * Updated the code docs to work with new assemblies and namespaces+added conditional build to default pipeline * updated script that generate docs to use .NET 5 * Increased timeout of docs generation + changed to 5.x instead of 5.0.x Fixed wrong namespace, that would be we not have docs for it. * Fixed names in toc, so they are not that long and changed ordering * try custom hack https://github.com/dotnet/docfx/issues/1254#issuecomment-294080535 * revert nonworking hack - Divide prep steps into two. * Changed ordering * Try to generate docs without the build.ps1 script * Try to generate docs without the build.ps1 script * Try to generate docs without the build.ps1 script * Try to remove the examine one, to test if that is the reason it fails on azure pipeline * Try to remove the sqlce one, to test if that is the reason it fails on azure pipeline * Reintroduce Examine and SqlCE docs, as these was not the reason it will not work on azure pipeline. * Test if azure wanna build the docs without explicit version * Fixed two malformed xml docs * hardcode version of docfx, to hopefully let it pass on azure pipeline * hardcode version of docfx, to hopefully let it pass on azure pipeline * Restructure azure pipeline yaml to have stages as areas instead of OS * Restructure azure pipeline yaml to have stages as areas instead of OS * yml restructure * yml restructure * yml restructure * Not hardcoding docfx as the old versions also fail on azure * Fixed Badly formed XML comments * moved condition from job to stage * split build and metadata * indentation * removed wrong char * Try to add more loging on azure pipeline * include less * include less projects * add one more project * More azure pipeline test * indentation * All except infrastructure * publish tasks * Fix link on logo * Extensions also included * Less links * re-introduced infrastructure to the list of projects for generate docfx for. * Add filter * Remove single warning for xmldocs * more logging? * skip some things from the metadata * test using other image * Test if exclude filter works * Test with more explict filters, allowing some docs from Infrastructure * binary search for the file that is the issue * binary search for the file that is the issue * binary search for the file that is the issue * Exclude more folders * Exclude more folders and files * Only exclude files in root of namespace? * more filter trials * more filter trials * add 2 nested folders * all cs files? * Remove test projects * Toc * Update build/azure-pipelines.yml * move display name element * Update build/azure-pipelines.yml Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2021-03-18 14:48:22 +01:00
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'
2020-11-26 12:50:41 +01:00
stages:
Netcore: Update code docs generation (#9885) * Updated the code docs to work with new assemblies and namespaces+added conditional build to default pipeline * updated script that generate docs to use .NET 5 * Increased timeout of docs generation + changed to 5.x instead of 5.0.x Fixed wrong namespace, that would be we not have docs for it. * Fixed names in toc, so they are not that long and changed ordering * try custom hack https://github.com/dotnet/docfx/issues/1254#issuecomment-294080535 * revert nonworking hack - Divide prep steps into two. * Changed ordering * Try to generate docs without the build.ps1 script * Try to generate docs without the build.ps1 script * Try to generate docs without the build.ps1 script * Try to remove the examine one, to test if that is the reason it fails on azure pipeline * Try to remove the sqlce one, to test if that is the reason it fails on azure pipeline * Reintroduce Examine and SqlCE docs, as these was not the reason it will not work on azure pipeline. * Test if azure wanna build the docs without explicit version * Fixed two malformed xml docs * hardcode version of docfx, to hopefully let it pass on azure pipeline * hardcode version of docfx, to hopefully let it pass on azure pipeline * Restructure azure pipeline yaml to have stages as areas instead of OS * Restructure azure pipeline yaml to have stages as areas instead of OS * yml restructure * yml restructure * yml restructure * Not hardcoding docfx as the old versions also fail on azure * Fixed Badly formed XML comments * moved condition from job to stage * split build and metadata * indentation * removed wrong char * Try to add more loging on azure pipeline * include less * include less projects * add one more project * More azure pipeline test * indentation * All except infrastructure * publish tasks * Fix link on logo * Extensions also included * Less links * re-introduced infrastructure to the list of projects for generate docfx for. * Add filter * Remove single warning for xmldocs * more logging? * skip some things from the metadata * test using other image * Test if exclude filter works * Test with more explict filters, allowing some docs from Infrastructure * binary search for the file that is the issue * binary search for the file that is the issue * binary search for the file that is the issue * Exclude more folders * Exclude more folders and files * Only exclude files in root of namespace? * more filter trials * more filter trials * add 2 nested folders * all cs files? * Remove test projects * Toc * Update build/azure-pipelines.yml * move display name element * Update build/azure-pipelines.yml Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2021-03-18 14:48:22 +01:00
- 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'
2021-03-22 08:52:48 +01:00
- stage: Acceptance_Tests
displayName: Acceptance Tests
dependsOn: []
2021-03-22 09:58:02 +01:00
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!
2021-03-22 08:52:48 +01:00
jobs:
2021-03-22 13:06:14 +01:00
- job: Windows_Acceptance_tests
2021-03-23 20:52:45 +01:00
variables:
- name: UmbracoDatabaseServer
value: (LocalDB)\MSSQLLocalDB
- name: UmbracoDatabaseName
value: Cypress
- name: ConnectionStrings__umbracoDbDSN
value: Server=$(UmbracoDatabaseServer);Database=$(UmbracoDatabaseName);Integrated Security=true;
2021-03-22 13:06:14 +01:00
displayName: Windows
2021-03-22 08:52:48 +01:00
pool:
vmImage: windows-latest
steps:
- task: UseDotNet@2
displayName: Use .Net Core sdk 5.x
inputs:
version: 5.x
2021-03-22 14:20:30 +01:00
2021-03-22 13:06:14 +01:00
- 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'
2021-03-22 08:52:48 +01:00
- task: NodeTool@0
displayName: Use Node 11.x
inputs:
2021-03-22 08:54:27 +01:00
versionSpec: 11.x
2021-03-22 08:52:48 +01:00
- task: Npm@1
2021-03-22 10:09:50 +01:00
displayName: npm install (Client)
2021-03-22 08:52:48 +01:00
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"
2021-03-22 13:06:14 +01:00
displayName: dotnet run (Netcore)
2021-03-22 15:03:17 +01:00
# - powershell: dotnet run --no-build -p .\src\Umbraco.Web.UI.NetCore\Umbraco.Web.UI.NetCore.csproj
# displayName: dotnet run (Netcore)
2021-03-22 09:26:40 +01:00
- task: PowerShell@1
2021-03-22 10:23:45 +01:00
displayName: Generate Cypress.env.json
2021-03-22 09:26:40 +01:00
inputs:
scriptType: inlineScript
inlineScript: >
2021-03-22 10:09:50 +01:00
@{ username = $env:Umbraco__CMS__Unattended__UnattendedUserEmail; password = $env:Umbraco__CMS__Unattended__UnattendedUserPassword } | ConvertTo-Json | Set-Content -Path "src\Umbraco.Tests.AcceptanceTest\cypress.env.json"
2021-03-22 09:58:02 +01:00
- task: Npm@1
name: PrepareTask
2021-03-22 10:09:50 +01:00
displayName: npm install (AcceptanceTest)
2021-03-22 09:58:02 +01:00
inputs:
workingDir: 'src\Umbraco.Tests.AcceptanceTest'
- task: Npm@1
2021-03-22 18:29:26 +01:00
displayName: Run Cypress (Desktop)
condition: always()
2021-03-22 18:29:26 +01:00
inputs:
workingDir: src\Umbraco.Tests.AcceptanceTest
command: 'custom'
2021-03-23 11:59:57 +01:00
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"'
2021-03-23 11:59:57 +01:00
- task: PublishTestResults@2
2021-03-23 14:04:55 +01:00
condition: always()
2021-03-23 11:59:57 +01:00
inputs:
testResultsFormat: 'JUnit'
2021-03-23 12:29:34 +01:00
testResultsFiles: 'src/Umbraco.Tests.AcceptanceTest/results/test-output-D-*.xml'
2021-03-23 11:59:57 +01:00
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"'
2021-03-22 20:09:02 +01:00
- task: PublishPipelineArtifact@1
displayName: "Publish test artifacts"
2021-03-23 11:39:13 +01:00
condition: failed()
2021-03-22 20:09:02 +01:00
inputs:
2021-03-22 21:03:44 +01:00
targetPath: '$(Build.SourcesDirectory)/src/Umbraco.Tests.AcceptanceTest/cypress/artifacts'
2021-03-24 07:47:19 +01:00
artifact: 'Test artifacts - Windows'
2021-03-23 20:58:50 +01:00
- job: Linux_Acceptance_tests
displayName: Linux
variables:
- name: UmbracoDatabaseServer
value: localhost
- name: UmbracoDatabaseName
value: Cypress
- name: ConnectionStrings__umbracoDbDSN
2021-03-23 21:36:58 +01:00
value: Server=localhost,1433;Database=$(UmbracoDatabaseName);User Id=sa;Password=$(SA_PASSWORD);
2021-03-23 21:00:50 +01:00
services:
mssql: mssql
pool:
vmImage: ubuntu-latest
steps:
- task: UseDotNet@2
displayName: Use .Net Core sdk 5.x
inputs:
version: 5.x
2021-03-24 07:13:43 +01:00
- task: Bash@3
2021-03-23 21:00:50 +01:00
displayName: Create database
2021-03-24 07:13:43 +01:00
inputs:
targetType: 'inline'
2021-03-24 08:00:31 +01:00
script: 'sqlcmd -S . -U sa -P $SA_PASSWORD -Q "CREATE DATABASE $DBNAME"'
2021-03-24 08:02:35 +01:00
env:
DBNAME: $(UmbracoDatabaseName)
SA_PASSWORD: $(SA_PASSWORD)
2021-03-23 21:00:50 +01:00
- task: NodeTool@0
displayName: Use Node 11.x
inputs:
versionSpec: 11.x
- task: Npm@1
displayName: npm install (Client)
inputs:
2021-03-23 21:50:54 +01:00
workingDir: src/Umbraco.Web.UI.Client
2021-03-23 21:00:50 +01:00
verbose: false
- task: gulp@0
displayName: gulp build
inputs:
2021-03-23 21:50:54 +01:00
gulpFile: src/Umbraco.Web.UI.Client/gulpfile.js
2021-03-23 21:00:50 +01:00
targets: build
2021-03-23 21:50:54 +01:00
workingDirectory: src/Umbraco.Web.UI.Client
2021-03-24 06:24:08 +01:00
- task: Bash@3
2021-03-24 06:52:28 +01:00
displayName: dotnet run (Netcore)
2021-03-24 06:24:08 +01:00
inputs:
targetType: 'inline'
2021-03-24 07:22:31 +01:00
script: 'nohup dotnet run -p ./src/Umbraco.Web.UI.NetCore/Umbraco.Web.UI.NetCore.csproj &'
2021-03-24 06:13:40 +01:00
- task: Bash@3
2021-03-24 06:52:28 +01:00
displayName: Generate Cypress.env.json
2021-03-23 21:00:50 +01:00
inputs:
2021-03-24 06:13:40 +01:00
targetType: 'inline'
2021-03-24 08:00:31 +01:00
script: 'echo "{ \"username\": \"$USERNAME\", \"password\": \"$PASSWORD\" }" > "src/Umbraco.Tests.AcceptanceTest/cypress.env.json"'
2021-03-24 08:02:35 +01:00
env:
USERNAME: $(Umbraco__CMS__Unattended__UnattendedUserEmail)
PASSWORD: $(Umbraco__CMS__Unattended__UnattendedUserPassword)
2021-03-23 21:00:50 +01:00
- task: Npm@1
name: PrepareTask
displayName: npm install (AcceptanceTest)
inputs:
2021-03-23 21:50:54 +01:00
workingDir: 'src/Umbraco.Tests.AcceptanceTest'
2021-03-23 21:00:50 +01:00
- task: Npm@1
displayName: Run Cypress (Desktop)
condition: always()
inputs:
2021-03-23 21:50:54 +01:00
workingDir: src/Umbraco.Tests.AcceptanceTest
2021-03-23 21:00:50 +01:00
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"'
2021-03-23 20:52:45 +01:00
2021-03-23 21:00:50 +01:00
- 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:
2021-03-23 21:50:54 +01:00
# workingDir: src/Umbraco.Tests.AcceptanceTest
2021-03-23 21:00:50 +01:00
# 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:
2021-03-23 21:50:54 +01:00
# workingDir: src/Umbraco.Tests.AcceptanceTest
2021-03-23 21:00:50 +01:00
# 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'
2021-03-24 07:47:19 +01:00
artifact: 'Test artifacts - Linux'
Netcore: Update code docs generation (#9885) * Updated the code docs to work with new assemblies and namespaces+added conditional build to default pipeline * updated script that generate docs to use .NET 5 * Increased timeout of docs generation + changed to 5.x instead of 5.0.x Fixed wrong namespace, that would be we not have docs for it. * Fixed names in toc, so they are not that long and changed ordering * try custom hack https://github.com/dotnet/docfx/issues/1254#issuecomment-294080535 * revert nonworking hack - Divide prep steps into two. * Changed ordering * Try to generate docs without the build.ps1 script * Try to generate docs without the build.ps1 script * Try to generate docs without the build.ps1 script * Try to remove the examine one, to test if that is the reason it fails on azure pipeline * Try to remove the sqlce one, to test if that is the reason it fails on azure pipeline * Reintroduce Examine and SqlCE docs, as these was not the reason it will not work on azure pipeline. * Test if azure wanna build the docs without explicit version * Fixed two malformed xml docs * hardcode version of docfx, to hopefully let it pass on azure pipeline * hardcode version of docfx, to hopefully let it pass on azure pipeline * Restructure azure pipeline yaml to have stages as areas instead of OS * Restructure azure pipeline yaml to have stages as areas instead of OS * yml restructure * yml restructure * yml restructure * Not hardcoding docfx as the old versions also fail on azure * Fixed Badly formed XML comments * moved condition from job to stage * split build and metadata * indentation * removed wrong char * Try to add more loging on azure pipeline * include less * include less projects * add one more project * More azure pipeline test * indentation * All except infrastructure * publish tasks * Fix link on logo * Extensions also included * Less links * re-introduced infrastructure to the list of projects for generate docfx for. * Add filter * Remove single warning for xmldocs * more logging? * skip some things from the metadata * test using other image * Test if exclude filter works * Test with more explict filters, allowing some docs from Infrastructure * binary search for the file that is the issue * binary search for the file that is the issue * binary search for the file that is the issue * Exclude more folders * Exclude more folders and files * Only exclude files in root of namespace? * more filter trials * more filter trials * add 2 nested folders * all cs files? * Remove test projects * Toc * Update build/azure-pipelines.yml * move display name element * Update build/azure-pipelines.yml Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
2021-03-18 14:48:22 +01:00
- 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"
$ubuild = build/build.ps1 -get -continue
$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()
- 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
- 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