revert last commit 90/93990/1 elalto 5.0.2-ONAP
authorsu622b <su622b@att.com>
Tue, 20 Aug 2019 17:48:58 +0000 (13:48 -0400)
committersu622b <su622b@att.com>
Tue, 20 Aug 2019 17:49:12 +0000 (13:49 -0400)
Issue-ID: DMAAP-1272
Change-Id: I2471ee5f245c6a21392bd7f9c12712ce4d07e059
Signed-off-by: su622b <su622b@att.com>
pom.xml
src/main/docker/Dockerfile
version.properties

diff --git a/pom.xml b/pom.xml
index eece3d9..8ad6cfa 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -21,7 +21,7 @@
 
        <groupId>org.onap.dmaap.zookeeper</groupId>
        <artifactId>zookeeper</artifactId>
-       <version>6.0.1-SNAPSHOT</version>
+       <version>6.0.2-SNAPSHOT</version>
        <name>zookeeper</name>
        <licenses>
                <license>
                                        <skip />
                                </configuration>
                        </plugin>
+                       <plugin>
+                               <groupId>com.spotify</groupId>
+                               <artifactId>docker-maven-plugin</artifactId>
+                               <version>1.0.0</version>
+                               <configuration>
+                                       <imageName>onap/dmaap/zookeeper</imageName>
+                                       <dockerDirectory>src/main/docker</dockerDirectory>
+                                       <serverId>docker-hub</serverId>
+                                       <imageTags>
+                                               <imageTag>${dockertag1}</imageTag>
+                                               <imageTag>${dockertag2}</imageTag>
+                                       </imageTags>
+                                       <forceTags>true</forceTags>
+                                       <resources>
+                                               <!-- <resource> <targetPath>/</targetPath> <directory>${dockerLocation}</directory> 
+                                                       <include>${project.build.finalName}.jar</include> </resource> -->
+                                               <resource>
+                                                       <targetPath>/</targetPath>
+                                                       <directory>${project.build.directory}</directory>
+                                                       <include>**/**</include>
+                                               </resource>
+                                       </resources>
+                               </configuration>
+                               <executions>
+                                       <execution>
+                                               <id>build-image</id>
+                                               <phase>install</phase>
+                                               <goals>
+                                                       <goal>build</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <skipDockerBuild>${skip.docker.build}</skipDockerBuild>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>tag-image-project-version</id>
+                                               <phase>install</phase>
+                                               <goals>
+                                                       <goal>tag</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <image>onap/dmaap/zookeeper</image>
+                                                       <newName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag2}</newName>
+                                                       <skipDockerTag>${skip.docker.push}</skipDockerTag>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>tag-image-latest</id>
+                                               <phase>install</phase>
+                                               <goals>
+                                                       <goal>tag</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <image>onap/dmaap/zookeeper</image>
+                                                       <newName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag1}</newName>
+                                                       <skipDockerTag>${skip.docker.push}</skipDockerTag>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>push-image</id>
+                                               <phase>deploy</phase>
+                                               <goals>
+                                                       <goal>push</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <imageName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag2}</imageName>
+                                                       <skipDockerPush>${skip.docker.push}</skipDockerPush>
+                                               </configuration>
+                                       </execution>
+
+                                       <execution>
+                                               <id>push-image-latest</id>
+                                               <phase>deploy</phase>
+                                               <goals>
+                                                       <goal>push</goal>
+                                               </goals>
+                                               <configuration>
+                                                       <imageName>${docker.push.registry}/onap/dmaap/zookeeper:${dockertag1}</imageName>
+                                                       <skipDockerPush>${skip.docker.push}</skipDockerPush>
+                                               </configuration>
+                                       </execution>
+                               </executions>
+                       </plugin>
+
                </plugins>
        </build>
 
                <skip.docker.build>true</skip.docker.build>
                <skip.docker.push>true</skip.docker.push>
                <nexusproxy>https://nexus.onap.org</nexusproxy>
-               <docker.image.name>onap/dmaap/zookeeper</docker.image.name>
+               <docker.push.registry>nexus3.onap.org:10003</docker.push.registry>
+               <onap.nexus.url>https://nexus.onap.org</onap.nexus.url>
        </properties>
 
        <!-- Distribution management -->
                                         project.properties['dockertag1']=project.properties['ver'] + "-latest";
                                         project.properties['dockertag2']=project.properties['ver'] + "-" + project.properties['timestamp'];
                                         } else {
-                                        project.properties['dockertag1']=project.properties['ver'] + "-STAGING-latest";
+                                        project.properties['dockertag1']=project.properties['ver']+ "-STAGING-latest";
                                         project.properties['dockertag2']=project.properties['ver'] + "-STAGING-" + project.properties['timestamp'];
                                         }
                                         println 'docker tag 1: ' + project.properties['dockertag1'];
                                 </configuration>
                             </execution>
                         </executions>
-                   </plugin>
-                   <plugin>
-                        <groupId>io.fabric8</groupId>
-                        <artifactId>docker-maven-plugin</artifactId>
-                        <version>0.28.0</version>  
-                        <configuration>
-                            <verbose>${docker.verbose}</verbose>
-                            <apiVersion>${docker.apiVersion}</apiVersion>
-                            <pullRegistry>${docker.pull.registry}</pullRegistry>
-                            <pushRegistry>${docker.push.registry}</pushRegistry>
-                            <images>
-                                <image>                            
-                                    <name>${docker.image.name}</name>
-                                    <build>
-                                        <cleanup>try</cleanup>
-                                        <dockerFile>Dockerfile</dockerFile>
-                                        <tags>
-                                            <tag>${dockertag1}</tag>
-                                            <tag>${dockertag2}</tag>
-                                        </tags>
-                                    </build>
-                                </image>
-                            </images>
-                        </configuration>
-                         <executions>
-                             <execution>
-                                 <id>generate-images</id>
-                                 <phase>install</phase>
-                                 <goals>
-                                     <goal>build</goal>
-                                 </goals>
-                             </execution>
-                             <execution>
-                                 <id>push-images</id>
-                                 <phase>deploy</phase>
-                                 <goals>
-                                     <goal>push</goal>
-                                 </goals>
-                             </execution>
-                         </executions>
                     </plugin>
                     </plugins>
                     </build>
index a82f351..7e0d715 100644 (file)
@@ -1,16 +1,17 @@
-FROM openjdk:8-jre-alpine
+FROM ubuntu:16.04
 
 ENV ZK_USER=mrzookeeper \
     ZK_DATA_DIR=/var/lib/zookeeper/data \
     ZK_LOG_DIR=/var/log/zookeeper \
-    JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk
+    JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
+
 
 ARG ZK_DIST=zookeeper-3.4.9
 
 RUN set -x \
-    && apk update \
-    && apk add wget netcat-openbsd \
-    && apk add bash git\
+    && apt-get update \
+    && apt-get install -y openjdk-8-jre-headless wget netcat-openbsd \
+    && apt-get install -y git \
     && wget -q "http://archive.apache.org/dist/zookeeper/$ZK_DIST/$ZK_DIST.tar.gz" \
     && wget -q "http://archive.apache.org/dist/zookeeper/$ZK_DIST/$ZK_DIST.tar.gz.asc" \
     && tar -xzf "$ZK_DIST.tar.gz" -C /opt \
@@ -33,6 +34,7 @@ RUN set -x \
     /opt/zookeeper/$ZK_DIST.jar.asc \
     /opt/zookeeper/$ZK_DIST.jar.md5 \
     /opt/zookeeper/$ZK_DIST.jar.sha1 \
+    && apt-get autoremove -y wget \
     && rm -rf /var/lib/apt/lists/*
 
 # Copy configuration generator script to bin
@@ -51,12 +53,14 @@ RUN set -x \
 && ln -s /opt/zookeeper/lib/* /usr/share/zookeeper
 
 RUN chmod -R 777 /opt/zookeeper/bin
-ENTRYPOINT ["bash", "/opt/zookeeper/bin/start-zookeeper.sh"]
+ENTRYPOINT /opt/zookeeper/bin/start-zookeeper.sh
 EXPOSE 2181 2888 3888
 
-RUN adduser $ZK_USER --disabled-password \
+RUN useradd $ZK_USER \
     && [ `id -u $ZK_USER` -eq 1000 ] \
     && [ `id -g $ZK_USER` -eq 1000 ] \
     && chown -R $ZK_USER:$ZK_USER /opt/$ZK_DIST/ /opt/zookeeper/ /var/lib/ /var/log/ /tmp/zookeeper/
 
 USER $ZK_USER
+
+
index da92029..ee951f0 100644 (file)
@@ -26,7 +26,7 @@
 
 major=6
 minor=0
-patch=1
+patch=2
 
 base_version=${major}.${minor}.${patch}