Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.
×We are using Jenkins (scripted pipelines) and are so excited to be leveraging the new Deployments view in Jira! We ran into one issue when running manual deployments (sans changelog).
Our current workflow is that dev / qa are deployed from the same branch, and dev shows up in the deplyoment view, but QA does not because Jenkins' changlog service does not pull in the changes since its been previously deployed.
Hello @Vanessa Anderson ,
I don't have a wide knowledge on this topic so please excuse me if I write anything wrong.
However, I have asked our dev team and I have been told that deployments from the same branch in different environments should pop up in the issue view as long as you configure the jiraSendDeploymentInfo
in each stage. Each environment in your pipeline should be a different stage. You can find some examples in the below documentation pages:
pipeline { agent any stages { stage('Deploy - Staging') { when { branch 'master' } steps { echo 'Deploying to Staging from master...' } post { always { jiraSendDeploymentInfo site: 'example.atlassian.net', environmentId: 'us-stg-1', environmentName: 'us-stg-1', environmentType: 'staging' } } } stage('Deploy - Production') { when { branch 'master' } steps { echo 'Deploying to Production from master...' } post { always { jiraSendDeploymentInfo site: 'example.atlassian.net', environmentId: 'us-prod-1', environmentName: 'us-prod-1', environmentType: 'production' } } } } }
Also, regarding providing the issue keys to the pipeline, I believe that this is documented in: Integrate Jira Cloud with Jenkins
Specify custom logic to get issue keys
By default, the plugin extracts issue keys from all the commit messages in the change log of the build. It is possible to override this behavior to add your own logic and supply the list issue keys as an issueKeys parameter.
jiraSendDeploymentInfo site: '<sitename>.xyz.net', environmentId: 'us-prod1', environmentName: 'us-prod2', environmentType: 'production', issueKeys: ['DEV-001', 'DEV-002']
For more details on this topic, you may want to review below links:
Cheers,
Dario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.