Commit 05e74c1c authored by Spiros Koulouzis's avatar Spiros Koulouzis

added docker files

parent 0259793e
...@@ -12,9 +12,9 @@ pipeline { ...@@ -12,9 +12,9 @@ pipeline {
echo 'Building' echo 'Building'
git branch: 'DRIP_3.0', url: 'https://github.com/skoulouzis/DRIP.git' git branch: 'DRIP_3.0', url: 'https://github.com/skoulouzis/DRIP.git'
sh "mvn -Dmaven.test.skip=true install" sh "mvn -Dmaven.test.skip=true install"
sh "cd drip-planner && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt" sh "cd drip-planner && python3.7 -m venv venv && venv/bin/pip3 install -r requirements.txt"
sh "cd ../" sh "cd ../"
sh "cd sure_tosca-flask-server && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt && venv/bin/pip3 install -r test-requirements.txt" sh "cd sure_tosca-flask-server && python3.7 -m venv venv && venv/bin/pip3 install -r requirements.txt && venv/bin/pip3 install -r test-requirements.txt"
sh "pwd && ls" sh "pwd && ls"
} }
} }
...@@ -22,8 +22,8 @@ pipeline { ...@@ -22,8 +22,8 @@ pipeline {
steps { steps {
echo 'Testing' echo 'Testing'
sh "mvn test" sh "mvn test"
sh "cd drip-planner && venv/bin/python3 -m unittest discover" sh "cd drip-planner && venv/bin/python3.7 -m unittest discover"
sh "cd sure_tosca-flask-server && venv/bin/python3 -m unittest discover" sh "cd sure_tosca-flask-server && venv/bin/python3.7 -m unittest discover"
} }
} }
stage('Package') { stage('Package') {
......
...@@ -2,9 +2,7 @@ ...@@ -2,9 +2,7 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e478ccae-5352-4e8e-9efb-3f5cda44e877" name="Default Changelist" comment=""> <list default="true" id="e478ccae-5352-4e8e-9efb-3f5cda44e877" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/drip-planner.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/drip-planner.iml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/test/test_planner.py" beforeDir="false" afterPath="$PROJECT_DIR$/test/test_planner.py" afterDir="false" />
</list> </list>
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
...@@ -49,7 +47,7 @@ ...@@ -49,7 +47,7 @@
</list> </list>
</option> </option>
</component> </component>
<component name="RunManager" selected="Python tests.Unittests for test_planner.MyTestCase.test_something"> <component name="RunManager" selected="Python.__main__">
<configuration name="__main__" type="PythonConfigurationType" factoryName="Python" temporary="true"> <configuration name="__main__" type="PythonConfigurationType" factoryName="Python" temporary="true">
<module name="drip-planner" /> <module name="drip-planner" />
<option name="INTERPRETER_OPTIONS" value="" /> <option name="INTERPRETER_OPTIONS" value="" />
...@@ -106,9 +104,9 @@ ...@@ -106,9 +104,9 @@
</list> </list>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Python tests.Unittests for test_planner.MyTestCase.test_something" />
<item itemvalue="Python tests.Unittests in test_planner.py" />
<item itemvalue="Python.__main__" /> <item itemvalue="Python.__main__" />
<item itemvalue="Python tests.Unittests in test_planner.py" />
<item itemvalue="Python tests.Unittests for test_planner.MyTestCase.test_something" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
......
FROM python:3.7-alpine
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r requirements.txt
COPY . /usr/src/app
EXPOSE 8081
ENTRYPOINT ["python __main__.py $RABBITMQ_HOST planner_queue"]
FROM python:2-alpine FROM python:3.7-alpine
RUN mkdir -p /usr/src/app RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app WORKDIR /usr/src/app
...@@ -13,4 +13,4 @@ EXPOSE 8081 ...@@ -13,4 +13,4 @@ EXPOSE 8081
ENTRYPOINT ["python"] ENTRYPOINT ["python"]
CMD ["-m", "sure_tosca"] CMD ["-m", "sure_tosca"]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment