Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to workout why pull request (git on bitbucket) isn't triggering a build on bamboo? Edited

I've been trying to set things up to trigger a build for a pull request. 

Our setup is as follows:

  • Bamboo 6.5.0 local install
  • Bitbucket 4.11.2 using git, local server
  • The plan repository is linked with the master branch
  • I've got a "Bitbucket Server repository triggered" trigger defined looking at the linked repo
  • My build plan is based on the linked repo and has a manual branch setup for develop
  • On the "Branches" tab of the build plan I've get "Create Plan When pull request is created"  and triggers "same as in parent plan" 

The 2 servers are linked. I can see build results for master and develop on bitbucket, and I can see the commits listed in the build results. Also on the "branchStatus" page the pull request branch is listed.

I've tried pull requests from feature branches named with "feature/*" and "feature-*" and pull requests to both develop and master.

Regardless of this I never get the pull request build happening.

What can I do to debug this problem? Any other ideas?

2 answers

0 votes
Foong Atlassian Team Sep 04, 2018

What is the Remote events status and Last received event at Bamboo Administration > System > System information > Linked Bitbucket Server instances ?

If a new Pull Request is created in Bitbucket Server, is there any branch plan created automatically in Bamboo?

When a new commit pushed to Bitbucket Server, check if the following example message exist in Bamboo log atlassian-bamboo.log:

2018-09-04 18:44:27,877 INFO [http-nio-8085-exec-13] [AuthenticatorImpl] Authenticated app 'Bitbucket:8948820956' as user 'null' successfully
2018-09-04 18:44:27,889 INFO [http-nio-8085-exec-13] [AccessLogFilter] 127.0.0.1 POST http://localhost:8085/rest/remote-event-consumer/latest/events/stash-branch-changed-remote-event 374833kb
Foong Atlassian Team Sep 06, 2018

We've fixed that and bitbucket now says it can see bamboo, so that's some progress

Is the remote event status fixed too? Is there any Last received event? Auto branch plan creation will not work if this is not fixed.

It looked like the ports were't configured correctly.

It would be better to re-create the application links in both servers cause the incorrect port setting previously might affect the application link creation.

We don't get and "remote-event-consumer" log messages. But what we do get is:

Edit the Bamboo Repository at DC-DC Plan Configuration > Repositories and then click on the Save button. If it is a Linked Repository, edit and re-save it in the Administration.

Dear Kah,

I have a similar issue except that I discovered that it seems to be related to pull request from forks. 

I explain myself with the 2 following examples.

Working:

  - Create new branch "feature/my-awesome-feature" in ProjectX > RepoX

  - Create PR from ProjectX > RepoX > "feature/my-awesome-feature" to ProjectX > RepoX > "master"

  - Bamboo triggers automatically a branch build

 

Not working:

  - Fork ProjectX > RepoX in SuperITMan > RepoX

  - Create new branch "feature/my-awesome-feature" in SuperITMan > RepoX

  - Create PR from SuperITMan > RepoX > "feature/my-awesome-feature" to ProjectX > RepoX > "master"

  - Bamboo does not trigger any build

 

What should I change in my Bamboo configuration to allow branch build "when pull request is created" from a fork ?

Thanks in advance for your help.

Kind regards,

Alexis GEORGES

Thanks Kah,

I don't have access to that area of bamboo, but I've checked in with an admin. When we check the remote event status is "Not Working"

We've had a look and it seems bamboo can see bit bucket but not the other way around. It looked like the ports were't configured correctly.

We've fixed that and bitbucket now says it can see bamboo, so that's some progress, however we still aren't getting the pull requests triggering a new branch. Looking at the log file we have:

2018-09-05 16:42:08,100 INFO [http-apr-8085-exec-19] [AuthenticatorImpl] Authenticated app 'Stash:5972229772' as user '****' successfully
2018-09-05 16:42:08,100 INFO [http-apr-8085-exec-19] [AccessLogFilter] 172.16.99.5 GET http://deployment.capricorn.com.au:8085/rest/applinks/latest/applicationlink/28752c28-df29-34e7-b22e-557991148dd7/authentication/provider?xoauth_requestor_id=******* 298933kb

We don't get and "remote-event-consumer" log messages. But what we do get is:

2018-09-05 16:42:35,288 WARN [SSH connection monitoring thread:thread-64156] [SshProxyCommand] SSH proxy tried to connect to [git@/172.16.99.5:7999]: and failed due to the following error: [Authenticating remote session failed]
org.apache.sshd.common.SshException: No more authentication methods available
at org.apache.sshd.client.session.ClientUserAuthService.tryNext(ClientUserAuthService.java:315)
at org.apache.sshd.client.session.ClientUserAuthService.processUserAuth(ClientUserAuthService.java:252)
at org.apache.sshd.client.session.ClientUserAuthService.process(ClientUserAuthService.java:199)
at org.apache.sshd.common.session.helpers.AbstractSession.doHandleMessage(AbstractSession.java:530)
at org.apache.sshd.common.session.helpers.AbstractSession.handleMessage(AbstractSession.java:463)
at org.apache.sshd.common.session.helpers.AbstractSession.decode(AbstractSession.java:1325)
at org.apache.sshd.common.session.helpers.AbstractSession.messageReceived(AbstractSession.java:424)
at org.apache.sshd.common.session.helpers.AbstractSessionIoHandler.messageReceived(AbstractSessionIoHandler.java:67)
at org.apache.sshd.common.io.nio2.Nio2Session.handleReadCycleCompletion(Nio2Session.java:285)
at org.apache.sshd.common.io.nio2.Nio2Session$2.onCompleted(Nio2Session.java:265)
at org.apache.sshd.common.io.nio2.Nio2Session$2.onCompleted(Nio2Session.java:262)
at org.apache.sshd.common.io.nio2.Nio2CompletionHandler$1.run(Nio2CompletionHandler.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.sshd.common.io.nio2.Nio2CompletionHandler.completed(Nio2CompletionHandler.java:34)
at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126)
at sun.nio.ch.Invoker$2.run(Invoker.java:218)
at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2018-09-05 16:42:35,304 INFO [10-BAM::PlanExec:pool-17-thread-2] [DefaultErrorHandler] Recording an error: Unable to detect changes : DC-DC : com.atlassian.bamboo.plugins.git.GitCommandException: command ['C:\Program Files (x86)\Git\cmd\git.exe' ls-remote ssh://b192244f-2daf-4f21-84e3-84efa0c993f5@127.0.0.1:6694/dc/csl.datacleansing.database.git] failed with code 128. Working directory was [C:\Program Files\Bamboo\temp]., stderr:
Authenticating remote session failed
stdout:
Warning: Permanently added '[127.0.0.1]:6694' (RSA) to the list of known hosts.
BAMBOO-SSH-PROXY: [SSH proxy tried to connect to [git@/172.16.99.5:7999]: and failed due to the following error: [Authenticating remote session failed]: No more authentication methods available]
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

The odd think is that when I go to the "Branch Status" for the repository branch in bamboo I can see the pull request off to the right, also regular builds are triggered when a branch is updated, it's just the pull request triggers that aren't working. No new branch in bamboo and no build.

Later in the log I see:

2018-09-05 16:48:56,408 WARN [1-PullRequestDetectionBackgroundThread:pool-5-thread-1] [PullRequestDetector] com.atlassian.bamboo.repository.RepositoryException: [Request to JIRA failed. Returned with 401. Response: {"errors":[{"context":null,"message":"You are not permitted to access this resource","exceptionName":"com.atlassian.bitbucket.AuthorisationException"}]}]

What would your next step be? I'd think the last resort would be to remove and re-add the link.

Thanks,

Doug

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 101 Video

G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...

185 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you