Added build step CI in gitlab 85/58385/8
authorwasala <przemyslaw.wasala@nokia.com>
Mon, 18 Jun 2018 09:45:08 +0000 (11:45 +0200)
committerwasala <przemyslaw.wasala@nokia.com>
Fri, 22 Jun 2018 11:02:04 +0000 (13:02 +0200)
Change-Id: I11430c0dfe9c8794d1266c5fd675712f83d30e3e
Issue-ID: DCAEGEN2-557
Signed-off-by: wasala <przemyslaw.wasala@nokia.com>
.gitlab-ci.yml [new file with mode: 0644]
pom.xml
prh-aai-client/pom.xml
prh-app-server/pom.xml
prh-commons/pom.xml
prh-dmaap-client/pom.xml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644 (file)
index 0000000..e9aac09
--- /dev/null
@@ -0,0 +1,24 @@
+image: archive.docker-registry.eecloud.nsn-net.net/imp/matryoshka:18.02.0
+
+stages:
+  - build
+  - publish
+
+build:
+  stage: build
+  script:
+    - mvn -e clean install -T2 docker:build
+  artifacts:
+    expire_in: 5 days
+    paths:
+      - prh-commons/target/site/jacoco
+      - prh-aai-client/target/site/jacoco
+      - prh-dmaap-client/target/site/jacoco
+      - prh-app-server/target/site/jacoco
+publish:
+  stage: publish
+#  only:
+#    - master
+  script:
+    - docker login $DOCKER_REPO_ADDR -u $DOCKER_REPO_USER -p $DOCKER_REPO_PASS
+    - mvn -e -DskipTests -Ddocker.repo.url="$DOCKER_REPO_ADDR" -Dnexus.staging="true" deploy
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 955e6e1..d08c9e9 100644 (file)
--- a/pom.xml
+++ b/pom.xml
   </properties>
 
   <pluginRepositories>
+
+
+    <pluginRepository>
+      <id>40_openecomp-release</id>
+      <name>40_openecomp-release</name>
+      <url>https://nexus.onap.org/content/repositories/releases/</url>
+      <releases>
+        <enabled>true</enabled>
+        <updatePolicy>daily</updatePolicy>
+      </releases>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </pluginRepository>
+
     <!-- Black Duck plugin dependencies -->
     <pluginRepository>
       <id>JCenter</id>
     </pluginRepository>
   </pluginRepositories>
 
+
   <repositories>
     <repository>
       <id>external-repository</id>
       <url>https://oss.sonatype.org/content/repositories</url>
     </repository>
+    <repository>
+      <id>40_openecomp-release</id>
+      <name>40_openecomp-release</name>
+      <url>https://nexus.onap.org/content/repositories/releases/</url>
+      <releases>
+        <enabled>true</enabled>
+        <updatePolicy>daily</updatePolicy>
+      </releases>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
   </repositories>
 
   <build>
             </execution>
           </executions>
         </plugin>
+        <plugin>
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-deploy-plugin</artifactId>
+          <configuration>
+            <skip>true</skip>
+          </configuration>
+        </plugin>
       </plugins>
     </pluginManagement>
     <plugins>
index 28abdd8..f8aeea5 100644 (file)
@@ -38,7 +38,6 @@
   <properties>
     <main.basedir>${project.parent.basedir}</main.basedir>
   </properties>
-
   <dependencies>
 
     <!-- DEVELOPMENT DEPENDENCIES -->
index 5706dc9..aad1c99 100644 (file)
@@ -37,6 +37,8 @@
     <nexusproxy>https://nexus.onap.org</nexusproxy>
     <snapshots.path>content/repositories/snapshots/</snapshots.path>
     <releases.path>content/repositories/releases/</releases.path>
+    <docker.repo.url>${onap.nexus.dockerregistry.daily}</docker.repo.url>
+    <nexus.staging>false</nexus.staging>
   </properties>
   <build>
     <plugins>
             <imageTag>${project.version}</imageTag>
             <imageTag>latest</imageTag>
           </imageTags>
-          <serverId>${onap.nexus.dockerregistry.daily}</serverId>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.sonatype.plugins</groupId>
-        <artifactId>nexus-staging-maven-plugin</artifactId>
-        <version>1.6.7</version>
-        <extensions>true</extensions>
-        <configuration>
-          <serverId>ecomp-staging</serverId>
-          <nexusUrl>${nexusproxy}</nexusUrl>
-          <stagingProfileId>176c31dfe190a</stagingProfileId>
+          <serverId>${docker.repo.url}</serverId>
         </configuration>
       </plugin>
     </plugins>
index 40ad85f..8aa966c 100644 (file)
@@ -1,71 +1,70 @@
 <?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>
+  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>
 
-    <parent>
-        <artifactId>prh</artifactId>
-        <groupId>org.onap.dcaegen2.services</groupId>
-        <version>1.0.0-SNAPSHOT</version>
-    </parent>
-
-    <artifactId>prh-commons</artifactId>
-    <groupId>org.onap.dcaegen2.services.prh</groupId>
+  <parent>
+    <artifactId>prh</artifactId>
+    <groupId>org.onap.dcaegen2.services</groupId>
     <version>1.0.0-SNAPSHOT</version>
-    <packaging>jar</packaging>
+  </parent>
 
-    <properties>
-        <main.basedir>${project.parent.basedir}</main.basedir>
-    </properties>
+  <artifactId>prh-commons</artifactId>
+  <groupId>org.onap.dcaegen2.services.prh</groupId>
+  <version>1.0.0-SNAPSHOT</version>
+  <packaging>jar</packaging>
 
-    <dependencies>
-        <dependency>
-            <groupId>org.immutables</groupId>
-            <artifactId>value</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.immutables</groupId>
-            <artifactId>gson</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.httpcomponents</groupId>
-            <artifactId>httpclient</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.commons</groupId>
-            <artifactId>commons-lang3</artifactId>
-        </dependency>
+  <properties>
+    <main.basedir>${project.parent.basedir}</main.basedir>
+  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.immutables</groupId>
+      <artifactId>value</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.immutables</groupId>
+      <artifactId>gson</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+    </dependency>
 
-        <!-- TEST DEPENDENCIES-->
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-api</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.junit.jupiter</groupId>
-            <artifactId>junit-jupiter-engine</artifactId>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.mockito</groupId>
-            <artifactId>mockito-core</artifactId>
-            <scope>test</scope>
-        </dependency>
+    <!-- TEST DEPENDENCIES-->
+    <dependency>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-api</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.mockito</groupId>
+      <artifactId>mockito-core</artifactId>
+      <scope>test</scope>
+    </dependency>
 
-        <!-- LOGGING DEPENDENCIES-->
-        <dependency>
-            <groupId>ch.qos.logback</groupId>
-            <artifactId>logback-classic</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jul-to-slf4j</artifactId>
-        </dependency>
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>log4j-over-slf4j</artifactId>
-        </dependency>
-    </dependencies>
+    <!-- LOGGING DEPENDENCIES-->
+    <dependency>
+      <groupId>ch.qos.logback</groupId>
+      <artifactId>logback-classic</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>jul-to-slf4j</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>log4j-over-slf4j</artifactId>
+    </dependency>
+  </dependencies>
 </project>
\ No newline at end of file
index bce5ccb..a84382b 100644 (file)
@@ -36,7 +36,6 @@
   <properties>
     <main.basedir>${project.parent.basedir}</main.basedir>
   </properties>
-
   <dependencies>
 
     <!-- DEVELOPMENT DEPENDENCIES -->
       <artifactId>mockito-core</artifactId>
       <scope>test</scope>
     </dependency>
-
   </dependencies>
 </project>
\ No newline at end of file