Why does maven ignore cucumber.options in pipelines?

Hi, I'm looking at using Pipelines to run our automated test suite. In Jenkins I invoke the maven build:

`clean test -Dcucumber.options="--tags @Feature"`

to run only the tests that cover the feature i'm working on at the time. However in Pipelines I try to do the same thing with the following bitbucket-pipelines.yml but the entire test suite gets run (which takes close to 2 hrs)

```

image: maven:3.3.9

pipelines:
default:
- step:
caches:
- maven
script: # Modify the commands below to build your repository.
- bash configure-maven.sh
- mvn clean test -Dcucumber.options="--tags @Feature" -Dselenium.grid=true

 ```

Do you know why maven isn't getting passed the parameters I supply?

1 answer

0 vote

Hi Pete,

Which pom.xml file is in the base of your repo? Since your pipelines will be executing in that directory (by default) it may be missing settings that you have defined in other pom.xml files.

Have you also tried running your build locally inside of a Docker container? https://confluence.atlassian.com/bitbucket/debug-your-pipelines-locally-with-docker-838273569.html

Thanks,

Phil

HI Phil,

Thanks for the response. I was experimenting with pipelines a while ago and never realy got going with it.

I only have one pom.xml in my project. I did get the test's running in a docker instance however I don't recall the outcome.

When I have time I'll come back to this and send you an update.

Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

712 views 0 4
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot