added updated dockerfiles and ric workflow
[it/otf.git] / otf-service-api / docker / Dockerfile
1 #   Copyright (c) 2019 AT&T Intellectual Property.                             #\r
2 #                                                                              #\r
3 #   Licensed under the Apache License, Version 2.0 (the "License");            #\r
4 #   you may not use this file except in compliance with the License.           #\r
5 #   You may obtain a copy of the License at                                    #\r
6 #                                                                              #\r
7 #       http://www.apache.org/licenses/LICENSE-2.0                             #\r
8 #                                                                              #\r
9 #   Unless required by applicable law or agreed to in writing, software        #\r
10 #   distributed under the License is distributed on an "AS IS" BASIS,          #\r
11 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
12 #   See the License for the specific language governing permissions and        #\r
13 #   limitations under the License.                                             #\r
14 ################################################################################\r
15 \r
16 FROM openjdk:8\r
17 \r
18 ENV NAMESPACE=namespace\r
19 ENV APP_NAME=otf-service-api\r
20 ENV AAF_PERM_TYPE=type\r
21 ENV AAF_ID=username\r
22 ENV AAF_MECH_PASSWORD=password\r
23 ENV AAF_PASSWORD=password\r
24 ENV CADI_KEYFILE=/opt/secret/keyfile\r
25 ENV CADI_HOSTNAME=localhost\r
26 ENV APP_VERSION=1.0\r
27 ENV OTF_MONGO_HOSTS=localhost:27017\r
28 ENV OTF_MONGO_USERNAME=username\r
29 ENV OTF_MONGO_PASSWORD=password\r
30 ENV OTF_MONGO_REPLICASET=rs0\r
31 ENV OTF_MONGO_DATABASE=otf\r
32 ENV otf.camunda.host=http://localhost\r
33 ENV otf.camunda.port=8080\r
34 ENV otf.camunda.executionUri=otf/tcu/execute-test/v1\r
35 ENV otf.camunda.pollingUri=otf/tcu/process-instance-completion-check/v1\r
36 ENV otf.camunda.deploymentUri=otf/tcu/deploy-test-strategy-zip/v1\r
37 ENV otf.camunda.processDefinitionKeyUri=rest/process-definition/key\r
38 ENV otf.camunda.deploymentDeletionUri=otf/tcu/delete-test-strategy/v1/deployment-id\r
39 ENV otf.camunda.testDefinitionDeletionUri=otf/tcu/delete-test-strategy/v1/test-definition-id\r
40 ENV otf.camunda.uri.execute-test=otf/tcu/execute/workflowRequest\r
41 ENV otf.camunda.uri.process-instance-completion-check=otf/tcu/process-instance-completion-check/v1\r
42 ENV otf.camunda.uri.deploy-test-strategy-zip=otf/tcu/deploy-test-strategy-zip/v1\r
43 ENV otf.camunda.uri.process-definition=rest/process-definition/key\r
44 ENV otf.camunda.uri.delete-test-strategy=otf/tcu/delete-test-strategy/v1/deployment-id\r
45 ENV otf.camunda.uri.delete-test-strategy-test-definition-id=otf/tcu/delete-test-strategy/v1/test-definition-id\r
46 ENV otf.camunda.uri.health=/otf/health/v1\r
47 ENV otf.api.poll-interval=6000\r
48 ENV otf.api.poll-attempts=50\r
49 ENV OTF_CERT_PATH=opt/cert/cert.p12\r
50 ENV OTF_CERT_PASS=password\r
51 \r
52 RUN apt update\r
53 RUN apt install maven -y\r
54 COPY settings.xml settings.xml\r
55 COPY src src\r
56 COPY pom.xml pom.xml\r
57 RUN mvn clean install -s settings.xml -DskipTests\r
58 RUN rm /usr/share/maven/lib/*\r
59 RUN ls\r
60 RUN mkdir -p /otf/logs\r
61 RUN mv target/otf-service-api.jar app.jar\r
62 RUN rm -r target\r
63 \r
64 ENTRYPOINT ["java", "-jar", "app.jar"]\r