0

它在 Pipeline 的 can-i-deploy 阶段给出的错误如下:

The verification between the latest version of BusinessEventConsumerCustomerConsentionPhoneCall with tag phoenix (fd53a677) and version 002bf857 of EarningAPI failed

我没有做任何破坏契约契约的事情。gitlab-ci.yaml 文件中的代码如下:

pact-can-i-deploy-to-phoenix:
  stage: pact-can-i-deploy-to-phoenix
  image: registry.gitlab.com/modanisatech/customer/docker-images/pact-cli/master:latest
  script:
    - pact-broker can-i-deploy --pacticipant EarningAPI --version $CI_COMMIT_SHORT_SHA --to phoenix --retry-while-unknown=12 --retry-interval=10
  except:
    - triggers
  tags:
    - customer

pact-tag-for-phoenix:
  stage: pact-tag-for-phoenix
  image: registry.gitlab.com/modanisatech/customer/docker-images/pact-cli/master:latest
  script:
    - pact-broker create-version-tag --pacticipant EarningAPI --version $CI_COMMIT_SHORT_SHA --tag=phoenix
  except:
    - triggers
  tags:
    - customer

在这张图片中,虽然在 pact broker 中有相同版本的 pact 测试,但有两个通过,两个没有通过。

在此处输入图像描述

这里的主要问题是它应该验证一个协议测试,但它会尝试验证属于该 api 的所有测试。

什么可能导致这个问题,有什么建议吗?我会很高兴的,谢谢!

4

2 回答 2

0

协议验证是如何完成的?验证失败的细节是什么?提供商团队可能进行了导致此问题的更新。很难从给定的描述中提供适当的答案。

于 2021-12-29T15:44:34.557 回答
0

试着这样写:

stages:
    - pact-can-i-deploy-to-phoenix
    - pact-tag-for-phoenix
    
pact-can-i-deploy-to-phoenix:
  stage: pact-can-i-deploy-to-phoenix
  image: registry.gitlab.com/modanisatech/customer/docker-images/pact-cli/master:latest
  script:
    - pact-broker can-i-deploy --pacticipant EarningAPI --version $CI_COMMIT_SHORT_SHA --to phoenix --retry-while-unknown=12 --retry-interval=10
  except:
    - triggers
  tags:
    - customer

pact-tag-for-phoenix:
  stage: pact-tag-for-phoenix
  image: registry.gitlab.com/modanisatech/customer/docker-images/pact-cli/master:latest
  script:
    - pact-broker create-version-tag --pacticipant EarningAPI --version $CI_COMMIT_SHORT_SHA --tag=phoenix
  except:
    - triggers
  tags:
    - customer

于 2021-12-27T13:21:31.417 回答