Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Styx Docker image using fabric8 docker maven plugin #542

Merged
merged 4 commits into from
Nov 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,4 @@ changelog:
# Default configuration file: /styx/default-config/default.yml
#
docker-image: clean
mvn install -Prelease,linux -Dmaven.test.skip=true
mkdir -p ${DOCKER_CONTEXT}
cp `find distribution/target -maxdepth 1 -name "styx*linux-x86_64.zip"` ${DOCKER_CONTEXT}/styx.zip
cp docker/styx-image/* ${DOCKER_CONTEXT}
docker build -t styxcore:latest --build-arg STYX_IMAGE=styx.zip ${DOCKER_CONTEXT}/.
mvn install -Prelease,linux,docker -Dmaven.test.skip=true
60 changes: 59 additions & 1 deletion distribution/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?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">
<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">
<parent>
<groupId>com.hotels.styx</groupId>
<artifactId>styx-parent</artifactId>
Expand All @@ -18,6 +19,9 @@
<main.basedir>${project.parent.basedir}</main.basedir>
<skipCheckstyle>true</skipCheckstyle>
<main.basedir>${project.parent.basedir}</main.basedir>
<TAG>11-jdk</TAG>
<styxcore.docker.tag>${project.version}</styxcore.docker.tag>
<styxcore.docker.image>styxcore</styxcore.docker.image>
</properties>

<dependencies>
Expand Down Expand Up @@ -133,4 +137,58 @@
</plugins>
</build>

<profiles>
<profile>
<id>docker</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.31.0</version>

<executions>
<execution>
<phase>install</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>

<configuration>
<images>
<image>
<alias>styxcore</alias>
<name>${styxcore.docker.image}</name>
<build>
<dockerFile>${project.parent.basedir}/docker/styx-image/Dockerfile</dockerFile>
<contextDir>${project.parent.basedir}/docker/styx-image/</contextDir>
<assembly>
<inline>
<files>
<file>
<source>${project.basedir}/target/${artifact.finalName}.zip</source>
</file>
</files>
</inline>
</assembly>
<tags>
<tag>${styxcore.docker.tag}</tag>
<tag>${project.version}</tag>
</tags>
<args>
<STYX_IMAGE>maven/${artifact.finalName}.zip</STYX_IMAGE>
<TAG>11-jdk</TAG>
</args>
</build>
</image>
</images>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
17 changes: 2 additions & 15 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
<name>libs-snapshot</name>
<url>${libs.snapshot.url}</url>
</snapshotRepository>

<site>
<id>Styx-Site</id>
<url>${site.url}</url>
Expand Down Expand Up @@ -734,22 +735,8 @@
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=${project.build.directory}/failsafe-reports
</argLine>
<skipITs>false</skipITs>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
<execution>
<id>failsafe-integration-tests</id>
<phase>integration-test</phase>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
Expand Down
13 changes: 0 additions & 13 deletions system-tests/e2e-suite/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -212,19 +212,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<systemPropertyVariables>
<int_test_ip_address>localhost</int_test_ip_address>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<!-- jacoco: see http://www.eclemma.org/jacoco/trunk/doc/check-mojo.html -->
Expand Down