added updated dockerfiles and ric workflow
[it/otf.git] / otf-service-api / docker / Dockerfile
index d1ef755..82be010 100644 (file)
@@ -1,3 +1,18 @@
+#   Copyright (c) 2019 AT&T Intellectual Property.                             #\r
+#                                                                              #\r
+#   Licensed under the Apache License, Version 2.0 (the "License");            #\r
+#   you may not use this file except in compliance with the License.           #\r
+#   You may obtain a copy of the License at                                    #\r
+#                                                                              #\r
+#       http://www.apache.org/licenses/LICENSE-2.0                             #\r
+#                                                                              #\r
+#   Unless required by applicable law or agreed to in writing, software        #\r
+#   distributed under the License is distributed on an "AS IS" BASIS,          #\r
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
+#   See the License for the specific language governing permissions and        #\r
+#   limitations under the License.                                             #\r
+################################################################################\r
+\r
 FROM openjdk:8\r
 \r
 ENV NAMESPACE=namespace\r
@@ -14,8 +29,8 @@ ENV OTF_MONGO_USERNAME=username
 ENV OTF_MONGO_PASSWORD=password\r
 ENV OTF_MONGO_REPLICASET=rs0\r
 ENV OTF_MONGO_DATABASE=otf\r
-ENV otf.camunda.host=https://localhost\r
-ENV otf.camunda.port=31313\r
+ENV otf.camunda.host=http://localhost\r
+ENV otf.camunda.port=8080\r
 ENV otf.camunda.executionUri=otf/tcu/execute-test/v1\r
 ENV otf.camunda.pollingUri=otf/tcu/process-instance-completion-check/v1\r
 ENV otf.camunda.deploymentUri=otf/tcu/deploy-test-strategy-zip/v1\r
@@ -34,10 +49,16 @@ ENV otf.api.poll-attempts=50
 ENV OTF_CERT_PATH=opt/cert/cert.p12\r
 ENV OTF_CERT_PASS=password\r
 \r
-COPY otf-service-api.jar app.jar\r
-\r
+RUN apt update\r
+RUN apt install maven -y\r
+COPY settings.xml settings.xml\r
+COPY src src\r
+COPY pom.xml pom.xml\r
+RUN mvn clean install -s settings.xml -DskipTests\r
+RUN rm /usr/share/maven/lib/*\r
+RUN ls\r
 RUN mkdir -p /otf/logs\r
-\r
-ADD src src\r
+RUN mv target/otf-service-api.jar app.jar\r
+RUN rm -r target\r
 \r
 ENTRYPOINT ["java", "-jar", "app.jar"]\r