diff --git a/infrastructure/clojure/build.py b/infrastructure/clojure/build.py index 3267dae..7d337ea 100644 --- a/infrastructure/clojure/build.py +++ b/infrastructure/clojure/build.py @@ -2,8 +2,8 @@ from os import environ from pybuilder.core import task, init from ddadevops import * -name = "clojure" -MODULE = "image" +name = "ddadevops" +MODULE = "clojure" PROJECT_ROOT_PATH = "../.." diff --git a/infrastructure/ddadevops/build.py b/infrastructure/ddadevops/build.py new file mode 100644 index 0000000..c07b871 --- /dev/null +++ b/infrastructure/ddadevops/build.py @@ -0,0 +1,50 @@ +from os import environ +from pybuilder.core import task, init +from ddadevops import * + +name = "ddadevops" +MODULE = "" +PROJECT_ROOT_PATH = "../.." + + +@init +def initialize(project): + + input = { + "name": name, + "module": MODULE, + "stage": "notused", + "project_root_path": PROJECT_ROOT_PATH, + "build_types": ["IMAGE"], + "mixin_types": [], + } + + project.build_depends_on("ddadevops>=4.0.0") + + build = DevopsImageBuild(project, input) + build.initialize_build_dir() + + +@task +def image(project): + build = get_devops_build(project) + build.image() + + +@task +def drun(project): + build = get_devops_build(project) + build.drun() + + +@task +def test(project): + build = get_devops_build(project) + build.test() + + +@task +def publish(project): + build = get_devops_build(project) + build.dockerhub_login() + build.dockerhub_publish() diff --git a/infrastructure/ddadevops/image/Dockerfile b/infrastructure/ddadevops/image/Dockerfile new file mode 100644 index 0000000..833fa70 --- /dev/null +++ b/infrastructure/ddadevops/image/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3.10-alpine + +RUN set -eux; +RUN apk add --no-cache python3 py3-pip openssl-dev bash git; +RUN python3 -m pip install -U pip; +RUN pip3 install pybuilder ddadevops deprecation dda-python-terraform boto3 pyyaml inflection; diff --git a/infrastructure/dind/build.py b/infrastructure/dind/build.py new file mode 100644 index 0000000..eddc7da --- /dev/null +++ b/infrastructure/dind/build.py @@ -0,0 +1,50 @@ +from os import environ +from pybuilder.core import task, init +from ddadevops import * + +name = "ddadevops" +MODULE = "dind" +PROJECT_ROOT_PATH = "../.." + + +@init +def initialize(project): + + input = { + "name": name, + "module": MODULE, + "stage": "notused", + "project_root_path": PROJECT_ROOT_PATH, + "build_types": ["IMAGE"], + "mixin_types": [], + } + + project.build_depends_on("ddadevops>=4.0.0") + + build = DevopsImageBuild(project, input) + build.initialize_build_dir() + + +@task +def image(project): + build = get_devops_build(project) + build.image() + + +@task +def drun(project): + build = get_devops_build(project) + build.drun() + + +@task +def test(project): + build = get_devops_build(project) + build.test() + + +@task +def publish(project): + build = get_devops_build(project) + build.dockerhub_login() + build.dockerhub_publish() diff --git a/infrastructure/dind/image/Dockerfile b/infrastructure/dind/image/Dockerfile new file mode 100644 index 0000000..875d0fe --- /dev/null +++ b/infrastructure/dind/image/Dockerfile @@ -0,0 +1,6 @@ +FROM docker:latest + +RUN set -eux; +RUN apk add --no-cache python3 py3-pip openssl-dev bash git; +RUN python3 -m pip install -U pip; +RUN pip3 install pybuilder ddadevops deprecation dda-python-terraform boto3 pyyaml inflection; diff --git a/infrastructure/python/build.py b/infrastructure/python/build.py new file mode 100644 index 0000000..ba87e9d --- /dev/null +++ b/infrastructure/python/build.py @@ -0,0 +1,50 @@ +from os import environ +from pybuilder.core import task, init +from ddadevops import * + +name = "ddadevops" +MODULE = "python" +PROJECT_ROOT_PATH = "../.." + + +@init +def initialize(project): + + input = { + "name": name, + "module": MODULE, + "stage": "notused", + "project_root_path": PROJECT_ROOT_PATH, + "build_types": ["IMAGE"], + "mixin_types": [], + } + + project.build_depends_on("ddadevops>=4.0.0") + + build = DevopsImageBuild(project, input) + build.initialize_build_dir() + + +@task +def image(project): + build = get_devops_build(project) + build.image() + + +@task +def drun(project): + build = get_devops_build(project) + build.drun() + + +@task +def test(project): + build = get_devops_build(project) + build.test() + + +@task +def publish(project): + build = get_devops_build(project) + build.dockerhub_login() + build.dockerhub_publish() diff --git a/infrastructure/python/image/Dockerfile b/infrastructure/python/image/Dockerfile new file mode 100644 index 0000000..3d49141 --- /dev/null +++ b/infrastructure/python/image/Dockerfile @@ -0,0 +1,7 @@ +FROM python:3.10-alpine + +RUN set -eux; +RUN apk add --no-cache build-base rust python3 python3-dev py3-pip py3-setuptools py3-wheel libffi-dev openssl-dev cargo bash git; +RUN python3 -m pip install -U pip; +RUN pip3 install pybuilder ddadevops deprecation dda-python-terraform boto3 pyyaml inflection; +RUN pip3 install coverage flake8 flake8-polyfill mypy mypy-extensions pycodestyle pyflakes pylint pytest pytest-cov pytest-datafiles types-setuptools types-PyYAML;