Skip to content
This repository has been archived by the owner on Sep 21, 2021. It is now read-only.

Commit

Permalink
[BUA-864] Building image when tests are not running.
Browse files Browse the repository at this point in the history
  • Loading branch information
diemol committed Jan 27, 2017
1 parent be23aa4 commit 6f4de32
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
33 changes: 33 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,39 @@
</plugins>
</build>
</profile>
<profile>
<id>build-docker-image</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.5.0</version>
<executions>
<!-- docker build -->
<execution>
<id>docker-build-zalenium-image</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<skip>${skip.failsafe.setup}</skip>
<workingDirectory>${project.build.directory}</workingDirectory>
<executable>docker</executable>
<arguments>
<argument>build</argument>
<argument>-t</argument>
<argument>${project.artifactId}:${project.version}</argument>
<argument>.</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>integration-test</id>
<build>
Expand Down
2 changes: 2 additions & 0 deletions run_integration_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ INTEGRATION_TO_TEST=$1
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ -n "${TRAVIS_TAG}" ] && [ "${TRAVIS_TAG}" != "latest" ]; then
echo "TRAVIS_TAG=${TRAVIS_TAG}"
echo "Not running integration tests when a TAG is set, we assume they already ran in the PR."
echo "Building image..."
mvn clean package -Pbuild-docker-image -DskipTests=true
else
# If the environment var exists, then we run the integration tests. This is to allow external PRs ro tun
if [ "$INTEGRATION_TO_TEST" = sauceLabs ]; then
Expand Down

0 comments on commit 6f4de32

Please sign in to comment.