如何使用Python作为Jenkins或其他CI的脚本语言?

发布于 2025-02-13 08:09:25 字数 226 浏览 0 评论 0原文

在Jenkins CI中定义任务时,它是用Shell编写的。但是,我一直在使用Python作为脚本语言(有些依赖性)代替Shell。因此,我想知道如何在詹金斯(Jenkins)运行它?

一个天真的想法是,将所有依赖性的python包装到詹金斯CI中运行的码头图像中。但是,这听起来并不方便,因为我们将不得不为jenkins中使用的每个 docker映像添加python(和依赖项),这将是很多。

感谢您的建议!

When defining tasks in Jenkins CI, it is written in Shell. However, I have been using Python as the scripting language (with some dependencies such as typer) in place of Shell. Therefore, I wonder how to run it in Jenkins?

A naive thought is to package a Python with all its dependencies into docker images that are to be run in Jenkins CI. However, that does not sound convenient, because we will have to add Python (and dependencies) for each and every docker image to be used in Jenkins which would be a lot.

Thanks for any suggestions!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文