Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bamboo-specs: Enabling scan for bamboo specs disables pushtrigger and the yaml file is ignored.

Albert Rigo March 1, 2018

We have upgraded to Bamboo 6.3 and I wanted to use the YAML bamboo-specs feature. I've followed the instructions and here:

https://confluence.atlassian.com/bamboo0603/tutorial-bamboo-specs-yaml-stored-in-bitbucket-server-946020346.html

and here:

https://confluence.atlassian.com/bamboo0603/bamboo-yaml-specs-939492100.html

but I still have problems.

1) The biggest concern is that when I enable the "Scan for Bamboo Specs" in the "Linked Repositories" section, then the created job isn't triggered anymore at all. I have two Bamboos (6.2 and 6.3) connected to BitBucket (5.7) and I have the same job on the 6.2 one as well, but without "Scan for Bamboo Specs" enabled, and that one is triggered fine every time.

2) I have a file in the repo; bamboo-specs/bamboo.yml (I've tried calling it .yaml, and I've also tried placing the file in the repo-root as well). The file contains the dragon-slayer example. But it doesn't do anything. Even when I add a repository polling trigger, and after a push it detects the change, but the yaml file is ignored...

What could my problems be?

2 answers

1 accepted

0 votes
Answer accepted
Omar Herrera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 1, 2018

Hi @Albert Rigo,

I followed the two links that are you reviewed.


1. In this point try re-make the linked applications from bamboo 6.3 to bitbucket, I think that is a bug I'm no sure, but after I did the application links all been woking unitl now.

2. I'm sharing with you a bamboo.yml that I used in my test escenary and I expect it is useful for you.

Additional you must push the changes to branch marked as default on the linked repository.

 

---
project:
key: BAM
plan:
key: AMB
name: Bamboo image in docker
stages:
- jobs:
- scripts:
- export registryAddress=${bamboo.registryAddress}
- export TagName=${bamboo.buildNumber}
- export AppName=$(echo "${registryAddress}/${bamboo.planKey}" | tr '[:upper:]' '[:lower:]')
- docker-compose -p ${bamboo.planKey} build


requirements:
- system.docker.executable
Albert Rigo March 2, 2018

Thanks for the reply @Omar Herrera

1) I removed and re-added the application link between bamboo 6.3 and bitbucket, but it didn't help me.

The thing is still that if I disable the "scan for bamboo specs", the build gets triggered on commit, but as soon as I enable it, no the job is no longer triggered.

2) Thanks, but I haven't come so far that it actually reads my yaml file :(

Omar Herrera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 3, 2018

Hi, I understand. Try this for troubleshotting.

1. Re-enable bamboo specs.

2. Setup acces to this repo to all proyects and deployments.

3. Open bamboo logs.

4. Push a commit to default branch.

5. Check the logs, I think there is a error on processing the yml that you can't see.

Additional you can check the email setup because this is the way that you receive the results of bamboo specs.

Albert Rigo March 6, 2018

Thanks again for helping.

But I don't think it's a yml processing problem.

When I enable the "scan for bamboo specs" after I've removed the bamboo.yml, and even on a completely new repo without bamboo.yml anywhere, it still doesn't trigger a build (which is an empty build, it should just detect that there is a change).

Trying to get access to the logs now (I'm not a server admin).

Albert Rigo March 6, 2018

After reading the errorlog, I found:

java.lang.RuntimeException: JGit implementation does not support this operation, please use native Git

The server is a Windows machine and I installed git for windows on it now. And now it works!

Thanks for the help @Omar Herrera, you pointed me to the log files :)

Omar Herrera
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 6, 2018

Nice @Albert Rigo a pleasure to help you.

0 votes
RobertV December 1, 2019

@Albert Rigo Did you ever figure this out? I can't find any Atlassian documentation that discusses the naming conventions for spec files and how the scan process locates them.

Albert Rigo December 2, 2019

Hi @RobertV

I have since stopped using Bamboo (haven't touched it since maybe a year back), but as I remember it, your file needs to be the following in the repo:

bamboo-specs/bamboo.yml

But I don't really know how the scan process works.

Sorry for not knowing more.

/A

Harsha Nanayakkara
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 4, 2020

I got the same problem when using YML file. In the log file I could see the following error.

"Bamboo Specs have already been executed for a newer revision"

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events