Once you install the Jenkins plugin and set up the configuration page, you need to add a ‘deployment step’ in your pipeline. This is what tells the Jenkins pipeline, when running, to send data to Jira or not.
You generate a Pipeline script, then use this in your Jenkinsfile.
Please select the Jira Software Cloud site name you would like to create the pipeline script for. You can only select 1 site at this time. If you want to send information to multiple sites, please create multiple Pipeline Scripts.
You also need to specify the environment ID, name and type. Valid environment types are 'unmapped', 'development', 'testing', 'staging' and 'production'.
State and Service Ids are optional parameters. Use state to explicitly describe your deployment state or it will determine from the Jenkins job for you. Valid state values: 'unknown', 'pending', 'in_progress', 'cancelled', 'failed', 'rolled_back', 'successful'
Service Ids uses to automatically create a change management request for your deployment
Please see https://developer.atlassian.com/cloud/jira/software/rest/#api-group-Deployments for more information.