Trigger downstream pipeline job for the branch via from upstream freestyle job I have an upstream freestyle job and a downstream pipeline job.

The freestyle job is triggered via a gitHub webhook to run whenever code is pushed to gitHub branch.

The freestyle job should capture the branch name and pass to the pipeline job and should trigger the build for that particular branch.

How to pass the branch name to the pipeline job dynamically?
The "Add Parameters" can help you. You should set up your downstream pipeline with "GIT_BRANCH" parameter to build with that branch, and transfer it from this upstream job.