v11: Decouple dependencies (#12907)
* Move core dependencies and MSBuild targets from Umbraco.Cms to Umbraco.Cms.Targets * Re-add appsettings.Tests.json * Include appsettings-schema.json * Use .NET 7.x in CodeQL build * Fix duplicate Directory.Build.props import * Decouple ImageSharp/ImageSharp.Web implementations * Further decouple SqlServer implementation * Add SupportedImageFileTypes to IImageDimensionExtractor * Update descriptions * Update project metadata * Re-enable package validation * Add embedded package icon * Move ContinuousIntegrationBuild to build script * Move shared properties to root Directory.Build.props * Fix GetInstallState throwing exception when default provider isn't configured * Remove redundant PackageRequireLicenseAcceptance and update version to 11.0.0-rc1 * Update build script * Remove LangVersion preview * Disable app-local ICU for MacOS integration test * Disable app-local ICU for all integration tests * Fix RuntimeState_Run test assertion * Update projects and build script to require Node.js 16.17 (latest LTS) * Remove app-local ICU from unit tests * Add missing project reference * Generate XML documentation files * Expose management API in Web.UI project * Update .NET 7 dependencies to RC1 * Update package-lock.json files * Downgrade Cypress version
This commit is contained in:
@@ -23,12 +23,15 @@ parameters:
|
||||
default: false
|
||||
|
||||
variables:
|
||||
nodeVersion: 16.17.0
|
||||
dotnetVersion: 7.x
|
||||
solution: umbraco.sln
|
||||
buildConfiguration: Release
|
||||
SA_PASSWORD: UmbracoIntegration123!
|
||||
UMBRACO__CMS_GLOBAL__ID: 00000000-0000-0000-0000-000000000042
|
||||
nodeVersion: 14.18.1
|
||||
DOTNET_NOLOGO: 1
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
||||
UMBRACO__CMS__GLOBAL__ID: 00000000-0000-0000-0000-000000000042
|
||||
DOTNET_NOLOGO: true
|
||||
DOTNET_GENERATE_ASPNET_CERTIFICATE: false
|
||||
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
|
||||
DOTNET_CLI_TELEMETRY_OPTOUT: true
|
||||
|
||||
stages:
|
||||
###############################################
|
||||
@@ -44,7 +47,7 @@ stages:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
displayName: Use node $(nodeVersion)
|
||||
displayName: Use Node.js $(nodeVersion)
|
||||
inputs:
|
||||
versionSpec: $(nodeVersion)
|
||||
- task: Cache@2
|
||||
@@ -65,16 +68,22 @@ stages:
|
||||
targets: coreBuild
|
||||
workingDirectory: src/Umbraco.Web.UI.Client
|
||||
- task: UseDotNet@2
|
||||
displayName: Use .NET 7.x
|
||||
displayName: Use .NET $(dotnetVersion)
|
||||
inputs:
|
||||
version: 7.x
|
||||
version: $(dotnetVersion)
|
||||
performMultiLevelLookup: true
|
||||
includePreviewVersions: true
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Run dotnet restore
|
||||
inputs:
|
||||
command: restore
|
||||
projects: $(solution)
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Run dotnet build
|
||||
inputs:
|
||||
command: build
|
||||
projects: umbraco.sln
|
||||
arguments: '--configuration $(buildConfiguration)'
|
||||
projects: $(solution)
|
||||
arguments: '--configuration $(buildConfiguration) --no-restore -p:ContinuousIntegrationBuild=true'
|
||||
- script: |
|
||||
version="$(Build.BuildNumber)"
|
||||
echo "varsion: $version"
|
||||
@@ -101,7 +110,7 @@ stages:
|
||||
}
|
||||
}
|
||||
|
||||
dotnet pack --configuration $(buildConfiguration) umbraco.sln -o $(Build.ArtifactStagingDirectory)/nupkg
|
||||
dotnet pack $(solution) --configuration $(buildConfiguration) --no-build --output $(Build.ArtifactStagingDirectory)/nupkg
|
||||
- script: |
|
||||
sha="$(Build.SourceVersion)"
|
||||
sha=${sha:0:7}
|
||||
@@ -178,9 +187,9 @@ stages:
|
||||
vmImage: 'ubuntu-latest'
|
||||
steps:
|
||||
- task: NodeTool@0
|
||||
displayName: Use Node 10.15.0
|
||||
displayName: Use Node.js 10.15.0
|
||||
inputs:
|
||||
versionSpec: 10.15.0 # Won't work with 14.18.1
|
||||
versionSpec: 10.15.0 # Won't work with higher versions
|
||||
- script: |
|
||||
npm ci --no-fund --no-audit --prefer-offline
|
||||
npx gulp docs
|
||||
@@ -233,16 +242,17 @@ stages:
|
||||
artifact: build_output
|
||||
path: $(Build.SourcesDirectory)
|
||||
- task: UseDotNet@2
|
||||
displayName: Use net7
|
||||
displayName: Use .NET $(dotnetVersion)
|
||||
inputs:
|
||||
version: 7.x
|
||||
version: $(dotnetVersion)
|
||||
performMultiLevelLookup: true
|
||||
includePreviewVersions: true
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Run dotnet test
|
||||
inputs:
|
||||
command: test
|
||||
projects: '**/*.Tests.UnitTests.csproj'
|
||||
arguments: '--no-build --configuration $(buildConfiguration)'
|
||||
arguments: '--configuration $(buildConfiguration) --no-build'
|
||||
testRunTitle: Unit Tests - $(Agent.OS)
|
||||
|
||||
- stage: Integration
|
||||
@@ -269,16 +279,17 @@ stages:
|
||||
artifact: build_output
|
||||
path: $(Build.SourcesDirectory)
|
||||
- task: UseDotNet@2
|
||||
displayName: Use net7
|
||||
displayName: Use .NET $(dotnetVersion)
|
||||
inputs:
|
||||
version: 7.x
|
||||
version: $(dotnetVersion)
|
||||
performMultiLevelLookup: true
|
||||
includePreviewVersions: true
|
||||
- task: DotNetCoreCLI@2
|
||||
displayName: Run dotnet test
|
||||
inputs:
|
||||
command: test
|
||||
projects: '**/*.Tests.Integration.csproj'
|
||||
arguments: '--no-build --configuration $(buildConfiguration)'
|
||||
arguments: '--configuration $(buildConfiguration) --no-build'
|
||||
testRunTitle: Integration Tests SQLite - $(Agent.OS)
|
||||
env:
|
||||
Tests__Database__DatabaseType: 'Sqlite'
|
||||
@@ -301,6 +312,8 @@ stages:
|
||||
connectionString: 'Server=localhost,1433;User Id=sa;Password=$(SA_PASSWORD);'
|
||||
pool:
|
||||
vmImage: $(vmImage)
|
||||
variables:
|
||||
SA_PASSWORD: UmbracoIntegration123!
|
||||
steps:
|
||||
- task: DownloadPipelineArtifact@2
|
||||
displayName: Download build artifacts
|
||||
@@ -318,7 +331,7 @@ stages:
|
||||
inputs:
|
||||
command: test
|
||||
projects: '**/*.Tests.Integration.csproj'
|
||||
arguments: '--no-build --configuration $(buildConfiguration)'
|
||||
arguments: '--configuration $(buildConfiguration) --no-build'
|
||||
testRunTitle: Integration Tests SQL Server - $(Agent.OS)
|
||||
env:
|
||||
Tests__Database__DatabaseType: $(testDb)
|
||||
@@ -371,7 +384,7 @@ stages:
|
||||
artifact: nupkg
|
||||
path: $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/misc/nupkg
|
||||
- task: NodeTool@0
|
||||
displayName: Use Node $(nodeVersion)
|
||||
displayName: Use Node.js $(nodeVersion)
|
||||
inputs:
|
||||
versionSpec: $(nodeVersion)
|
||||
- task: Cache@2
|
||||
@@ -403,9 +416,10 @@ stages:
|
||||
displayName: Create database (Windows only)
|
||||
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
|
||||
- task: UseDotNet@2
|
||||
displayName: Use .Net 7.x
|
||||
displayName: Use .NET $(dotnetVersion)
|
||||
inputs:
|
||||
version: 7.x
|
||||
version: $(dotnetVersion)
|
||||
performMultiLevelLookup: true
|
||||
includePreviewVersions: true
|
||||
# Linux containers smooth
|
||||
- task: PowerShell@2
|
||||
@@ -419,7 +433,7 @@ stages:
|
||||
docker build -t $(dockerImageName):$sha -f $(dockerfile) .
|
||||
mkdir -p $(Build.ArtifactStagingDirectory)/docker-images
|
||||
docker save -o $(Build.ArtifactStagingDirectory)/docker-images/$(dockerImageName).$sha.tar $(dockerImageName):$sha
|
||||
docker run --name $(dockerImageName) -dp 8080:5000 -e UMBRACO__CMS_GLOBAL__ID=$(UMBRACO__CMS_GLOBAL__ID) $(dockerImageName):$sha
|
||||
docker run --name $(dockerImageName) -dp 8080:5000 -e UMBRACO__CMS__GLOBAL__ID=$(UMBRACO__CMS__GLOBAL__ID) $(dockerImageName):$sha
|
||||
docker ps
|
||||
# Windows containers take forever.
|
||||
# --no-launch-profile stops ASPNETCORE_ENVIRONMENT=Development which breaks the users.ts tests (smtp config = invite user button)
|
||||
@@ -434,8 +448,8 @@ stages:
|
||||
dotnet new --install ./nupkg/Umbraco.Templates.*.nupkg
|
||||
dotnet new umbraco --name Cypress -o . --no-restore
|
||||
dotnet restore --configfile ./nuget.config
|
||||
dotnet build --no-restore -c Release
|
||||
Start-Process -FilePath "dotnet" -ArgumentList "run --no-build -c Release --no-launch-profile --urls $(CYPRESS_BASE_URL)"
|
||||
dotnet build --configuration $(buildConfiguration) --no-restore
|
||||
Start-Process -FilePath "dotnet" -ArgumentList "run --configuration $(buildConfiguration) --no-build --no-launch-profile --urls $(CYPRESS_BASE_URL)"
|
||||
- task: PowerShell@2
|
||||
displayName: Wait for app
|
||||
inputs:
|
||||
@@ -496,12 +510,12 @@ stages:
|
||||
displayName: dotnet restore
|
||||
inputs:
|
||||
command: restore
|
||||
projects: '**/umbraco.sln'
|
||||
projects: $(solution)
|
||||
# TODO: Use NuGetCommand instead of DotNetCoreCLI
|
||||
# - task: NuGetCommand@2
|
||||
# displayName: Restore NuGet Packages
|
||||
# inputs:
|
||||
# restoreSolution: 'umbraco.sln'
|
||||
# restoreSolution: $(solution)
|
||||
# feedsToUse: config
|
||||
- stage: Deploy_NuGet
|
||||
displayName: NuGet release
|
||||
@@ -523,7 +537,7 @@ stages:
|
||||
displayName: dotnet restore
|
||||
inputs:
|
||||
command: restore
|
||||
projects: '**/umbraco.sln'
|
||||
projects: $(solution)
|
||||
|
||||
- stage: Upload_API_Docs
|
||||
pool:
|
||||
|
||||
Reference in New Issue
Block a user