trivago/cucable-plugin

pass feature file path and tag from Jenkins pipeline

vinoaravind opened this issue · 3 comments

Hi,

I'm building a CICD pipeline and wondering how to pass featurefile path and tag from Jenkins Jobs. I'm using 'mvn Clean Install' command to trigger test from pipeline. Not sure what is the configuration to be done in pom.xml file to incorporate this.

Hi! Just define your parameters in a <properties> block in your pom and pass them from jenkins via -D options to your maven call.

Like so:

<properties>
    <featureFile/>
</properties>

Then you can pass it to Maven like this:

mvn clean install -DfeatureFile=yourFeatureFilePath

and use it in your Cucable block in the pom file like this:

<sourceFeatures>${featureFile}</sourceFeatures>

Closed due to no reaction.