Commit 0db14a92 authored by Spiros Koulouzis's avatar Spiros Koulouzis

created test docker

parent 231b9cea
FROM python:3.8-buster FROM ubuntu:18.04
RUN apt update -y && apt-get install ansible openjdk-11-jre-headless -y RUN apt-get update && apt-get install -y openssh-server ansible openjdk-11-jre-headless python3.8 python3-venv maven
RUN mkdir /var/run/sshd
# RUN echo 'root:XXX' | chpasswd
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
RUN mkdir -p ~/.ssh
EXPOSE 22
CMD echo $PUBLIC_KEY >> ~/.ssh/authorized_keys &&\
/usr/sbin/sshd -D
#!/bin/bash #!/bin/bash
cd ../
mvn -Dmaven.test.skip=true install mvn -Dmaven.test.skip=true install
status=$?
[ $status -eq 0 ] && echo "build successful" || exit -1
cd planner && rm -rf venv && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt cd planner && rm -rf venv && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt
status=$?
[ $status -eq 0 ] && echo "build successful" || exit -1
cd ../ cd ../
cd sure_tosca-flask-server && rm -rf venv && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt && venv/bin/pip3 install -r test-requirements.txt cd sure_tosca-flask-server && rm -rf venv && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt && venv/bin/pip3 install -r test-requirements.txt
status=$?
[ $status -eq 0 ] && echo "build successful" || exit -1
cd ../ cd ../
cd deployer && rm -rf venv && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt cd deployer && rm -rf venv && python3 -m venv venv && venv/bin/pip3 install -r requirements.txt
status=$?
[ $status -eq 0 ] && echo "build successful" || exit -1
#!/bin/bash #!/bin/bash
mvn test mvn test
status=$?
[ $status -eq 0 ] && echo "build successful" || exit -1
cd drip-planner && venv/bin/python3 -m unittest discover cd drip-planner && venv/bin/python3 -m unittest discover
status=$?
[ $status -eq 0 ] && echo "build successful" || exit -1
cd ../ cd ../
cd sure_tosca-flask-server && venv/bin/python3 -m unittest discover cd sure_tosca-flask-server && venv/bin/python3 -m unittest discover
status=$?
[ $status -eq 0 ] && echo "build successful" || exit -1
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