Commit 89359b12 authored by ipatini's avatar ipatini
Browse files

Modified control-service pom.xml to copy baguette-client.tgz from maven...

Modified control-service pom.xml to copy baguette-client.tgz from maven repository, call maven-checksum-plugin to calculate MD5 checksum and copy 'install.sh', 'index.html' and 'favicon.ico' from their respective sources. Move vm.xml assembly description in baguette-client/src/main/assembly folder and renamed it to 'installation-package'. Modified control-service configuration to map http://...:8111/resources to file:resources/ (relative to working dir. rather than to $MELODIC_CONFIG_DIR). Modified control-service Dockerfile to copy baguette client installation staff into $WORKDIR/resources (rather than in config/resources)
parent 99112671
Pipeline #9422 passed with stage
in 37 minutes and 18 seconds
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<configuration> <configuration>
<descriptor>src/assembly/vm.xml</descriptor> <descriptor>src/main/assembly/baguette-client-installation-package.xml</descriptor>
<finalName>baguette-client</finalName> <finalName>baguette-client</finalName>
</configuration> </configuration>
<executions> <executions>
...@@ -156,11 +156,11 @@ ...@@ -156,11 +156,11 @@
<configuration> <configuration>
<fileSets> <fileSets>
<fileSet> <fileSet>
<sourceFile>target/baguette-client-vm.tgz</sourceFile> <sourceFile>target/baguette-client-installation-package.tgz</sourceFile>
<destinationFile>../config-files/resources/baguette-client.tgz</destinationFile> <destinationFile>../config-files/resources/baguette-client.tgz</destinationFile>
</fileSet> </fileSet>
<fileSet> <fileSet>
<sourceFile>target/baguette-client-vm.tgz.md5</sourceFile> <sourceFile>target/baguette-client-installation-package.tgz.md5</sourceFile>
<destinationFile>../config-files/resources/baguette-client.tgz.md5</destinationFile> <destinationFile>../config-files/resources/baguette-client.tgz.md5</destinationFile>
</fileSet> </fileSet>
<fileSet> <fileSet>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
http://maven.apache.org/xsd/assembly-1.1.2.xsd" http://maven.apache.org/xsd/assembly-1.1.2.xsd"
> >
<id>vm</id> <id>installation-package</id>
<formats> <formats>
<format>tgz</format> <format>tgz</format>
</formats> </formats>
......
...@@ -101,7 +101,8 @@ melodic.security.enabled=false ...@@ -101,7 +101,8 @@ melodic.security.enabled=false
### Web configuration - Resources ### Web configuration - Resources
static.favicon.path=classpath:/public/favicon.ico static.favicon.path=classpath:/public/favicon.ico
static.resource.path=file:${MELODIC_CONFIG_DIR}/resources/ static.resource.path=file:resources/
#static.resource.path=file:${MELODIC_CONFIG_DIR}/resources/
#static.resource.path=file:/opt/ems-server/resources/ #static.resource.path=file:/opt/ems-server/resources/
static.resource.context=/resources/** static.resource.context=/resources/**
#static.resource.redirect=/resources/index.html #static.resource.redirect=/resources/index.html
......
...@@ -163,42 +163,58 @@ ...@@ -163,42 +163,58 @@
<type>jar</type> <type>jar</type>
<outputDirectory>${project.build.directory}</outputDirectory> <outputDirectory>${project.build.directory}</outputDirectory>
</artifactItem> </artifactItem>
<artifactItem>
<groupId>eu.melodic.event</groupId>
<artifactId>baguette-client</artifactId>
<version>${project.version}</version>
<type>tgz</type>
<classifier>installation-package</classifier>
<outputDirectory>${project.build.directory}</outputDirectory>
<destFileName>baguette-client.tgz</destFileName>
</artifactItem>
</artifactItems> </artifactItems>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- Checksum Maven plugin (http://checksum-maven-plugin.nicoulaj.net) -->
<plugin> <plugin>
<groupId>com.spotify</groupId> <groupId>net.nicoulaj.maven.plugins</groupId>
<artifactId>docker-maven-plugin</artifactId> <artifactId>checksum-maven-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>files</goal>
</goals>
</execution>
</executions>
<configuration> <configuration>
<resources> <fileSets>
<resource> <fileSet>
<targetPath>/jars</targetPath>
<directory>${project.build.directory}</directory> <directory>${project.build.directory}</directory>
<include>${docker.jarToInclude}</include> <!--<directory>target</directory>-->
<include>${docker.esperJarToInclude}</include> <includes>
</resource> <include>*.zip</include>
<resource> <include>*.tar</include>
<targetPath>/bin</targetPath> <include>*.tar.gz</include>
<directory>${project.basedir}/../bin/</directory> <include>*.tgz</include>
<include>run.sh</include> </includes>
</resource> <excludes>
<resource> <exclude>*.jar</exclude>
<targetPath>/config</targetPath> </excludes>
<directory>${project.basedir}/../config-files</directory> </fileSet>
</resource> </fileSets>
<resource> <algorithms>
<targetPath>/resources</targetPath> <algorithm>MD5</algorithm>
<directory>${project.basedir}/../config-files/resources</directory> </algorithms>
</resource> <individualFiles>true</individualFiles>
</resources> <failOnError>true</failOnError>
<failIfNoFiles>false</failIfNoFiles>
</configuration> </configuration>
</plugin> </plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
</plugin>
<!-- Copy-Rename Maven plugin (https://coderplus.github.io/copy-rename-maven-plugin/) --> <!-- Copy-Rename Maven plugin (https://coderplus.github.io/copy-rename-maven-plugin/) -->
<plugin> <plugin>
...@@ -207,21 +223,13 @@ ...@@ -207,21 +223,13 @@
<version>1.0</version> <version>1.0</version>
<executions> <executions>
<execution> <execution>
<id>copy-zip</id> <id>copy-files</id>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>copy</goal> <goal>copy</goal>
</goals> </goals>
<configuration> <configuration>
<fileSets> <fileSets>
<fileSet>
<sourceFile>../baguette-client/target/baguette-client-vm.tgz</sourceFile>
<destinationFile>target/baguette-client.tgz</destinationFile>
</fileSet>
<fileSet>
<sourceFile>../baguette-client/target/baguette-client-vm.tgz.md5</sourceFile>
<destinationFile>target/baguette-client.tgz.md5</destinationFile>
</fileSet>
<fileSet> <fileSet>
<sourceFile>../baguette-client/bin/install.sh</sourceFile> <sourceFile>../baguette-client/bin/install.sh</sourceFile>
<destinationFile>target/install.sh</destinationFile> <destinationFile>target/install.sh</destinationFile>
...@@ -234,6 +242,49 @@ ...@@ -234,6 +242,49 @@
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<resources>
<resource>
<targetPath>/jars</targetPath>
<directory>${project.build.directory}</directory>
<include>${docker.jarToInclude}</include>
<include>${docker.esperJarToInclude}</include>
</resource>
<resource>
<targetPath>/bin</targetPath>
<directory>${project.basedir}/../bin/</directory>
<include>run.sh</include>
</resource>
<resource>
<targetPath>/config</targetPath>
<directory>${project.basedir}/../config-files</directory>
</resource>
<!--<resource>
<targetPath>/resources</targetPath>
<directory>${project.basedir}/../config-files/resources</directory>
</resource>-->
<resource>
<targetPath>/resources</targetPath>
<directory>${project.build.directory}</directory>
<include>baguette-client.tgz</include>
<include>baguette-client.tgz.md5</include>
<include>install.sh</include>
</resource>
<resource>
<targetPath>/resources</targetPath>
<directory>${project.basedir}/src/main/resources/public</directory>
<include>*</include>
</resource>
</resources>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>buildnumber-maven-plugin</artifactId>
</plugin>
</plugins> </plugins>
</build> </build>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment