From 43f80a79c1ec298479422190a8b8ee42efbff717 Mon Sep 17 00:00:00 2001 From: marcsello Date: Thu, 8 Apr 2021 21:53:09 +0200 Subject: [PATCH] Initial commit --- .drone.yml | 25 +++++++ .gitignore | 132 +++++++++++++++++++++++++++++++++ Dockerfile | 12 +++ requirements.txt | 1 + single_ursim_control/config.py | 0 single_ursim_control/main.py | 6 ++ 6 files changed, 176 insertions(+) create mode 100644 .drone.yml create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 requirements.txt create mode 100644 single_ursim_control/config.py create mode 100644 single_ursim_control/main.py diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..a248b46 --- /dev/null +++ b/.drone.yml @@ -0,0 +1,25 @@ +kind: pipeline +type: docker +name: default +steps: + + - name: code-analysis + image: aosapps/drone-sonar-plugin + settings: + sonar_host: + from_secret: SONAR_HOST + sonar_token: + from_secret: SONAR_CODE + + - name: kaniko + image: banzaicloud/drone-kaniko + settings: + registry: registry.kmlabz.com + repo: universalrobots/${DRONE_REPO_NAME} + username: + from_secret: DOCKER_USERNAME + password: + from_secret: DOCKER_PASSWORD + tags: + - latest + - ${DRONE_BUILD_NUMBER} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f345153 --- /dev/null +++ b/.gitignore @@ -0,0 +1,132 @@ +# ---> Python +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +.idea/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1631d24 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +FROM python:3.9 + +ADD requirements.txt requirements.txt +RUN pip3 install -r requirements.txt + +ADD single_ursim_control /single_ursim_control/ +WORKDIR /single_ursim_control/ + +ARG RELEASE_ID +ENV RELEASE_ID ${RELEASE_ID:-""} + +CMD ["python3", "main.py"] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..71e51b5 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +ur-rtde~=1.4.1 \ No newline at end of file diff --git a/single_ursim_control/config.py b/single_ursim_control/config.py new file mode 100644 index 0000000..e69de29 diff --git a/single_ursim_control/main.py b/single_ursim_control/main.py new file mode 100644 index 0000000..9a92cb5 --- /dev/null +++ b/single_ursim_control/main.py @@ -0,0 +1,6 @@ +def main(): + print("Hello world!") + + +if __name__ == '__main__': + main()