【发布时间】:2019-02-16 06:34:16
【问题描述】:
在我的 bitbucket-pipelines.yml 文件中添加锚点后,我得到了:
配置错误 bitbucket-pipelines.yml 文件中的“主”部分缺少“步骤”。请添加缺少的“步骤”以修复错误。
但是,根据https://bitbucket-pipelines.prod.public.atl-paas.net/validator,配置是有效的
image: node:latest
definitions:
caches:
node: ./node_modules
steps:
- step: &Test-step
name: Run tests
script:
- npm install
- npm run test
- step: &Deploy-step
caches:
- node
script:
- sh bin/pipeline/backend-url-replace.sh
- npm run build
- sh bin/pipeline/deployment.sh
- step: &E2E-step
name: E2E tests
caches:
- node
image: cypress/base:10
script:
- set +e; npm run cy:test
- sh bin/pipeline/cypress-media-cp.sh
pipelines:
branches:
master:
- step: *Test-step
- step:
<<: *Deploy-step
name: Deploy to Test
deployment: test
- step:
<<: *Deploy-step
name: Deploy to Staging
trigger: manual
deployment: staging
release/*:
- step: *Test-step
- step:
<<: *Deploy-step
name: Deploy to Staging
deployment: staging
我做错了什么?
【问题讨论】:
标签: yaml bitbucket bitbucket-pipelines