added updated dockerfiles and ric workflow

Change-Id: I28f4367307789418825deb5c81684d6fccbf3d32
Signed-off-by: Rohan Patel <rp5811@att.com>
diff --git a/otf-service-api/.gitignore b/otf-service-api/.gitignore
index 681073c..f4fc740 100644
--- a/otf-service-api/.gitignore
+++ b/otf-service-api/.gitignore
@@ -1,3 +1,18 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #

+#                                                                              #

+#   Licensed under the Apache License, Version 2.0 (the "License");            #

+#   you may not use this file except in compliance with the License.           #

+#   You may obtain a copy of the License at                                    #

+#                                                                              #

+#       http://www.apache.org/licenses/LICENSE-2.0                             #

+#                                                                              #

+#   Unless required by applicable law or agreed to in writing, software        #

+#   distributed under the License is distributed on an "AS IS" BASIS,          #

+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #

+#   See the License for the specific language governing permissions and        #

+#   limitations under the License.                                             #

+################################################################################

+

 /target/

 tokens/

 out/

diff --git a/otf-service-api/Jenkinsfile b/otf-service-api/Jenkinsfile
index 68e8d66..92511b5 100644
--- a/otf-service-api/Jenkinsfile
+++ b/otf-service-api/Jenkinsfile
@@ -1,5 +1,20 @@
 #!/usr/bin/env groovy

 

+/*  Copyright (c) 2019 AT&T Intellectual Property.                             #

+#                                                                              #

+#   Licensed under the Apache License, Version 2.0 (the "License");            #

+#   you may not use this file except in compliance with the License.           #

+#   You may obtain a copy of the License at                                    #

+#                                                                              #

+#       http://www.apache.org/licenses/LICENSE-2.0                             #

+#                                                                              #

+#   Unless required by applicable law or agreed to in writing, software        #

+#   distributed under the License is distributed on an "AS IS" BASIS,          #

+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #

+#   See the License for the specific language governing permissions and        #

+#   limitations under the License.                                             #

+##############################################################################*/

+

 properties([[$class: 'ParametersDefinitionProperty', parameterDefinitions: [

         [$class: 'hudson.model.StringParameterDefinition', name: 'PHASE', defaultValue: "BUILD"],

         [$class: 'hudson.model.StringParameterDefinition', name: 'ENV', defaultValue: "dev"],

diff --git a/otf-service-api/docker/Dockerfile b/otf-service-api/docker/Dockerfile
index d1ef755..82be010 100644
--- a/otf-service-api/docker/Dockerfile
+++ b/otf-service-api/docker/Dockerfile
@@ -1,3 +1,18 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #

+#                                                                              #

+#   Licensed under the Apache License, Version 2.0 (the "License");            #

+#   you may not use this file except in compliance with the License.           #

+#   You may obtain a copy of the License at                                    #

+#                                                                              #

+#       http://www.apache.org/licenses/LICENSE-2.0                             #

+#                                                                              #

+#   Unless required by applicable law or agreed to in writing, software        #

+#   distributed under the License is distributed on an "AS IS" BASIS,          #

+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #

+#   See the License for the specific language governing permissions and        #

+#   limitations under the License.                                             #

+################################################################################

+

 FROM openjdk:8

 

 ENV NAMESPACE=namespace

@@ -14,8 +29,8 @@
 ENV OTF_MONGO_PASSWORD=password

 ENV OTF_MONGO_REPLICASET=rs0

 ENV OTF_MONGO_DATABASE=otf

-ENV otf.camunda.host=https://localhost

-ENV otf.camunda.port=31313

+ENV otf.camunda.host=http://localhost

+ENV otf.camunda.port=8080

 ENV otf.camunda.executionUri=otf/tcu/execute-test/v1

 ENV otf.camunda.pollingUri=otf/tcu/process-instance-completion-check/v1

 ENV otf.camunda.deploymentUri=otf/tcu/deploy-test-strategy-zip/v1

@@ -34,10 +49,16 @@
 ENV OTF_CERT_PATH=opt/cert/cert.p12

 ENV OTF_CERT_PASS=password

 

-COPY otf-service-api.jar app.jar

-

+RUN apt update

+RUN apt install maven -y

+COPY settings.xml settings.xml

+COPY src src

+COPY pom.xml pom.xml

+RUN mvn clean install -s settings.xml -DskipTests

+RUN rm /usr/share/maven/lib/*

+RUN ls

 RUN mkdir -p /otf/logs

-

-ADD src src

+RUN mv target/otf-service-api.jar app.jar

+RUN rm -r target

 

 ENTRYPOINT ["java", "-jar", "app.jar"]

diff --git a/otf-service-api/settings.xml b/otf-service-api/settings.xml
new file mode 100644
index 0000000..5a4325d
--- /dev/null
+++ b/otf-service-api/settings.xml
@@ -0,0 +1,215 @@
+<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"

+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

+  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">

+

+  <localRepository>/home/YOURUSERID/onap/.m2/repository</localRepository>

+

+  <profiles>

+    <profile>

+      <id>openecomp-staging</id>

+      <repositories>

+        <repository>

+          <id>openecomp-staging</id>

+          <name>openecomp-staging</name>

+          <url>https://nexus.onap.org/content/repositories/staging/</url>

+          <releases>

+            <enabled>true</enabled>

+            <updatePolicy>never</updatePolicy>

+          </releases>

+          <snapshots>

+            <enabled>false</enabled>

+          </snapshots>

+        </repository>

+      </repositories>

+      <pluginRepositories>

+        <pluginRepository>

+          <id>openecomp-staging</id>

+          <name>openecomp-staging</name>

+          <url>https://nexus.onap.org/content/repositories/staging/</url>

+          <releases>

+            <enabled>true</enabled>

+            <updatePolicy>never</updatePolicy>

+          </releases>

+          <snapshots>

+            <enabled>false</enabled>

+          </snapshots>

+        </pluginRepository>

+      </pluginRepositories>

+    </profile>

+    <profile>

+      <id>openecomp-public</id>

+      <repositories>

+        <repository>

+          <id>openecomp-public</id>

+          <name>openecomp-public</name>

+          <url>https://nexus.onap.org/content/repositories/public/</url>

+          <releases>

+            <enabled>true</enabled>

+            <updatePolicy>never</updatePolicy>

+          </releases>

+          <snapshots>

+            <enabled>false</enabled>

+          </snapshots>

+        </repository>

+      </repositories>

+      <pluginRepositories>

+        <pluginRepository>

+          <id>openecomp-public</id>

+          <name>openecomp-public</name>

+          <url>https://nexus.onap.org/content/repositories/public/</url>

+          <releases>

+            <enabled>true</enabled>

+            <updatePolicy>never</updatePolicy>

+          </releases>

+          <snapshots>

+            <enabled>false</enabled>

+          </snapshots>

+        </pluginRepository>

+      </pluginRepositories>

+    </profile>

+    <profile>

+      <id>openecomp-release</id>

+      <repositories>

+        <repository>

+          <id>openecomp-release</id>

+          <name>openecomp-release</name>

+          <url>https://nexus.onap.org/content/repositories/releases/</url>

+          <releases>

+            <enabled>true</enabled>

+            <updatePolicy>never</updatePolicy>

+          </releases>

+          <snapshots>

+            <enabled>false</enabled>

+          </snapshots>

+        </repository>

+      </repositories>

+      <pluginRepositories>

+        <pluginRepository>

+          <id>openecomp-release</id>

+          <name>openecomp-release</name>

+          <url>https://nexus.onap.org/content/repositories/releases/</url>

+          <releases>

+            <enabled>true</enabled>

+            <updatePolicy>never</updatePolicy>

+          </releases>

+          <snapshots>

+            <enabled>false</enabled>

+          </snapshots>

+        </pluginRepository>

+      </pluginRepositories>

+    </profile>

+

+    <profile>

+      <id>openecomp-snapshots</id>

+      <repositories>

+        <repository>

+          <id>openecomp-snapshot</id>

+          <name>openecomp-snapshot</name>

+          <url>https://nexus.onap.org/content/repositories/snapshots/</url>

+          <releases>

+            <enabled>false</enabled>

+          </releases>

+          <snapshots>

+            <enabled>true</enabled>

+          </snapshots>

+        </repository>

+      </repositories>

+      <pluginRepositories>

+        <pluginRepository>

+          <id>openecomp-snapshot</id>

+          <name>openecomp-snapshot</name>

+          <url>https://nexus.onap.org/content/repositories/snapshots/</url>

+          <releases>

+            <enabled>false</enabled>

+          </releases>

+          <snapshots>

+            <enabled>true</enabled>

+          </snapshots>

+        </pluginRepository>

+      </pluginRepositories>

+    </profile>

+    <profile>

+      <id>opendaylight-release</id>

+      <repositories>

+        <repository>

+          <id>opendaylight-mirror</id>

+          <name>opendaylight-mirror</name>

+          <url>https://nexus.opendaylight.org/content/repositories/public/</url>

+          <releases>

+            <enabled>true</enabled>

+            <updatePolicy>never</updatePolicy>

+          </releases>

+          <snapshots>

+            <enabled>false</enabled>

+          </snapshots>

+        </repository>

+      </repositories>

+      <pluginRepositories>

+        <pluginRepository>

+          <id>opendaylight-mirror</id>

+          <name>opendaylight-mirror</name>

+          <url>https://nexus.opendaylight.org/content/repositories/public/</url>

+          <releases>

+            <enabled>true</enabled>

+            <updatePolicy>never</updatePolicy>

+          </releases>

+          <snapshots>

+            <enabled>false</enabled>

+          </snapshots>

+        </pluginRepository>

+      </pluginRepositories>

+    </profile>

+

+    <profile>

+      <id>opendaylight-snapshots</id>

+      <repositories>

+        <repository>

+          <id>opendaylight-snapshot</id>

+          <name>opendaylight-snapshot</name>

+          <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>

+          <releases>

+            <enabled>false</enabled>

+          </releases>

+          <snapshots>

+            <enabled>true</enabled>

+          </snapshots>

+        </repository>

+      </repositories>

+      <pluginRepositories>

+        <pluginRepository>

+          <id>opendaylight-snapshot</id>

+          <name>opendaylight-snapshot</name>

+          <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>

+          <releases>

+            <enabled>false</enabled>

+          </releases>

+          <snapshots>

+            <enabled>true</enabled>

+          </snapshots>

+        </pluginRepository>

+      </pluginRepositories>

+    </profile>

+

+    <profile>

+      <id>default</id>

+      <repositories>

+        <repository>

+          <id>default</id>

+          <name>default</name>

+          <url>https://repo.maven.org/maven2/</url>

+        </repository>

+      </repositories>

+    </profile>

+

+  </profiles>

+

+  <activeProfiles>

+    <activeProfile>default</activeProfile>

+    <activeProfile>openecomp-staging</activeProfile>

+    <activeProfile>openecomp-public</activeProfile>

+    <activeProfile>openecomp-release</activeProfile>

+    <activeProfile>openecomp-snapshots</activeProfile>

+    <activeProfile>opendaylight-release</activeProfile>

+    <activeProfile>opendaylight-snapshots</activeProfile>

+  </activeProfiles>

+</settings>