小编Shu*_*dey的帖子

如何防止 Bitbucket Pipelines 中的步骤失败?

我正在运行我所有的测试用例,其中一些用例有时会失败,管道检测到它并使步骤和构建失败。这会阻止要执行的下一步(压缩报告文件夹)。我想将该 zip 文件作为电子邮件附件发送。

这是我的 bitbucket-pipelines.yml文件

custom: # Pipelines that can only be triggered manually
  QA2: # The name that is displayed in the list in the Bitbucket Cloud GUI
  - step:
      image: openjdk:8
      caches:
      - gradle
      size: 2x    # double resources available for this step to 8G
      script:
      - apt-get update
      - apt-get install zip
      - cd config/geb
      - ./gradlew -DBASE_URL=qa2 clean BSchrome_win **# This step fails** 
      - cd build/reports
      - zip -r testresult.zip BSchrome_winTest 

      after-script: # On test …
Run Code Online (Sandbox Code Playgroud)

pipeline bitbucket-pipelines

5
推荐指数
2
解决办法
3999
查看次数

标签 统计

bitbucket-pipelines ×1

pipeline ×1