Create Jenkins pipeline and user chef for deployment

I would like to create a declarative Jenkins pipeline setup for the continues integration and Deployment, My only confusion was how Jenkins and chef are going to communicate in this process, after the continue integration, I want the chef to take over and install the Jar or Zip packages and deploy them on the several nodes from Jfrog Repo. Here maven is my build tool. In Jenkins pipeline I can setup until the build is done , is there any thing that I can do in the Post section of the pipeline for the chef communication for deployment or it has to be done. Please share some suggestion

In my CI setup for Chef, the purpose of the Jenkins pipeline is merely to publish the cookbook to the supermarket, not to deploy. You might consider using that as a model. I found that worked better for what I am doing.

The pipeline lints, runs tests, etc. then publishes to local supermarkets/artifactory. Then the deploys happen afterwards on a pull basis with cron jobs running chef and I don't typically bother trying to get jenkins to verify that the deployment completed in the same pipeline.

In some cases I will use the Push Jobs extension (or equivalent) to force some deployments in a pipeline. You can get job status on that if like via "knife job status", and that may be something you might want to use in your post section. But if you have a lot of servers, it overloads the Chef Server instance more than a gradual deployment. And even with those I make it a pipeline separate from the Chef cookbook CI part that validates cookbook code.

Thanks a lot for your reply.... This really helps. Please do share if any chef documentation available around this topics.

I used to be a trainer for Chef :slight_smile: This is what I taught as part of the Chef Delivery training back in the day (the now defunct workflow piece of automate). I'll look to see if any of that material is still available.

It looks like the "Chef Push Jobs" documentation is still there at least: https://docs.chef.io/push_jobs/

Chef Delivery/Workflow was initially built around Chef Push Jobs. It was an integral piece in how it triggered things.

thanks a lot much appreciated .....