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

Bamboo Spec BitbucketServerRepository planRepoitories not created Edited

hi everyone,

we are currently trying to get bamboo spec java running.

Currently we are using Bamboo Server 6.3 and Bitbucket Server 5.7. SSH is enabled and we are using ssh://git@...  as the url format. The ApplicationLink between both Servers is working fine.

I'm trying to setup plan planRepositories running on our Bitbucket Server and want to use the BitbucketServerRepository because then we don't need any polling.

new BitbucketServerRepository()
.name(name)
.repositoryViewer(new BitbucketServerRepositoryViewer())
.server(BitBucketApplicationLink)
.projectKey(projectKey)
.repositorySlug(name)
.sshPublicKey(PUBLIC_KEY)
.sshPrivateKey(PRIVATE_KEY)
.sshCloneUrl(path)
.branch(branch);

which results in this exception when i try to publish this:

Exception in thread "main" com.atlassian.bamboo.specs.api.exceptions.BambooSpecsPublishingException: An error occurred while publishing plan PRJ-PLANKEY: Repository SAWL / OurAppRepro not found
at com.atlassian.bamboo.specs.util.BambooServer.translateRestException(BambooServer.java:178)
at com.atlassian.bamboo.specs.util.BambooServer.translateException(BambooServer.java:148)
at com.atlassian.bamboo.specs.util.BambooServer.publish(BambooServer.java:101)
at de.aeins.salesapp.plans.SalesAppBaseSpec.main(SalesAppBaseSpec.java:69)
Caused by: com.atlassian.bamboo.specs.exceptions.BambooSpecsRestRequestException: Repository SAWL / OurAppRepro  not found
at com.atlassian.bamboo.specs.util.RestHelper.lambda$sendRequest$2(RestHelper.java:89)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:222)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:164)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:139)
at com.atlassian.bamboo.specs.util.RestHelper.sendRequest(RestHelper.java:92)
at com.atlassian.bamboo.specs.util.RestHelper.post(RestHelper.java:201)
at com.atlassian.bamboo.specs.util.SendQueue$1.run(SendQueue.java:23)

The debug output returns a status-code 400:

2018-03-15 15:07:22,407 DEBUG [BambooServer] {"message":"Repository SAWL / OurAppRepro not found","status-code":400}

 

If i change back to the standard GitRepository like:

 

new GitRepository()
.name(name)
.url(path)
.branch(branch)
.shallowClonesEnabled(true)
.lfsEnabled(true)
.remoteAgentCacheEnabled(true)
.authentication(new SshPrivateKeyAuthentication(PRIVATE_KEY).passphrase("Password"))
.changeDetection(new VcsChangeDetection());

everything is working fine. Is there any additional stuff required to get the BitbucketServerRepository up and running? 

 

 

1 answer

1 accepted

1 vote
Answer accepted

solved it. If you have the same problem, check if everything inside the private and public keys in escaped correctly...

Hi @shohns ,
I am facing same issue on bamboo server, when bamboo scans for bamboo specs stored on bitbucket repository then it is failing for creating plan with plan repository. Error : Request to stash failed. Response body is empty and failed with 401.
And If I removed plan repository from bamboo java spec then bamboo built plan but without plan repository.

I am creating plan repository with bitbucketserver repository viewe.

Note : I have provided ssh clone url, ssh public key and ssh private key for respective plan repository but still failing through bitbucket repository stored spec.

Its urgent, could you please help me

Hi @shohns 

I tried to create plan repository using GitRepository in bamboo spec and it is creating plan with plan repo in bamboo. But it is not working with BitBucketServerRepository. I memyioned error in above comment. When I comment .server(app link server name) then spec status shows execution successful but plan is not creating because when i opened log then showing server name eequired.

So what can be issue. Could you please hwlp me if issue is qiyh app link server or ssh keys.

Suggest an answer

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

Bamboo Data Center - Early Access Program

G’day Bamboo customers, The wait is almost over! We are in the final stages of work on the first release of Bamboo Data Center, our self-managed enterprise offering of Bamboo. This Data Center offe...

1,008 views 0 16
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