Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>se.olapetersson</groupId>
<artifactId>docker-e2e-example</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Docker E2E Example</name>
<description>Demo project for e2e-testing using docker</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.2.7.RELEASE</version>
<relativePath/>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<docker.image.prefix>se.olapetersson</docker.image.prefix>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jersey</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>docker-e2e-test</id>
<build>
<plugins>
<plugin>
<groupId>net.wouterdanes.docker</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>3.1.0</version>
<executions>
<execution>
<phase>package</phase>
<id>package</id>
<goals>
<goal>build-images</goal>
</goals>
<configuration>
<images>
<image>
<id>${docker.image.prefix}-spring-boot/${project.artifactId}</id>
<dockerFile>${project.basedir}/src/main/docker/spring-boot/Dockerfile</dockerFile>
<artifacts>
<artifact>
<file>${project.build.directory}/${project.artifactId}-${project.version}.jar</file>
</artifact>
</artifacts>
</image>
</images>
</configuration>
</execution>
<execution>
<phase>pre-integration-test</phase>
<id>start</id>
<goals>
<goal>start-containers</goal>
</goals>
<configuration>
<forceCleanup>true</forceCleanup>
<containers>
<container>
<id>mongodb</id>
<image>mongo:3.2</image>
<hostname>mongodb</hostname>
<waitForStartup>waiting for connections on port 27017</waitForStartup>
</container>
<container>
<id>spring-boot</id>
<image>${docker.image.prefix}-spring-boot/${project.artifactId}</image>
<hostname>${docker.image.prefix}-spring-boot/${project.artifactId}</hostname>
<links>
<link>
<containerId>mongodb</containerId>
<containerAlias>mongodburl</containerAlias>
</link>
</links>
<waitForStartup>Started ReactiveApplication in</waitForStartup>
</container>
</containers>
</configuration>
</execution>
<execution>
<phase>verify</phase>
<id>stop</id>
<goals>
<goal>stop-containers</goal>
</goals>
</execution>
<execution>
<phase>verify</phase>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>Start protractor</id>
<phase>integration-test</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>src/main/scripts/run_protractor.sh</executable>
<arguments>
<argument>--params.host=${docker.containers.spring-boot.ports.8080/tcp.port} --params.port=${docker.containers.spring-boot.ports.8080/tcp.port}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>