我有一个具有如下文件夹结构的 monorepo:
如何更改 azure-pipelines.yml 来构建 packageA
我尝试通过指定 packageA 的路径来更改 azure-pipelines.yml。但是,我是 ci/cd 的新手,所以我不知道如何解决我的问题。目前我将此作为我的 azure-pipelines.yml 文件:
# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://learn.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
branches:
include:
- master
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.x'
displayName: 'Install Node.js'
- script: |
npm install
npm run unit_tests
displayName: 'npm install and build'
Run Code Online (Sandbox Code Playgroud)
.yml 文件位于 monorepo 的根文件夹中。管道构建将失败,因为它找不到 package.json 来运行 packageA …
continuous-integration pipeline azure-devops azure-pipelines monorepo