diff options
Diffstat (limited to 'datacollector')
-rw-r--r-- | datacollector/docker/.maven-dockerinclude | 1 | ||||
-rw-r--r-- | datacollector/docker/Dockerfile | 3 | ||||
-rw-r--r-- | datacollector/pom.xml | 54 |
3 files changed, 51 insertions, 7 deletions
diff --git a/datacollector/docker/.maven-dockerinclude b/datacollector/docker/.maven-dockerinclude deleted file mode 100644 index fd6cecd..0000000 --- a/datacollector/docker/.maven-dockerinclude +++ /dev/null @@ -1 +0,0 @@ -target/*.jar diff --git a/datacollector/docker/Dockerfile b/datacollector/docker/Dockerfile index 251673d..6d56ac8 100644 --- a/datacollector/docker/Dockerfile +++ b/datacollector/docker/Dockerfile @@ -1,5 +1,4 @@ FROM nexus3.onap.org:10001/onap/integration-java11:8.0.0 -ARG VERSION="" USER root @@ -9,6 +8,6 @@ USER onap EXPOSE 8087 -COPY *-${VERSION}.jar /app/service.jar +COPY datacollector*.jar /app/service.jar COPY init.sql start.sh /app/ ENTRYPOINT ["/bin/sh", "/app/start.sh"] diff --git a/datacollector/pom.xml b/datacollector/pom.xml index 141d212..db59334 100644 --- a/datacollector/pom.xml +++ b/datacollector/pom.xml @@ -28,10 +28,6 @@ <version>0.0.1-SNAPSHOT</version> </parent> - <properties> - <docker-image.name.prefix>org.onap.rapp.datacollector</docker-image.name.prefix> - </properties> - <dependencies> <dependency> <groupId>org.springframework.boot</groupId> @@ -90,6 +86,56 @@ <build> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.8</version> + <executions> + <execution> + <phase>package</phase> + <configuration> + <target> + <copy file="target/${project.artifactId}-${project.version}.jar" tofile="./docker/${project.artifactId}-${project.version}.jar"/> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>io.fabric8</groupId> + <artifactId>docker-maven-plugin</artifactId> + <version>${docker-maven-plugin.version}</version> + <executions> + <execution> + <id>docker-build-image</id> + <phase>install</phase> + <goals> + <goal>build</goal> + <goal>push</goal> + </goals> + </execution> + </executions> + <configuration> + <skipPush>${skipDockerPush}</skipPush> + <verbose>true</verbose> + <imagePullPolicy>IfNotPresent</imagePullPolicy> + <images> + <image> + <name>${docker-image.namespace}/${docker-image.name.prefix}/${project.artifactId}</name> + <registry>${docker.registry}</registry> + <build> + <dockerFileDir>${project.basedir}/docker</dockerFileDir> + <tags> + <tag>${project.version}-${maven.build.timestamp}Z</tag> + </tags> + </build> + </image> + </images> + </configuration> + </plugin> + <plugin> <groupId>com.github.kongchen</groupId> <artifactId>swagger-maven-plugin</artifactId> <version>${swagger.maven.plugin.version}</version> |