Use the Jira cloud plugin for Jenkins
This plugin will send build and deployment events to Jira so that they’re visible in your Jira issues, on the deployments timeline, and in the Releases feature.
To send information from Jenkins to Jira, your team must include Jira issue keys (e.g. FUSE-123) in their commit messages (for deployment information) and branch names (for build information). Whenever a pipeline runs in Jenkins, the plugin will look for Jira issue keys in the branch name and commit messages. If it finds issue keys, it will send build and deployment information to Jira. If it doesn’t find issue keys, the Jenkins plugin won’t send anything to Jira.
Sending builds automatically
To automatically send build events without having to add anything to your Jenkinsfiles, go to Manage Jenkins > Configure System and enable the checkbox “Sends builds automatically”.
When you enable this, the plugin will send an "in progress" build event to Jira once a pipeline run has started and a "success" or "failure" build event once the pipeline has finished successfully or stopped due to an error.
If you also specify a regular expression for builds, the plugin will only send a build event to Jira once a build step with a matching name has been finished.
The regular expression ^build$ would match the build stage in the following Jenkinsfile, for example: