# Copyright (c) Microsoft Corporation and contributors. All rights reserved. # Licensed under the MIT License. # server-routerlicious pipeline name: $(Build.BuildId) parameters: - name: releaseBuildOverride displayName: Release Build (default = not released) type: string default: none values: - none - prerelease - release - name: publishOverride displayName: Publish Override (default = based on branch) type: string default: default values: - default - skip - force - name: interdependencyRange displayName: Range to use for interdependencies (only affects releases) (default = ~) type: string default: "~" # The " " value (a space) is a hacky workaround. ADO doesn't support empty string, but we ultimately use this value as # an environment variable in a bash script (the 'update package versions' step), where it gets coerced back to the # empty string. values: - "^" - "~" - " " - name: buildToolsVersionToInstall displayName: Fluid build tools version (default = installs version in repo) type: string default: repo trigger: branches: include: - main - release/* paths: include: - .prettierignore - common/build/eslint-config-fluid - fluidBuild.config.cjs - server/routerlicious - tools/pipelines/server-routerlicious.yml - tools/pipelines/templates/build-docker-service.yml - tools/pipelines/templates/include-add-docker-image-digest.yml - tools/pipelines/templates/include-generate-publish-metadata.yml - tools/pipelines/templates/include-set-package-version.yml - tools/pipelines/templates/include-vars.yml - tools/pipelines/templates/include-install-pnpm.yml - tools/pipelines/templates/include-generate-notice-steps.yml - tools/pipelines/templates/include-use-node-version.yml exclude: - server/routerlicious/kubernetes/routerlicious pr: branches: include: - main - release/* paths: include: - .prettierignore - common/build/eslint-config-fluid - fluidBuild.config.cjs - server/routerlicious - tools/pipelines/server-routerlicious.yml - tools/pipelines/templates/build-docker-service.yml - tools/pipelines/templates/include-add-docker-image-digest.yml - tools/pipelines/templates/include-generate-publish-metadata.yml - tools/pipelines/templates/include-generate-notice-steps.yml - tools/pipelines/templates/include-set-package-version.yml - tools/pipelines/templates/include-vars.yml - tools/pipelines/templates/include-install-pnpm.yml - tools/pipelines/templates/include-use-node-version.yml exclude: - server/routerlicious/kubernetes/routerlicious variables: - template: /tools/pipelines/templates/include-vars.yml@self parameters: releaseImage: true publishOverride: ${{ parameters.publishOverride }} releaseBuildOverride: ${{ parameters.releaseBuildOverride }} buildNumberInPatch: false # Loaded at the root level rather than inside the build-docker-service.yml template's variables so # that $(containerRegistryConnection) is available before ADO performs service-connection pre-checks # on the Docker tasks (the value is otherwise treated as a literal connection name). - group: container-registry-info extends: template: /tools/pipelines/templates/build-docker-service.yml@self parameters: testBuild: ${{ variables.testBuild }} shouldPushDockerImage: ${{ variables.pushImage }} shouldReleaseDockerImage: ${{ variables.releaseImage }} shouldPublishNpmPackages: ${{ variables.publish }} releaseKind: both publishOverride: ${{ parameters.publishOverride }} publishAsPartOfBuild: false buildToolsVersionToInstall: ${{ parameters.buildToolsVersionToInstall }} interdependencyRange: ${{ parameters.interdependencyRange }} buildDirectory: ${{ variables.FluidFrameworkDirectory }}/server/routerlicious containerName: fluidframework/routerlicious/server buildNumberInPatch: false dockerBuildBumpsVersion: true emitDockerImageDigest: true # Root-only install: r11s has native deps that don't install in CI; the real build runs in Docker. # Root deps are still needed for the version-setting step. installWorkspaceRootOnly: true tagName: server pool: Large-eastus2 pack: true lint: true test: ci:test # Disabled: coverage performance regressed in Node 22, causing test timeouts # that need mitigation before coverage can be reenabled. # testCoverage: ${{ ne(variables['Build.Reason'], 'PullRequest') }} docs: true containerBaseDir: /usr/FluidFramework/server/routerlicious checks: - prettier - check:versions - generate:packageList # The --build-context is needed because the Dockerfile copies files from the repo root. additionalBuildArguments: --build-context root=$(Pipeline.Workspace)/${{ variables.FluidFrameworkDirectory }} enableDockerImagePull: false