diff --git a/build/azure-pipelines.yml b/build/azure-pipelines.yml index 2a7d43655d..dcb71692e6 100644 --- a/build/azure-pipelines.yml +++ b/build/azure-pipelines.yml @@ -52,7 +52,8 @@ stages: inputs: key: '"npm_client" | "$(Agent.OS)" | $(Build.SourcesDirectory)/src/Umbraco.Web.UI.Client/package-lock.json' restoreKeys: | - npm_client | "$(Agent.OS)" + "npm_client" | "$(Agent.OS)" + "npm_client" path: $(npm_config_cache) - script: npm ci --no-fund --no-audit --prefer-offline workingDirectory: src/Umbraco.Web.UI.Client @@ -95,7 +96,7 @@ stages: } } - dotnet pack --no-build --configuration $(buildConfiguration) umbraco.sln -o $(Build.ArtifactStagingDirectory)/nupkg + dotnet pack --configuration $(buildConfiguration) umbraco.sln -o $(Build.ArtifactStagingDirectory)/nupkg - task: PublishPipelineArtifact@1 displayName: Publish nupkg inputs: @@ -239,6 +240,7 @@ stages: jobs: # Integration Tests (SQLite) - job: + timeoutInMinutes: 120 displayName: Integration Tests (SQLite) strategy: matrix: @@ -315,6 +317,7 @@ stages: - stage: E2E variables: npm_config_cache: $(Pipeline.Workspace)/.npm_e2e + CYPRESS_CACHE_FOLDER: $(Pipeline.Workspace)/cypress_binaries displayName: E2E Tests dependsOn: Build jobs: @@ -346,10 +349,8 @@ stages: vmImage: 'ubuntu-latest' dockerfile: umbraco-linux.docker dockerImageName: umbraco-linux - cypressBinaries: "/home/vsts/.cache/Cypress" Windows: vmImage: 'windows-latest' - cypressBinaries: $(LOCALAPPDATA)/Cypress pool: vmImage: $(vmImage) steps: @@ -367,8 +368,14 @@ stages: inputs: key: '"npm_e2e" | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json' restoreKeys: | - npm_e2e | "$(Agent.OS)" + "npm_e2e" | "$(Agent.OS)" + "npm_e2e" path: $(npm_config_cache) + - task: Cache@2 + displayName: Cache cypress binaries + inputs: + key: '"cypress_binaries" | "$(Agent.OS)" | $(Build.SourcesDirectory)/tests/Umbraco.Tests.AcceptanceTest/package-lock.json' + path: $(CYPRESS_CACHE_FOLDER) - task: PowerShell@2 displayName: Generate Cypress.env.json inputs: @@ -392,10 +399,11 @@ stages: workingDirectory: tests/Umbraco.Tests.AcceptanceTest/misc targetType: inline script: | - docker build -t $(dockerImageName) -f $(dockerfile) . + $sha = 'g$(Build.SourceVersion)'.substring(0, 8) + docker build -t $(dockerImageName):$sha -f $(dockerfile) . mkdir -p $(Build.ArtifactStagingDirectory)/docker-images - docker save -o $(Build.ArtifactStagingDirectory)/docker-images/$(dockerImageName).tar $(dockerImageName) - docker run --name $(dockerImageName) -dp 8080:5000 -e UMBRACO__CMS_GLOBAL__ID=$(UMBRACO__CMS_GLOBAL__ID) $(dockerImageName) + 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 ps # Windows containers take forever. # --no-launch-profile stops ASPNETCORE_ENVIRONMENT=Development which breaks the users.ts tests (smtp config = invite user button) diff --git a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj index 54ab69b37e..2274c73327 100644 --- a/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj +++ b/src/Umbraco.Web.UI/Umbraco.Web.UI.csproj @@ -59,7 +59,6 @@ -