aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwasala <przemyslaw.wasala@nokia.com>2018-06-18 11:45:08 +0200
committerwasala <przemyslaw.wasala@nokia.com>2018-08-02 15:00:19 +0200
commit2a6eb947e7e0b54bf5c721b53a27e252f1e97e35 (patch)
treebee43daafc70d2c4858c056290fd2c34a1c240eb
parent2b9c874cff4364b6ce2ac59b57eef6c3f13f59f1 (diff)
Added build step CI in gitlab
Change-Id: I11430c0dfe9c8794d1266c5fd675712f83d30e3e Issue-ID: DCAEGEN2-557 Signed-off-by: wasala <przemyslaw.wasala@nokia.com>
-rw-r--r--.gitlab-ci.yml24
-rw-r--r--pom.xml35
-rw-r--r--prh-aai-client/pom.xml1
-rw-r--r--prh-app-server/pom.xml15
-rw-r--r--prh-commons/pom.xml123
-rw-r--r--prh-dmaap-client/pom.xml2
6 files changed, 123 insertions, 77 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 00000000..fe4eb093
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -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
diff --git a/pom.xml b/pom.xml
index 955e6e1d..d08c9e9c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -78,6 +78,21 @@
</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>
@@ -91,11 +106,24 @@
</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>
@@ -377,6 +405,13 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
</plugins>
</pluginManagement>
<plugins>
diff --git a/prh-aai-client/pom.xml b/prh-aai-client/pom.xml
index 28abdd81..f8aeea5c 100644
--- a/prh-aai-client/pom.xml
+++ b/prh-aai-client/pom.xml
@@ -38,7 +38,6 @@
<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
</properties>
-
<dependencies>
<!-- DEVELOPMENT DEPENDENCIES -->
diff --git a/prh-app-server/pom.xml b/prh-app-server/pom.xml
index 5706dc93..aad1c99a 100644
--- a/prh-app-server/pom.xml
+++ b/prh-app-server/pom.xml
@@ -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>
@@ -114,18 +116,7 @@
<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>
diff --git a/prh-commons/pom.xml b/prh-commons/pom.xml
index 40ad85f5..8aa966cc 100644
--- a/prh-commons/pom.xml
+++ b/prh-commons/pom.xml
@@ -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
diff --git a/prh-dmaap-client/pom.xml b/prh-dmaap-client/pom.xml
index bce5ccbb..a84382b2 100644
--- a/prh-dmaap-client/pom.xml
+++ b/prh-dmaap-client/pom.xml
@@ -36,7 +36,6 @@
<properties>
<main.basedir>${project.parent.basedir}</main.basedir>
</properties>
-
<dependencies>
<!-- DEVELOPMENT DEPENDENCIES -->
@@ -104,6 +103,5 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
-
</dependencies>
</project> \ No newline at end of file