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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.