When I'm looking for a badge with status for given branch I'm using branch parameter in URL. I'd like to do the same with the link to the latest build or build history of a given branch.
If this is not possible currently I'd be more than happy having such feature provided.
Travis doesn't seem to currently implement this.
There is an open issue requesting such a feature though:
https://github.com/travis-ci/travis-ci/issues/1996
If you need URL, the only workaround is to point to:
https://travis-ci.org/{owner_name}/{repo_name}/branches
which would list all branch build history.
Otherwise access to branch build history this can be achieved via Travis CI API in JSON format (as discussed in GH #1996), so it's:
https://api.travis-ci.org//v3/repo/{repository.id}/branch/{branch.name}
To find your repository.id, see: What is the “repository ID” discussed in the Travis-CI API?
Related
I have a preflight job using perforce in which I retrieve a branch, unshelve (apply) a given changelist on it and then build to validate that the change in question has not broken the build. Very similar to what you would do for a GitHub Pull Request type of CI.
I use the official checkout() pipeline call to get the branch as it simplify dealing with the perforce creds, and that causes the jenkins build to include the changelog of that branch in the build. Yet, those are of no interest to me, as my interest is on the changelist I am unshelving on top of that branch.
Can I, from the pipeline script clear and fill the currentBuild.changeSet? If so, would someone have an example and which fields I can set under currentBuild.changeSet.items?
Or doing is only possible by going through the plugin road in the same way the p4/git plugins are doing this?
My advice, don't play with the currentBuild.changeSet. It also contains the changeset of the shared libraries you are using. I personally don't rely on that anymore.
However, here is an article on how to update the changeSet
https://support.cloudbees.com/hc/en-us/articles/217630098-How-to-access-Changelogs-in-a-Pipeline-Job-
Here is an exemple on how to implement that in a pipeline
https://issues.jenkins-ci.org/browse/JENKINS-58441
Finally, in an ideal world, don't share your jenkins with management or non developers/testers, share only a dashboard that is connected to a database that you filled with the relevant information you need. I use influxdb+grafana to do that with the influxdb plugin
I am using the "Embeddable build status" plugin for Jenkins.
I cannot get the build status of a specific branch working, it always shows "not run" status.
I am using the unprotected link:
[![Build Status](http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/buildStatus/icon?job=vuffeli_api)](http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/job/vuffeli_api/)
I have given Anonymous viewstatus permissions on jobs globally.
This works fine but as soon as I add the branch information it stops working.
I have tried the following combinations and am at a loss.
http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/buildStatus/icon?job=vuffeli_api%2Fmaster)
http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/buildStatus/icon?job=vuffeli_api%252Fmaster
http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/buildStatus/icon?job=vuffeli_api%2Forigin%252Fmaster
http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/jenkins/buildStatus/icon?job=vuffeli_api%2Fvuffeli_api%252Fmaster
I was expecting the badge to show the status of the master branch but it is grey and displays "not run"
EDIT 27-05-2019
A temporary solution has been to have multiple projects in jenkins that filter what branches trigger builds and then show a status for projects that only build and test specific branches.
I have not found a better solution than to have statuses displayed for all relevant branches and I have since stopped using jenkins and started using Azure pipelines instead.
If any of you find a solution please submit the answer but for now I will consider this closed.
You need to make sure that you have BRANCH Parameter for this job and then:
http://ec2-34-251-244-92.eu-west-1.compute.amazonaws.com/job/vuffeli_api/badge/icon?build=firstSuccessful:${params.BRANCH=master}
(worked for me)
Note that this feature is supported since v2.0:
https://github.com/jenkinsci/embeddable-build-status-plugin/issues/27
Is there any Stash/Bitbucket plugin which takes care of marking JIRA issue as resolved when request is merged?
Smart Commits for Bitbucket should be able to handle that.
This functionality is built into JIRA Software as part of the integration with Bitbucket. All that should be required is for you to do some configuration of your JIRA workflow and for you to include Issue keys in your branch names & commit messages.
There is a knowledge base article here that documents how to set up workflow triggers.
The exact need is to force all commits into Bitbucket to be linked to a JIRA ticket.
I have does this before on Subversion by creating a commit hook that looked for the JIRA ticket in the commit text, but I don't want this solution to be necessarily constrained to that prior experience.
Does Bitbucket have a setting somewhere to force association for all commits against Jira tickets? If not - does it have a mechanism for enforce commit comment quality (some sort of hook or regex)? If not - does GIT have something that we can use for this purpose?
The imagined solution is (but not limited to being) a commit hook that fails the commit if the comment text does not contain a leading JIRA ticket, followed by a colon, followed by some commit text, such that:
git commit -m "foo"
fails and
git commit -m "PRJ-9327: foo"
commits...
The BitBucket issue 5658 just got implemented today (April 13th, 2017)
Option to reject commits without an issue key in their message
This feature is now available to all users via the repository settings "links" page
The pre-receive hook that rejects pushes when any commit does not have a valid issue key in its message.
The current implementation relies on the per-repository "Links" setting to determine what a valid issue key looks like. This gives us the ability to validate against Jira, Bitbucket Issues, Connect add-ons, and any configured custom Links.
So you don't need for a third-party plugin anymore.
Update (14 April 2017)
It looks like this feature has been integrated to the JIRA mainline and should be released soon. See VonC's answer for details.
Original answer
There is a number of plugins for Bitbucket that can do this. For example Commit Policy Plugin for Bitbucket (free)
Disclosure: I'm not in any way connected to the team behind the plugin I mentioned.
I have installed Jira and the subversion plugin (with success from what i can tell from the administration panel - subv. plugin installed).
I then add a repository that I have created on the file system, BUT i cannot see an option which will link/connect a new or existing project to a SVN repository. What i want to do is link a project with a repository so I can track commits made to the project (link commits with issues). After some searching i found that this is possible but I cannot figure a way to do it.
Do I need another plugin for that? I have tried googling for the last hours but I cannot find anything related.
regards,
The way SVN-Jira linking works by default is to simply put the issue identifier of the Jira issue in the comment when committing to the SVN repository.
It can be helpful to enable comment editing in the repository, if you have past commits or users who forget to add comments when committing.
Example commit comment:
Fixed problem with login. See issue MYJIRAPROJECT-26 in issue tracker.
There's a service in Jira which scans the SVN repository at regular intervals, and builds a cache of any SVN revisions where an issue identifier appears. Depending on the polling interval, it make take a few minutes for the commit to show up in Jira.
The polling time is controlled by the JIRA Service for the SVN plugin. See Admin, Services.
~Matt
you can enforce that future subversion commits require a jira issue reference for more reliable--than relying on your programmer's word ;)--jira-subversion integration
the jira commit acceptance plugin can be configured to block commits that don't include a valid (defined by subversion-jira project mapping and/or regular expression as appropriate to your situation) jira issue reference in the commit comment
reliable jira-subversion linkage availability allows handy stuff like:
Integration with issue trackers