Bamboo Specs troubleshooting
We've gathered answers to the most common problems with Bamboo Specs.
On this page:
I committed Bamboo Specs but nothing happened
This may happen for a number of reasons. Here's how to resolve this problem:
- Make sure you pushed your code to Bitbucket Server. It's trivial, but it really happens.
- Make sure that Bitbucket Server and Bamboo are connected with an application link. See Linking to another application.
- Make sure that Bamboo Specs processing is enabled in Bamboo. See Repository-stored Bamboo Specs security.
- Make sure that Bamboo Specs are enabled for a repository you pushed to. See Enabling repository-stored Bamboo Specs.
- Make sure that Bamboo Specs have access to projects or deployment projects you want to modify. To do this, select the Access all projects checkbox in your Bitbucket Server linked repository settings. See Enabling repository-stored Bamboo Specs.
Bamboo Specs compilation fails
In case the compilation fails during the first execution of Bamboo Specs, no plans or deployment projects are created or updated. As a consequence, Bamboo is unable to associate the Bamboo Specs with any plan, so you won't find an error log in any of the existing plans.
In case compilation fails not the first time, you can find the Specs execution error on the build results page for the related plans.
In both cases, a committer of the change will receive an email with details of the error.
Compilation may fail due to errors in the source code or because the pom.xml
file has been sanitized by Bamboo.
Errors in the source code
Check out the repository on your computer and build it yourself (use the mvn compile
command or import it into your IDE) to locate the error. These are usually typos in the code, wrong project dependencies, or an outdated parent pom.xml
version.
The pom.xml file has been sanitized by Bamboo
By default, Bamboo Specs are executed using the default <BAMBOO_INSTALL_DIR>/atlassian-bamboo/WEB-INF/classes/bamboo-specs-pom.xml
file. If you've added extra dependencies to the pom.xml
file in your Bamboo Specs project, Bamboo will copy those dependencies to the default file and skip all other tags. Additionally, Bamboo prints the content of the effective pom.xml
file to the Specs execution log for troubleshooting.
However, even if your Bamboo Specs project compiles and runs correctly on your computer, it may fail in Bamboo. If that's the case, make sure that:
- you're not using any extra plugins and you're not relying on executing tests; it's enough to compile your project using
maven-resources-plugin
andmaven-compiler-plugin
only - your
pom.xml
inherits fromcom.atlassian.bamboo:bamboo-specs-parent
Furthermore, you can disable the sanitization of the pom.xml file by setting the following system property:
-Dbamboo.repository.stored.specs.pom.sanitization.enabled=false
Learn how to configure system properties
Bamboo Specs compilation succeeded but the log shows that not everything was built
The repository-stored Bamboo Specs feature requires that your project in the /bamboo-specs
directory consists of only one Maven module. We don't support multi-module builds. So in case you put some Bamboo Specs classes in sub-modules of bamboo-specs
, they simply won't be built.
Bamboo Specs fail to import configuration
The committer of the change will receive an email with details of the error. You can also look for Specs execution errors on the build results page of the related plan or plans. The most typical reasons are:
Insufficient permissions
Make sure that Bamboo Specs has access to projects or deployment projects you want to modify. It applies also to dependent projects, for instance:
- child plans triggered after a build - see plan's dependencies section,
- artifacts downloaded from a plan from another project.
Validation errors
Bamboo validates your plan configuration for correctness. It reports an error if any constraint is violated, such as an invalid project key, a reference to a non-existing repository or plan, etc.
Incompatible versions
The Bamboo Specs version in your pom.xml
needs to match the Bamboo Server version of Bamboo Specs. If an error occurs, update your pom.xml
Bamboo Specs version.
The repository in which you defined a plan has no permissions to access a project
- Go to > Build resources > Linked repositories.
- Select your repository.
- Select the Bamboo Specs tab.
- Copy the webhook URL.
- In the repository you want to use for storing Bamboo Specs, go to your repository settings.
- Find webhook-specific configuration.
Paste in the URL Bamboo provided you with.
A webhook to allow your repository to communicate with Bamboo isn't set up
- From the Bamboo header select Projects, and find your project.
- Select Project settings > Bamboo Specs repositories.
- Select your repository and select Add.
- Go to the settings of the repository you want to use for storying Bamboo Specs.
- Find webhook-specific configuration.
Paste in the URL Bamboo provided you with.
Bamboo can't connect to Docker to execute Bamboo Specs
Make sure that Docker is running. Alternatively, disable Bamboo Specs processing in Docker security settings, see Repository-stored Bamboo Specs security.