Hello,

I am trying to run a maven test phase during a bamboo build plan. My tests rely 
on a set of environment variables that I configured in the pom.xml. However, 
those values are only applicable to one environment, and I would like to 
execute the same tests on multiple environments (different host IPS, etc). My 
Pom.xml looks something like this:

<plugin>

    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.21.0</version>

    <configuration>

        <environmentVariables>

<variable1>variablevalue</variable1>
        </environmentVariables>
    </configuration>


</plugin>

During the bamboo build plan, I execute mvn clean test. Does anyone know how I 
can configure surefire to possibly read environment variables from a file or 
something and then execute the mvn command line to read the proper file based 
on the environment I feed it in the command line. Example mvn clean -DtestEnv 
test. This way in my build plan I can run the test phase for the environment it 
is relevant for.

Thanks
Michael.

Reply via email to