【发布时间】:2019-07-29 04:02:13
【问题描述】:
我的 gitlab 项目中有 3 个主要分支:dev、staging、production。我在.gitlab-ci.yml 中使用 postman newman 进行这样的集成测试:
postman_tests:
stage: postman_tests
image:
name: postman/newman_alpine33
entrypoint: [""]
only:
- merge_requests
script:
- newman --version
- newman run https://api.getpostman.com/collections/zzz?apikey=zzz --environment https://api.getpostman.com/environments/xxx?apikey=xxxx
此脚本仅在从 dev 到 staging 或 staging 到生产的合并请求批准过程中运行。问题是我只需要在从暂存到生产的合并请求批准过程中运行这个 postman newman 测试,我该如何实现?
【问题讨论】:
标签: continuous-integration gitlab integration-testing gitlab-ci gitlab-ci-runner