如何选择在我的掌舵版本上运行哪个测试套件 [英] How to choose which test suite to run on my helm release

查看:65
本文介绍了如何选择在我的掌舵版本上运行哪个测试套件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在头盔版本上的不同(部分手动)CI作业中运行不同的测试套件。

I want to run different test suites on my helm release in different (partly manual) CI jobs.

如何最好地从CI作业执行这些测试套件?

How do I best execute these test suites from a CI job?

详细信息:

使用单个测试套件, helm test 非常有帮助。但是我怎么能容易地告诉 helm test 要执行哪个测试套件?

With a single test suite, helm test is very helpful. But how can I easily tell helm test which test suite to execute?

目前,我只有两个测试套件 A B 以及环境变量 SUITE 我通过头盔安装注入。测试作业根据 SUITE 的值确定要执行的测试套件。但是这种注入很复杂,我希望有可能依次或同时执行多个测试套件。

Currently, I have only two test suites A and B and an environment variable SUITE I inject via helm install. The test job decides based on the value of SUITE which test suite to execute. But this injection is complex and I would like to have the possibility to execute multiple test suites sequentially or concurrently.

因此,我创建了两个舵图 A.yaml B.yaml 。我可以用特定的头盔图表以某种方式调用 helm test ,例如 helm test general / A.yaml (请参阅可以使用Helm测试单独运行套房?)?

Thus I created two helm charts A.yaml and B.yaml. Can I somehow call helm test with a specific helm chart, e.g. helm test general/A.yaml (see Can Helm test be used to run separate suites?)?

如果没有,最好的方法是什么?在实例0中使用 deployment-A deployment-B 并在实例执行时将部署扩展到1?然后,如何将(失败的)测试执行(和日志输出)传达回CI(在我的情况下为gitlab)?

If not, what is the best approach? Using deployment-A and deployment-B with instances 0 and scale a deployment to 1 when we want to execute it? How do I then communicate the (un-)successful test execution (and log output) back to CI (gitlab in my case)?

推荐答案

恐怕Helm当前不支持此功能(请查看此未解决的问题

I'm afraid this is not currently supported in helm (check out this opened issue on github).

相反,您可以做的是创建一个单独的图表文件夹,其中包含其中一项测试,或者签出章鱼。创建它是为了将 helm test 替换为其他功能,其中之一是选择性测试。

What you can do instead is create separate chart folder with one of the tests in it or check out Octopus. It was created to replace helm test with additional functionalities and one of them is selective testing.

这篇关于如何选择在我的掌舵版本上运行哪个测试套件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆