Automatically add link to pull request to JIRA - bitbucket

We have a setup with Bitbucket GIT linked to JIRA issue tracker. It is possible to add special comments to GIT commit messages to update JIRA issues automatically.
However, is it possible to put the link to the Pull Request, when it is created, to the corresponding JIRA issue? JIRA issue knows the name of the branch, so it should also have information on the pull requests.

If you reference your issue keys in your commit messages, branches and pull requests then this information will automatically appear in your issue's development panel.
This requires that you have an application link configured between JIRA and Bitbucket.
This is how it should look:
More info is available on the Development Information documentation page.

Related

Is there a way to get gerrit to reject commits without a JiRA ticket number?

How does an admin configure Gerrit to automatically reject commits without JiRA ticket number? I've read this documentation but not sure how to implement it on all branches in a specific repository (not all repos!). Do all users need to download the file and copy it to their local repository or how does it work? What I want to achieve is that git/gerrit automatically rejects a commit that are missing a JiRA ticket number - doesn't have to be valid, it's up to the team to control that the ticket number is valid.
The Jira plugin is based in the ITS plugin. These plugins have a association configuration that can be set to MANDATORY.
MANDATORY : One or more issue-ids are required in the git commit message, otherwise the git push will be rejected.
SUGGESTED : Whenever git commit message does not contain one or more issue-ids, a warning message is displayed as a suggestion on the client.
OPTIONAL : Issues-ids are liked when found on git commit message, no warning are displayed otherwise.
The below config example is taken from the Jira plugin documentation.
[commentLink "Jira"]
match = (\\[[A-Z][A-Z]+-[1-9][0-9]*\\])
html = "$1"
association = MANDATORY
The Git::Hooks is the best solution to this job.
See how to install and configure it here.
See more info about it here.

ghprbActualCommitAuthorMail returns wrong mail address

I am using the GitHub pull request builder plugin in Jenkins to make pull requests on GitHub automatically trigger Jenkins jobs.
I am using GitHub Enterprise and when I try to get the values of environment vars ghprbActualCommitAuthor and ghprbActualCommitAuthorMail, I get incorrect values:
ghprbActualCommitAuthor : GitHub Enterprise
ghprbActualCommitAuthorEmail : noreply#github.***.com
Please help, thanks!
This behavior is seen in GitHub Enterprise when users commit changes directly using the web UI or they have not set their email addresses.
According to GHE support:
This is by design, since the commit is actually done by the GitHub Enterprise instance. This is because we do not impersonate users when creating commits.
You can fix this by ensuring that users make commits only through the Git clients using their own SSH credentials or Personal Access Tokens.

Jira Jenkins Integration | Issue Id

I was trying to get an SVN, Jenkins and Jira integration going. The aim being to change the status of a ticket/issue to 'Fixed' when it is referred to in an SCM comment. The process being orchestrated by Jenkins. The flow details are
developer puts in the Jira ticket number (MDP-1) on an SVN commit
message.
The build is kicked off in JenkinsJenkins (using the Jira
plugin) can figure out the Jira ticket referred to it in the SVN
commit message. It updates the Jira ticket by putting in a Jira
comment.
So far, this is working great!
Now, I also want to change
the status of the ticket to 'fixed'. I am trying to use the Jenkins
step (Progress jenkins issues by workflow action). I am unable to
access the Jira issue ID/ticket number.
I know, under the hood, the Jira plugin has access to this. Thats why it is able to put in a comment to the Jira ticket in the first case. Question is how/what variable do I use to get access to this Jira ticket# in Jenkins
I actually got this working with another Jenkins plugin (https://wiki.jenkins-ci.org/display/JENKINS/Jira-Ext+Plugin).
This captures the Jira issue_id(s) captured in the SCM commit message and exposes them in an environment variable.
Just what I was looking for!

Gitlab commit messages link to JIRA

I'm trying to link Gitlab commit messages to JIRA, that is, if a user commits such as:
PROJECT-ID: Some commit message
Then through the Gitlab UI, it links these commit messages to JIRA.
The only way I can seem to do this at the moment takes control of issue tracking itself from Gitlab and links the "Issue" user interface button in Gitlab back to JIRA.
I'd like to still manage and raise issues in Gitlab, but just have Gitlab link any formatted commit messages to JIRA.
I'm using the community addtion
Unless you set GitLab to use JIRA as your issue tracker, you can't make it link formatted commit messages to JIRA automatically.
You can do this only if you set JIRA to be your issue tracker in GitLab. You can find information about doing that here: http://doc.gitlab.com/ee/integration/jira.html
UPDATE: As Peter said, this functionality is only available using GitLab's Enterprise Edition.
UPDATE: As jalanb stated in the comment below, this functionality is now available in the community edition as well.
There is also the lesstif/gitlab-jira-integration open source solution, that I haven't tried yet myself. It is only a few commits, but I myself considered this approach so it must be sound ;-)
I'm a little confused though. You write you want to use Jira and "I'd like to still manage and raise issues in Gitlab, but just have Gitlab link any formatted commit messages to JIRA." I'm not sure you can get the supertight integration you're looking for. Or maybe I misunderstand.

Cannot set artifactory repository on Jenkins

I followed Empower Jenkins with Artifactory video on YouTube. Basically, I added a new user to artifactory and granted it deploy permissions. Then I configured system configuration on Jenkins and tested that the configurations were right.
I created a new job and tried to set the deployment task to deploy it to artifactory. The problem is there is no repository on the dropdown.
I want to know how to fix this.
Try saving the job and reloading it.
The logic behind this behavior is to avoid a long list of repositories. Some users have hundreds of local repositories which takes a long time to display. By entering credentials, you can display a filtered list containing only relevant repositories.
There is an open issue to add a refresh button so there will be no need to save the job prior to displaying the list.
Update
This issue was resolved with the release of version 2.2.3 of the plugin. For more info see HAP-483

Resources