【发布时间】:2020-09-01 05:47:02
【问题描述】:
我正在使用一个开源项目 Magda (https://magda.io/docs/building-and-running),并希望创建一个 Azure CI/CD 管道。
对于这个项目,有一些先决条件,比如安装了 sbt + yarn + docker + java。
如何在azure-pipelines.yml 文件中指定这些要求。
是否可以在azure-pipelines.yml 文件中只编写脚本?不使用任何工作或任务?它们之间有什么区别(任务,工作......)
(我目前是入手,所以经验不多)
这是我当前的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://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- release
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '10.0.0'
displayName: 'Install Node.js'
- script: |
npm install
npm run build
displayName: 'npm install and build'
- script: |
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
displayName: 'install Helm '
- script: |
yarn global add lerna
yarn global add @gov.au/pancake
yarn install
displayName: 'install lerna & pancake packages'
- script: |
export NODE_OPTIONS=--max-old-space-size=8192
displayName: 'set Env Variable '
- script: |
lerna run build --stream --concurrency=1 --include-dependencies
lerna run docker-build-local --stream --concurrency=4 --include-filtered-dependencies
displayName: 'Build lerna '
【问题讨论】:
-
嗨@Wassim 您是否查看了以下 Krzysztof Madej 的详细答案。如果您认为它有资格作为答案,您可以接受它。
标签: azure azure-devops continuous-integration azure-pipelines