Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
176d3fe
Initial plan
Copilot Oct 3, 2025
55ec77c
feat(ci): Add e2e tests against latest docker images
Copilot Oct 3, 2025
8cb0132
fix: Address PR feedback
Copilot Oct 6, 2025
165e6ea
correct pool name
tylerbutler Oct 7, 2025
d4ed6d5
fix compose paths
tylerbutler Oct 7, 2025
dcf9b4e
source path
tylerbutler Oct 7, 2025
4e0c926
fixes
tylerbutler Oct 7, 2025
0581584
set working dir
tylerbutler Oct 7, 2025
fbcdb6f
working dir fix
tylerbutler Oct 7, 2025
bf7140c
variables
tylerbutler Oct 7, 2025
8f79bb6
syntax
tylerbutler Oct 7, 2025
40b8c6d
fix path
tylerbutler Oct 7, 2025
2771dec
build kafka and zookeeper
tylerbutler Oct 7, 2025
7c7c589
Merge branch 'server-pnpm' into copilot/fix-5682770f-0461-4c09-a83c-7…
tylerbutler Oct 7, 2025
3715a3a
Merge branch 'main' into copilot/fix-5682770f-0461-4c09-a83c-7c6fe73b…
tylerbutler Oct 7, 2025
e6de246
Merge branch 'test/tylerbu/e2e-r11s-docker' into copilot/fix-5682770f…
tylerbutler Oct 7, 2025
a8c9c64
testing
tylerbutler Oct 7, 2025
344d2b9
testing
tylerbutler Oct 7, 2025
9864a1b
rm workspace flag
tylerbutler Oct 7, 2025
0c0d67b
use correct variant
tylerbutler Oct 7, 2025
0c3e2f5
Merge branch 'main' into test/tylerbu/e2e-r11s-docker
tylerbutler Oct 7, 2025
ea364d0
refactor: Simplify pipeline checkout logic
Copilot Oct 7, 2025
8b278c6
test
tylerbutler Oct 7, 2025
a0fd44d
test
tylerbutler Oct 8, 2025
70bca16
update
tylerbutler Oct 8, 2025
06388cb
set path
tylerbutler Oct 8, 2025
963a800
fix paths
tylerbutler Oct 8, 2025
843eda2
syntax
tylerbutler Oct 8, 2025
16d5d60
macros
tylerbutler Oct 8, 2025
2a4f230
debuggin
tylerbutler Oct 8, 2025
140fc6f
debugging
tylerbutler Oct 8, 2025
b72e0ff
sources
tylerbutler Oct 8, 2025
90bd7ba
updates
tylerbutler Oct 8, 2025
2d3fd62
compose path
tylerbutler Oct 8, 2025
5e1afe8
Merge branch 'main' into test/tylerbu/e2e-r11s-docker
tylerbutler Oct 8, 2025
b9343e5
allow all previously used scripts
tylerbutler Oct 8, 2025
1cab3fe
Merge branch 'server-pnpm' into test/tylerbu/e2e-r11s-docker
tylerbutler Oct 8, 2025
4123eee
feedback
tylerbutler Oct 8, 2025
075c2bc
reorder steps
tylerbutler Oct 8, 2025
7fe40fe
Apply suggestion from @tylerbutler
tylerbutler Oct 8, 2025
a624f61
cleanup
tylerbutler Oct 8, 2025
20d2649
it was used, terrible name
tylerbutler Oct 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions server/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
services:
proxy:
platform: linux/amd64/v3
image: nginx:latest
depends_on:
- "alfred"
- "historian"
- "nexus"
volumes:
- ./routerlicious/nginx.conf:/etc/nginx/nginx.conf
ports:
- "3003:3003"
- "3002:3002"
- "3001:3001"
alfred:
image: ${REGISTRY_URL:-mcr.microsoft.com}/fluidframework/routerlicious/server:${ALFRED_IMAGE_TAG:-latest}
ports:
- "3003:3000"
expose:
- "3000"
command: node packages/routerlicious/dist/alfred/www.js
environment:
- DEBUG=fluid:*
Expand All @@ -11,8 +24,8 @@ services:
restart: always
nexus:
image: ${REGISTRY_URL:-mcr.microsoft.com}/fluidframework/routerlicious/server:${ALFRED_IMAGE_TAG:-latest}
ports:
- "3002:3000"
expose:
- "3000"
command: node packages/routerlicious/dist/nexus/www.js
environment:
- DEBUG=fluid:*
Expand Down Expand Up @@ -63,15 +76,15 @@ services:
restart: always
historian:
image: ${REGISTRY_URL:-mcr.microsoft.com}/fluidframework/routerlicious/historian:${HISTORIAN_IMAGE_TAG:-latest}
ports:
- "3001:3000"
expose:
- "3000"
environment:
- DEBUG=fluid:*
- NODE_ENV=development
- IS_FLUID_SERVER=true
restart: always
gitrest:
image: ${REGISTRY_URL:-mcr.microsoft.com}/fluidframework/routerlicious/gitrest:${HISTORIAN_IMAGE_TAG:-latest}
image: ${REGISTRY_URL:-mcr.microsoft.com}/fluidframework/routerlicious/gitrest:${GITREST_IMAGE_TAG:-latest}
environment:
- DEBUG=fluid:*
- NODE_ENV=development
Expand All @@ -80,7 +93,7 @@ services:
- git:/home/node/documents
restart: always
git:
image: ${REGISTRY_URL:-mcr.microsoft.com}/fluidframework/routerlicious/gitssh:${HISTORIAN_IMAGE_TAG:-latest}
image: ${REGISTRY_URL:-mcr.microsoft.com}/fluidframework/routerlicious/gitssh:${GITSSH_IMAGE_TAG:-latest}
ports:
- "3022:22"
volumes:
Expand Down
7 changes: 4 additions & 3 deletions server/routerlicious/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
services:
proxy:
platform: linux/amd64/v3
image: nginx:latest
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
Expand Down Expand Up @@ -105,7 +106,7 @@ services:
- IS_FLUID_SERVER=true
restart: always
historian:
image: mcr.microsoft.com/fluidframework/routerlicious/historian:latest
image: ${REGISTRY_URL:-mcr.microsoft.com}/fluidframework/routerlicious/historian:${HISTORIAN_IMAGE_TAG:-latest}
expose:
- "3000"
environment:
Expand All @@ -114,7 +115,7 @@ services:
- IS_FLUID_SERVER=true
restart: always
gitrest:
image: mcr.microsoft.com/fluidframework/routerlicious/gitrest:latest
image: ${REGISTRY_URL:-mcr.microsoft.com}/fluidframework/routerlicious/gitrest:${GITREST_IMAGE_TAG:-latest}
environment:
- DEBUG=fluid:*
- NODE_ENV=development
Expand All @@ -123,7 +124,7 @@ services:
- git:/home/node/documents
restart: always
git:
image: mcr.microsoft.com/fluidframework/routerlicious/gitssh:latest
image: ${REGISTRY_URL:-mcr.microsoft.com}/fluidframework/routerlicious/gitssh:${GITSSH_IMAGE_TAG:-latest}
ports:
- "3022:22"
volumes:
Expand Down
10 changes: 9 additions & 1 deletion server/routerlicious/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@
},
"patchedDependencies": {
"@microsoft/[email protected]": "patches/@[email protected]"
}
},
"onlyBuiltDependencies": [
"classic-level",
"core-js",
"node-rdkafka",
"snappy",
"unrs-resolver",
"zookeeper"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"endpoint": "zookeeper:2181"
},
"storage": {
"enableWholeSummaryUpload": false,
"enableWholeSummaryUpload": true,
"ephemeralDocumentTTLSec": 86400,
"storageUrl": "http://gitrest:3000"
},
Expand Down
102 changes: 81 additions & 21 deletions tools/pipelines/templates/include-test-real-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ parameters:
# Variables to be set in the stage that runs tests
- name: stageVariables
type: object
default:
default: {}

# If true, the stage that uploads pipeline telemetry to Kusto will include a task to upload
# test pass rate telemetry.
Expand Down Expand Up @@ -49,7 +49,7 @@ parameters:

- name: env
type: object
default:
default: {}

- name: splitTestVariants
type: object
Expand Down Expand Up @@ -80,6 +80,7 @@ parameters:
type: string
default: ""

# If provided, this value is passed directly to the "condition" key of the stage in this file.
- name: condition
type: string
default: true
Expand All @@ -98,12 +99,6 @@ parameters:
type: boolean
default: false

# Custom steps specified by the "caller" of this template, for any additional things that need to be done
# after the steps in this template complete.
- name: additionalSteps
type: stepList
default: []

# If true, the versions of our packages installed for compat testing will be cached.
- name: cacheCompatVersionsInstalls
type: boolean
Expand All @@ -126,6 +121,25 @@ parameters:
- none
- sequential

# if true, the FluidFramework repo will be checked out and a docker-compose env will be spun up for testing
- name: runAgainstDocker
type: boolean
default: false

# Tags for docker environment setup
- name: alfredImageTag
type: string
default: 'latest'
- name: historianImageTag
type: string
default: 'latest'
- name: gitrestImageTag
type: string
default: 'latest'
- name: gitsshImageTag
type: string
default: 'latest'

stages:
- stage: ${{ parameters.stageId}}
${{ if ne(parameters.lockBehavior, 'none') }}:
Expand All @@ -152,8 +166,16 @@ stages:
# basic ANSI color support though, so force that in the pipeline
- name: FORCE_COLOR
value: 1
- name: pipelineHostPath
${{ if eq(parameters.runAgainstDocker, true) }}:
# Running against docker means we'll check out the FluidFramework repo as well as ff_pipeline_host
# When multiple repos are checked out, they are checked out to $(Build.SourcesDirectory)/<REPO_NAME>
value: $(Build.SourcesDirectory)/ff_pipeline_host
${{ else }}:
value: $(Build.SourcesDirectory)

- name: testPackageDir
value: '$(Build.SourcesDirectory)/node_modules/${{ parameters.testPackage }}'
value: '${{ variables.pipelineHostPath }}/node_modules/${{ parameters.testPackage }}'
- name: testPackageFilePattern
value: ${{ replace(replace(parameters.testPackage, '@', '' ), '/', '-') }}-[0-9]*.tgz
# Note that this path must match the path that the packed packages are saved to in the build pipeline.
Expand All @@ -164,7 +186,6 @@ stages:
value: true
- name: artifactPipeline
value: Build - client packages

steps:
# Setup
- checkout: ff_pipeline_host
Expand Down Expand Up @@ -208,6 +229,7 @@ stages:
Pipeline Parameters:
poolBuild=${{ parameters.poolBuild }}
testPackage=${{ parameters.testPackage }}
runAgainstDocker=${{ parameters.runAgainstDocker }}

Pipeline Variables:
isTestBranch=${{ variables.isTestBranch }}
Expand All @@ -219,20 +241,47 @@ stages:
testFileTarName=${{ parameters.testFileTarName }}
artifactPipeline=${{ variables.artifactPipeline }}
artifactBuildId=${{ parameters.artifactBuildId }}
pipelineHostPath=${{ variables.pipelineHostPath }}
"

- template: /tools/pipelines/templates/include-use-node-version.yml@self

- template: /tools/pipelines/templates/include-install-pnpm.yml@self
parameters:
buildDirectory: $(Build.SourcesDirectory)
buildDirectory: ${{ variables.pipelineHostPath }}

- template: /tools/pipelines/templates/include-setup-npmrc-for-download.yml@self

# Set up Docker environment if running against docker
- ${{ if eq(parameters.runAgainstDocker, true) }}:
# Checks out FluidFramework repo
- checkout: self
clean: true
- task: Docker@2
displayName: 'Login to container registry'
inputs:
containerRegistry: 'Fluid Container Registry'
command: 'login'
- task: DockerCompose@1
displayName: 'Start routerlicious environment in docker'
inputs:
containerregistrytype: 'Container Registry'
dockerComposeFile: $(Build.SourcesDirectory)/FluidFramework/server/docker-compose.yml
action: 'Run a Docker Compose command'
dockerComposeCommand: 'up -d'
projectName: 'routerlicious'
env:
REGISTRY_URL: fluidcr.azurecr.io/build
ALFRED_IMAGE_TAG: ${{ parameters.alfredImageTag }}
HISTORIAN_IMAGE_TAG: ${{ parameters.historianImageTag }}
GITREST_IMAGE_TAG: ${{ parameters.gitrestImageTag }}
GITSSH_IMAGE_TAG: ${{ parameters.gitsshImageTag }}

- task: Bash@3
displayName: Install base dependencies
inputs:
targetType: 'inline'
workingDirectory: ${{ variables.pipelineHostPath }}
script: |
set -eu -o pipefail
pnpm install
Expand Down Expand Up @@ -262,7 +311,7 @@ stages:
displayName: Initialize
inputs:
targetType: 'inline'
workingDirectory: $(Build.SourcesDirectory)
workingDirectory: ${{ variables.pipelineHostPath }}
script: |
set -eu -o pipefail
if [[ `ls -1 ${{ variables.testPackagePathPattern }} | wc -l` -eq 1 ]]; then
Expand All @@ -274,13 +323,14 @@ stages:
fi
# Install test package
- task: Bash@3
displayName: 'pnpm install'
displayName: 'pnpm install test package'
# ADO feeds have latency on the order of minutes before packages are available downstream. See:
# https://learn.microsoft.com/en-us/azure/devops/artifacts/concepts/upstream-sources?view=azure-devops#upstream-sources-health-status
# This pipeline installs packages which were published very recently relative to its runtime, hence the rather high retry count here.
retryCountOnTaskFailure: 10
inputs:
targetType: 'inline'
workingDirectory: ${{ variables.pipelineHostPath }}
script: 'pnpm install $(Initialize.testPackageTgz)'

# Download Test Files & Install Extra Dependencies
Expand Down Expand Up @@ -310,8 +360,8 @@ stages:
- task: Bash@3
displayName: Unpack test files
inputs:
workingDirectory: $(Build.SourcesDirectory)/node_modules/${{ parameters.testPackage }}
targetType: 'inline'
workingDirectory: ${{ variables.pipelineHostPath }}/node_modules/${{ parameters.testPackage }}
script: |
set -eu -o pipefail

Expand All @@ -328,15 +378,15 @@ stages:

- template: /tools/pipelines/templates/include-copy-dev-dependencies.yml@self
parameters:
sourcePackageLocation: $(Build.SourcesDirectory)/node_modules/${{ parameters.testPackage }}
destPackageLocation: $(Build.SourcesDirectory)
sourcePackageLocation: ${{ variables.pipelineHostPath }}/node_modules/${{ parameters.testPackage }}
destPackageLocation: ${{ variables.pipelineHostPath }}

- ${{ if eq(parameters.cacheCompatVersionsInstalls, true) }}:
- task: Bash@3
displayName: Compute compat versions install location and version
inputs:
targetType: 'inline'
workingDirectory: $(Build.SourcesDirectory)/node_modules/@fluid-private/test-end-to-end-tests
workingDirectory: ${{ variables.pipelineHostPath }}/node_modules/@fluid-private/test-end-to-end-tests
# Using import.meta.resolve to compute this is more resilient to different install tree types.
# Also note that test-version-utils is esm-only, so cannot be loaded with require.
script: |
Expand Down Expand Up @@ -364,7 +414,7 @@ stages:
timeoutInMinutes: 3
continueOnError: true
inputs:
key: '"compat-version-installs" | "$(Agent.OS)" | "${{ parameters.testCommand }}" | "${{ variant.name }}" | $(compatVersionCacheKey)'
key: '"compat-version-installs" | "$(Agent.OS)" | "${{ parameters.testCommand }}" | "${{ variant.name }}" | "$(compatVersionCacheKey)"'
path: $(compatVersionInstallsPath)

# Only check out tenants from the tenant pool if we are running tests against ODSP
Expand Down Expand Up @@ -413,7 +463,7 @@ stages:
login__odsp__test__tenants: $(tenantCreds)
inputs:
command: 'custom'
workingDir: $(Build.SourcesDirectory)/node_modules/${{ parameters.testPackage }}
workingDir: ${{ variables.pipelineHostPath }}/node_modules/${{ parameters.testPackage }}
customCommand: 'run ${{ parameters.testCommand }} -- ${{ variant.flags }}'

- ${{ if eq(parameters.skipTestResultPublishing, false) }}:
Expand Down Expand Up @@ -455,7 +505,7 @@ stages:
- task: PublishPipelineArtifact@1
displayName: Publish Artifact - Tinylicious Log
inputs:
targetPath: '$(Build.SourcesDirectory)/node_modules/${{ parameters.testPackage }}/tinylicious.log'
targetPath: '${{ variables.pipelineHostPath }}/node_modules/${{ parameters.testPackage }}/tinylicious.log'
artifactName: 'tinyliciousLog_attempt-$(System.JobAttempt)'
publishLocation: 'pipeline'
condition: always()
Expand Down Expand Up @@ -494,7 +544,17 @@ stages:
# parameters:
# buildDirectory: ${{ variables.testPackageDir }}

- ${{ parameters.additionalSteps }}
# Stop the docker environment if running against it
- ${{ if eq(parameters.runAgainstDocker, true) }}:
- task: DockerCompose@1
displayName: 'Stop routerlicious environment in docker'
condition: always()
inputs:
containerregistrytype: 'Container Registry'
dockerComposeFile: $(Build.SourcesDirectory)/FluidFramework/server/docker-compose.yml
action: 'Run a Docker Compose command'
dockerComposeCommand: 'down'
projectName: 'routerlicious'

- template: /tools/pipelines/templates/include-upload-npm-logs.yml@self

Expand Down
Loading
Loading