Gitlab commit messages link to JIRA - 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.

Related

Updating JIRA issues from gitlab pipeline

I want to move an issue to the deployed stage (transition) when the gitlab pipeline of a merge request has finished. Is that even possible?
My Idea so far:
The pipeline is related to that specific issue by both the branch name (see 1.) of the merge request and also the message of that merge request like so "Finish PV-1234".
I can parse the issue key from the branch name.
I can call a server to run a script making the Jira api call.
If you directly want to close the issu, look into the gitlab jira integration docs - therefore you have to add a description to your MR, to tell the integration to close the issue, as soon as the MR was merged.
If you want more control, write yourself a simple script, that first gets the ids of the available transition (You can get them via /rest/api/3/issue/{issueIdOrKey}/transitions see here) and after that posts the transition you want (You can do that by posting on the same endpoint, as the get command mentioned before see here).
Sad that the jira integration doesn't provide more issue-movement than jsut closing issues...

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.

Automatically add link to pull request to JIRA

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.

Bamboo Bitbucket integration

Bamboo and bitbucket are two pieces from the same vendor and there should be no problem integrating those two with each other, but I have a weird situation.
Here is what i get when trying to add bitbucket repo to my Bamboo.
See attached screenshot.
I'm pretty sure my repo is public and I use correct bitbucket user account name.
Thanks in advance.
I have installed BAMBOO to AWS using Java script provided by Atlassian
At the end it gave me a web UI links as on following screenshot .
It worked, however some functionality was blocked by XSRF (that is not enabled by default in Atlassian products).
Works fine when I use native Bamboo URL (HTTP and port 8085) instead on HTTPS.
Be careful with that... I just wasted about 2 days trying to fix something that didn't have to be fixed at all.
Have you linked your Bitbucket repo to Bamboo server. If not see this https://confluence.atlassian.com/bamboo/linking-to-another-application-360677713.html
May be this can help.

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!

Resources