From ffde585e64cdef90d53c2af6ee5e466243163b2e Mon Sep 17 00:00:00 2001 From: David Barbet Date: Wed, 12 Aug 2026 11:11:00 -0700 Subject: [PATCH] Use prebuilt docker images instead of install dependencies on every run --- azure-pipelines.yml | 12 ++++-------- azure-pipelines/test-linux-docker-prereqs.yml | 19 ------------------- azure-pipelines/test-matrix.yml | 4 ---- azure-pipelines/test.yml | 8 -------- 4 files changed, 4 insertions(+), 39 deletions(-) delete mode 100644 azure-pipelines/test-linux-docker-prereqs.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 417bb33f2b..352a7232bf 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -86,11 +86,10 @@ stages: # Prefer the dotnet from the container. installDotNet: false testVSCodeVersion: $(testVSCodeVersion) - installAdditionalLinuxDependencies: true pool: name: NetCore-Public demands: ImageOverride -equals build.ubuntu.2204.amd64.open - containerName: mcr.microsoft.com/dotnet/sdk:8.0-noble + containerName: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-24.04-net8.0-vscode-csharp-amd64 - stage: displayName: Test Linux (.NET 9) @@ -104,11 +103,10 @@ stages: # Prefer the dotnet from the container. installDotNet: false testVSCodeVersion: $(testVSCodeVersion) - installAdditionalLinuxDependencies: true pool: name: NetCore-Public demands: ImageOverride -equals build.ubuntu.2204.amd64.open - containerName: mcr.microsoft.com/dotnet/sdk:9.0-noble + containerName: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-24.04-net9.0-vscode-csharp-amd64 - stage: displayName: Test Linux (.NET 10) @@ -120,11 +118,10 @@ stages: # Prefer the dotnet from the container. installDotNet: false testVSCodeVersion: $(testVSCodeVersion) - installAdditionalLinuxDependencies: true pool: name: NetCore-Public demands: ImageOverride -equals build.ubuntu.2204.amd64.open - containerName: mcr.microsoft.com/dotnet/sdk:10.0-noble + containerName: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-24.04-net10.0-vscode-csharp-amd64 - stage: displayName: Test Linux (.NET 11) @@ -136,11 +133,10 @@ stages: # Prefer the dotnet from the container. installDotNet: false testVSCodeVersion: $(testVSCodeVersion) - installAdditionalLinuxDependencies: true pool: name: NetCore-Public demands: ImageOverride -equals build.ubuntu.2204.amd64.open - containerName: mcr.microsoft.com/dotnet/sdk:11.0-preview + containerName: mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-26.04-net11.0-vscode-csharp-amd64 - stage: Test_Windows_Stage displayName: Test Windows diff --git a/azure-pipelines/test-linux-docker-prereqs.yml b/azure-pipelines/test-linux-docker-prereqs.yml deleted file mode 100644 index 1b86fb9c3d..0000000000 --- a/azure-pipelines/test-linux-docker-prereqs.yml +++ /dev/null @@ -1,19 +0,0 @@ -steps: -- script: echo "##vso[task.setvariable variable=containerId;]$(docker ps --latest --quiet)" - displayName: Set containerId variable - target: host - condition: eq(variables['Agent.OS'], 'Linux') - -- script: echo "containerId is $(containerId)" - displayName: Read containerId variable - target: host - condition: eq(variables['Agent.OS'], 'Linux') - -# The docker containers we use for linux require some additional dependencies to run VSCode. -# Installing the dependencies requires root, but the docker image we're using doesn't have root permissions (nor sudo) -# We can exec as root from outside the container from the host machine. -# Really we should create our own image with these pre-installed, but we'll need to figure out how to publish the image. -- script: docker exec --user root $(containerId) bash -c 'apt-get update -y && apt-get install -y libnss3 libgtk-3-0 libasound2t64 xvfb' - displayName: 'Install additional Linux dependencies' - target: host - condition: eq(variables['Agent.OS'], 'Linux') \ No newline at end of file diff --git a/azure-pipelines/test-matrix.yml b/azure-pipelines/test-matrix.yml index a8743e0b55..658000533d 100644 --- a/azure-pipelines/test-matrix.yml +++ b/azure-pipelines/test-matrix.yml @@ -8,9 +8,6 @@ parameters: default: '' - name: installDotNet type: boolean - - name: installAdditionalLinuxDependencies - type: boolean - default: false - name: testVSCodeVersion type: string @@ -40,7 +37,6 @@ jobs: - template: /azure-pipelines/test.yml@self parameters: installDotNet: ${{ parameters.installDotNet }} - installAdditionalLinuxDependencies: ${{ parameters.installAdditionalLinuxDependencies }} npmCommand: $(npmCommand) testVSCodeVersion: ${{ parameters.testVSCodeVersion }} isIntegration: $(isIntegration) diff --git a/azure-pipelines/test.yml b/azure-pipelines/test.yml index 0b0443b879..f4a1639b8f 100644 --- a/azure-pipelines/test.yml +++ b/azure-pipelines/test.yml @@ -1,9 +1,6 @@ parameters: - name: installDotNet type: boolean - - name: installAdditionalLinuxDependencies - type: boolean - default: false - name: npmCommand type: string - name: testVSCodeVersion @@ -22,12 +19,7 @@ steps: parameters: installDotNet: ${{ parameters.installDotNet }} -- ${{ if eq(parameters.installAdditionalLinuxDependencies, true) }}: - - template: test-linux-docker-prereqs.yml - - template: test-prereqs.yml - parameters: - installAdditionalLinuxDependencies: ${{ parameters.installAdditionalLinuxDependencies }} - script: npm run ${{ parameters.npmCommand }} displayName: 🧪 Run $(Agent.JobName)