Merge "Improve security release notes"
authorMatthieu Geerebaert <matthieu.geerebaert@orange.com>
Tue, 28 May 2019 15:22:28 +0000 (15:22 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 28 May 2019 15:22:28 +0000 (15:22 +0000)
Dockerfile
pom.xml
src/main/java/org/onap/nbi/apis/hub/service/dmaap/DMaaPEventsScheduler.java
src/main/java/org/onap/nbi/apis/servicecatalog/SdcClient.java
version.properties

index 0566534..8824c3b 100644 (file)
 FROM openjdk:8-jre-alpine
 
 ARG SERVER_PORT
-ARG PKG_FILENAME=nbi-rest-services-4.0.0.jar
+ARG PKG_FILENAME=nbi-rest-services-4.0.1-SNAPSHOT.jar
 ADD target/$PKG_FILENAME app.jar
 
 RUN addgroup -S appgroup
 RUN adduser -S appuser -G appgroup
+RUN mkdir temptoscafile
+RUN chown appuser:appgroup temptoscafile/
 
 COPY src/main/resources/certificate /certs
 ARG CERT_PASS=changeit
diff --git a/pom.xml b/pom.xml
index bbe206f..9a254a4 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -13,7 +13,7 @@
 
   <groupId>org.onap.externalapi-nbi</groupId>
   <artifactId>nbi-rest-services</artifactId>
-  <version>4.0.0</version>
+  <version>4.0.1-SNAPSHOT</version>
   <packaging>jar</packaging>
 
   <name>externalapi-nbi</name>
           </includes>
         </configuration>
       </plugin>
-      <plugin>
-        <groupId>org.sonatype.plugins</groupId>
-        <artifactId>nexus-staging-maven-plugin</artifactId>
-        <extensions>true</extensions>
-        <configuration>
-          <nexusUrl>${nexusproxy}</nexusUrl>
-          <stagingProfileId>176c31dfe190a</stagingProfileId>
-          <serverId>ecomp-staging</serverId>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-site-plugin</artifactId>
         <artifactId>sonar-maven-plugin</artifactId>
         <version>3.2</version>
       </plugin>
-      <!--       <plugin> -->
-      <!--         <groupId>org.jacoco</groupId> -->
-      <!--         <artifactId>jacoco-maven-plugin</artifactId> -->
-      <!--         <version>0.8.1</version> -->
-      <!--         <configuration> -->
-      <!--           <dumpOnExit>true</dumpOnExit> -->
-      <!--           <includes> -->
-      <!--             <include>org.onap.nbi.*</include> -->
-      <!--           </includes> -->
-      <!--           <excludes> -->
-      <!--             <exclude>**/model/**/*</exclude> -->
-      <!--           </excludes> -->
-      <!--         </configuration> -->
-      <!--         <executions> -->
-      <!--           <execution> -->
-      <!--             <id>pre-unit-test</id> -->
-      <!--             <goals> -->
-      <!--               <goal>prepare-agent</goal> -->
-      <!--             </goals> -->
-      <!--             <configuration> -->
-      <!--               <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile> -->
-      <!--               <append>true</append> -->
-      <!--             </configuration> -->
-      <!--           </execution> -->
-      <!--           <execution> -->
-      <!--             <id>pre-integration-test</id> -->
-      <!--             <phase>pre-integration-test</phase> -->
-      <!--             <goals> -->
-      <!--               <goal>prepare-agent</goal> -->
-      <!--             </goals> -->
-      <!--             <configuration> -->
-      <!--               <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile> -->
-      <!--               <append>true</append> -->
-      <!--             </configuration> -->
-      <!--           </execution> -->
-      <!--           <execution> -->
-      <!--             <goals> -->
-      <!--               <goal>merge</goal> -->
-      <!--             </goals> -->
-      <!--             <phase>post-integration-test</phase> -->
-      <!--             <configuration> -->
-      <!--               <fileSets> -->
-      <!--                 <fileSet -->
-      <!--                   implementation="org.apache.maven.shared.model.fileset.FileSet"> -->
-      <!--                   <directory>${project.build.directory}/coverage-reports</directory> -->
-      <!--                   <includes> -->
-      <!--                     <include>*.exec</include> -->
-      <!--                   </includes> -->
-      <!--                 </fileSet> -->
-      <!--               </fileSets> -->
-      <!--               <destFile>${project.build.directory}/jacoco-dev.exec</destFile> -->
-      <!--             </configuration> -->
-      <!--           </execution> -->
-      <!--         </executions> -->
-      <!--       </plugin> -->
+      <plugin>
+        <groupId>org.jacoco</groupId>
+        <artifactId>jacoco-maven-plugin</artifactId>
+        <version>0.8.1</version>
+        <configuration>
+          <dumpOnExit>true</dumpOnExit>
+          <includes>
+            <include>org.onap.nbi.*</include>
+          </includes>
+          <excludes>
+            <exclude>**/model/**/*</exclude>
+          </excludes>
+        </configuration>
+        <executions>
+          <execution>
+            <id>pre-unit-test</id>
+            <goals>
+              <goal>prepare-agent</goal>
+            </goals>
+            <configuration>
+              <destFile>${project.build.directory}/coverage-reports/jacoco.exec</destFile>
+            </configuration>
+          </execution>
+          <execution>
+            <id>pre-integration-test</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>prepare-agent</goal>
+            </goals>
+            <configuration>
+              <destFile>${project.build.directory}/coverage-reports/jacoco-it.exec</destFile>
+            </configuration>
+          </execution>
+          <execution>
+            <goals>
+              <goal>merge</goal>
+            </goals>
+            <phase>post-integration-test</phase>
+            <configuration>
+              <fileSets>
+                <fileSet
+                  implementation="org.apache.maven.shared.model.fileset.FileSet">
+                  <directory>${project.build.directory}/coverage-reports</directory>
+                  <includes>
+                    <include>*.exec</include>
+                  </includes>
+                </fileSet>
+              </fileSets>
+              <destFile>${project.build.directory}/jacoco-dev.exec</destFile>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
       <plugin>
         <artifactId>maven-source-plugin</artifactId>
         <executions>
     </plugins>
   </build>
 
-
   <profiles>
     <profile>
       <id>docker</id>
index cdd1825..448b32c 100644 (file)
@@ -31,7 +31,8 @@ public class DMaaPEventsScheduler {
         initialDelayString = "${dmaapCheck.initial}")
     private void processDMaaPEvents() {
         checkDMaaPEventsManager.checkForDMaaPAAIEvents();
-        checkDMaaPEventsManager.checkForDMaaPSDCEvents();
+        // Comment out until we discover how to check with Authenticated topic
+        //checkDMaaPEventsManager.checkForDMaaPSDCEvents();
 
     }
 }
index 0be415c..2e6893d 100644 (file)
@@ -92,7 +92,6 @@ public class SdcClient {
 
         String callUrl = sdcGetUrl.replace("{id}", id);
         UriComponentsBuilder callURLFormated = UriComponentsBuilder.fromHttpUrl(callUrl);
-
         ResponseEntity<Object> response = callSdc(callURLFormated.build().encode().toUri());
         return (LinkedHashMap) response.getBody();
 
@@ -130,8 +129,12 @@ public class SdcClient {
 
         UriComponentsBuilder callURI = UriComponentsBuilder.fromHttpUrl(urlBuilder.toString());
 
+        File directory = new File("temptoscafile");
+        if (! directory.exists()){
+            directory.mkdir();
+        }
 
-        String fileName = System.currentTimeMillis() + "tosca.csar";
+        String fileName = "temptoscafile/"+System.currentTimeMillis() + "tosca.csar";
         ResponseEntity<byte[]> response = callSdcWithAttachment(callURI.build().encode().toUri());
         File toscaFile = new File(fileName);
         try {
@@ -178,6 +181,7 @@ public class SdcClient {
     private ResponseEntity<Object> callSdc(URI callURI) {
         ResponseEntity<Object> response =
                 restTemplate.exchange(callURI, HttpMethod.GET, buildRequestHeader(), Object.class);
+
         if(LOGGER.isDebugEnabled()) {
             LOGGER.debug("response body : {} ",response.getBody().toString());
         }
index 7a5aafd..54c8963 100644 (file)
@@ -20,7 +20,7 @@
 
 major            = 4
 minor            = 0
-patch            = 0
+patch            = 1
 
 base_version     = ${major}.${minor}.${patch}