# Copyright (c) Microsoft Corporation and contributors. All rights reserved. # Licensed under the MIT License. # server-gitrest pipeline name: $(Build.BuildId) parameters: - name: releaseBuildOverride displayName: Release Build (default = not released) type: string default: none values: - none - release - name: publishOverride displayName: Publish Override (default = based on branch) type: string default: default values: - default - skip - force - name: buildToolsVersionToInstall displayName: Fluid build tools version (default = installs version in repo) type: string default: repo trigger: branches: include: - main - release/* paths: include: - .prettierignore - fluidBuild.config.cjs - server/gitrest - tools/pipelines/server-gitrest.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 pr: branches: include: - main - release/* paths: include: - .prettierignore - fluidBuild.config.cjs - server/gitrest - tools/pipelines/server-gitrest.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-use-node-version.yml variables: - template: /tools/pipelines/templates/include-vars.yml@self parameters: releaseImage: true publishOverride: ${{ parameters.publishOverride }} releaseBuildOverride: ${{ parameters.releaseBuildOverride }} buildNumberInPatch: true # 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 }} dockerBuildBumpsVersion: true emitDockerImageDigest: true # Root-only install: gitrest 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 # The --build-context is needed because the Dockerfile copies files from the repo root. additionalBuildArguments: --build-context root=$(Pipeline.Workspace)/${{ variables.FluidFrameworkDirectory }} buildDirectory: ${{ variables.FluidFrameworkDirectory }}/server/gitrest containerName: fluidframework/routerlicious/gitrest test: test tagName: gitrest lint: true pack: true enableDockerImagePull: false checks: - prettier