0

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.

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.

newTask
  • 87
  • 1
  • 2
  • 8

1 Answers1

0

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.

So, whenever you run the seed job, the child jobs will run on the docker container slaves.

You can refer to this stackoverflow post or Jobs as Code with Groovy DSL to learn more about Jenkins Job DSL.

Sourav
  • 3,025
  • 2
  • 13
  • 29
  • Thanks @Souravatta. I have created a docker compose file which installs Jenkins, soap ui and nexus on my docker machine. I now have a Jenkins pipeline running. I need to connect to that docker pipeline via the docker compose file. Could you please give some pointers for that. Thank you. – newTask Jul 03 '20 at 10:09