How can Jenkins help to implement CI/CD for Drupal? Assume you want to implement continuous-integration (= CI) and continuous-deployment (= CD) for building and maintaining websites using Drupal (let's assume for Drupal Version 7). Often times Jenkins seems to be recommended as one of the most appropriate solutions for doing so.

But what kind of CI/CD related functionality can I actually use it for? Here are some of things I'm thinking of, but I'm not sure if I'm correct on that, and/or if these are the only things:


CI related: Automated testing.
CD related: Migrating custom module development between dev / staging / QA environments.
What you've listed is actually two different things, continuous delivery and continuous integration.  When people talk about CI they typically are only referring to the testing part; automated unit, function, and integration testing with some sort of version bump or code promotion at the end.  Looks like the Jenkins wiki has some specific pointers about Drupal.

As far as environment promotion, you're getting into continuous delivery which Jenkins can also be used for.  Consider looking at the more modern Jenkins Pipelines for CD pipelines.