简体   繁体   English

Jenkins管道的容器化

[英]Containerization of Jenkins pipeline

I have a Jenkins pipeline for APIC(API Connect), which downloads the code from git hub, validates the code, deploys the code on API Manager(present on Cloud Pak), tests it using Soap UI and finally stores the test report on Nexus. I have a Jenkins pipeline for APIC(API Connect), which downloads the code from git hub, validates the code, deploys the code on API Manager(present on Cloud Pak), tests it using Soap UI and finally stores the test report on Nexus .

I now have to containerize this entire pipeline, so that it could be put on any server or any machine and can be started as a self sufficient service.我现在必须将整个管道容器化,以便它可以放在任何服务器或任何机器上,并且可以作为自给自足的服务启动。

I understand that I would need to use docker for this, push the images for the tools used and then have some sort of interconnection between the images.我知道我需要为此使用 docker,推送所用工具的图像,然后在图像之间进行某种互连。

Please help me if my understanding is correct and what should be the approach that I should follow.如果我的理解正确以及我应该遵循的方法,请帮助我。 Any reference links are appreciated.任何参考链接表示赞赏。

Thanks in advance.提前致谢。

You can make use of Jenkins DSL Plugin to create a seed job of your pipeline and then, you can make use of Docker container as build slaves for Jenkins .您可以使用Jenkins DSL 插件来创建管道的种子作业,然后您可以使用Docker 容器作为 Jenkins 的构建从站

So, whenever you run the seed job, the child jobs will run on the docker container slaves.因此,无论何时运行种子作业,子作业都将在 docker 容器从属服务器上运行。

You can refer to this stackoverflow post or Jobs as Code with Groovy DSL to learn more about Jenkins Job DSL.您可以参考此stackoverflow 帖子Jobs as Code with Groovy DSL以了解有关 Jenkins Job DSL 的更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM