How do I get the target branch of a pull request in Bamboo (version 6.8.0)? The pull request was created on Bitbucket (version 6.8.0). I need the target to pass to Sonarqube, but I can't find a variable that has it.
It was solved at Bamboo 6.9.0, see https://jira.atlassian.com/browse/BAM-18350.
There're repository.pr.sourceBranch and repository.pr.targetBranch build variables
Related
Since bitbucket 2020.1 there is integration for BitBucket Cloud in TeamCity.
In my project I want to achieve situation:
there is a hotfix / release branch
in BB I create pull request from that branch to master
I want to have automatic build in TC after creating this PR.
I tried this build feature (pull request) but after creating PR in BB nothing happens in TC.
I found this instruction but it still doesn't want to cooperate.
From the link you've posted, it seems you've setup TeamCity to know about BitBucket.
However you need to also let BitBucket trigger TeamCity https://confluence.jetbrains.com/display/TCD18/Configuring+VCS+Post-Commit+Hooks+for+TeamCity?_ga=2.130253711.1405663514.1613160148-1185856109.1612616927
Is there any way to make Jenkins builds after each commit in any branch ?
Because i found in my project's configuration that Jenkins run build only after detecting commits in specific branch or in the default ( eq to master in git ).
PS: i'm using mercurial and Jenkins file.
Should i change project type ( new item type in Jenkins ) or are there any modifications in configs.
There are two things that you should check for this (I haven't work with Mercurial)
Does Mercurial has the option to create webhooks?
There is a jenkins plugin for Mercurial? (I think there is)
You must configure on the mercurial site the webhook pointing to Jenkins and give the point to the job you want to run, and on which events does it will fire. On the Jenkins side you must configure on the job who it will behave.
For example, with GitLab, the plugin has an option configured on the "Build Trigger" section where you configure the events and the branches that fires the job. In GitLab, in the repository you create the webhook, that is only a URL pointing to the Jenkins job.
I got this solution and it worked for me.
with Mercurial, we can use the "tip" keyword.The tip revision is the most recent changeset in the repository. It is the most recently changed head.
I installed the bitbucket plugin in Jenkins, and made the following changes:
I added the webhook on the bitbucket repo in the following format:
http://JENKINS.SERVER:PORT/bitbucket-hook
Under build trigger enabled Build when a change is pushed to BitBucket
Under Source Code Management selected GIT; I defined which branch to build: foobar
So my question is, I want the build to be triggered only when there is a commit on that specific branch foobar!
How do I do that?
Do I need to specify anything else on the bitbucket side?
Tnx,
Tom
In Job Configuration -> Source Code Management -> Branches to build
Specify which branch you want to trigger for build
I'm trying out DevOps with VSTS, Docker and Java and I'm stuck with failing builds PFA screenshots of the same.
VSTS build failing while Queue Jenkins job task
Job is successfully executed on Jenkins and .War file is also produced.
This has been setup on Azure following document
https://github.com/msdevno/hol-oss-devops
Another approach is to have the commit to VSTS trigger the build in Jenkins. Then have Jenkins trigger the release in VSTS. Setting up CI/CD with the TFS Plugin for Jenkins This would not require using VSTS for build.
I was able to resolve the above issue.
My guess worked out correct.
Changing the Public IP from Dynamic to Static caused this issue.
Looked into Jenkins configuration(Manange Jenkins > Configure System > Jenkins Location > Jenkins URL) This was containing dynamic IP and now I've changed it to new static IP and voila it works fine. Build Succeeds and status updated on VSTS as well :)
Thanks for sparing your time in looking to my issue #Starain-MSFT & #Donovan
Since I'm using Gitflow all my branches include a slash. Like "feature/awesome-feature".
When I try to tell Jenkins to build this branch it throws an error "ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job."
Is it possible to use "/" in branch names at all? The issue was reported/fixed/unfixed numerous times. So I'm not sure about the current state.
Yes I build branches like this all the time and it works just fine.
Set your branch as "refs/heads/feature/awesome-feature"
Which version of jenkins are you on?
I'm on 1.580.3
Do you have any commits yet? If your repo is empty, it would have no HEAD, and therefore no branch, as in this question: While building a git project from jenkins it shows an error like couldn't find any revision to build