diff --git a/utils/build/build_python_base_images.sh b/utils/build/build_python_base_images.sh index 4b2eaeb250..f0c8e88eae 100755 --- a/utils/build/build_python_base_images.sh +++ b/utils/build/build_python_base_images.sh @@ -3,15 +3,17 @@ # build and push python base images + +docker buildx build --load --progress=plain -f utils/build/docker/python/django-py3.13.base.Dockerfile -t datadog/system-tests:django-py3.13.base-v0 . docker buildx build --load --progress=plain -f utils/build/docker/python/fastapi.base.Dockerfile -t datadog/system-tests:fastapi.base-v4 . -docker buildx build --load --progress=plain -f utils/build/docker/python/python3.12.base.Dockerfile -t datadog/system-tests:python3.13.base-v0 . +docker buildx build --load --progress=plain -f utils/build/docker/python/python3.12.base.Dockerfile -t datadog/system-tests:python3.12.base-v5 . docker buildx build --load --progress=plain -f utils/build/docker/python/django-poc.base.Dockerfile -t datadog/system-tests:django-poc.base-v4 . docker buildx build --load --progress=plain -f utils/build/docker/python/flask-poc.base.Dockerfile -t datadog/system-tests:flask-poc.base-v7 . docker buildx build --load --progress=plain -f utils/build/docker/python/uwsgi-poc.base.Dockerfile -t datadog/system-tests:uwsgi-poc.base-v4 . if [ "$1" = "--push" ]; then docker push datadog/system-tests:fastapi.base-v4 - docker push datadog/system-tests:python3.13.base-v0 + docker push datadog/system-tests:python3.12.base-v5 docker push datadog/system-tests:django-poc.base-v4 docker push datadog/system-tests:flask-poc.base-v7 docker push datadog/system-tests:uwsgi-poc.base-v4 diff --git a/utils/build/docker/python/django-py3.13.Dockerfile b/utils/build/docker/python/django-py3.13.Dockerfile new file mode 100644 index 0000000000..bae2aecb7f --- /dev/null +++ b/utils/build/docker/python/django-py3.13.Dockerfile @@ -0,0 +1,25 @@ +FROM datadog/system-tests:django-py3.13.base-v0 + +WORKDIR /app + +COPY utils/build/docker/python/install_ddtrace.sh binaries* /binaries/ +RUN /binaries/install_ddtrace.sh + +COPY utils/build/docker/python/django /app +COPY utils/build/docker/python/iast.py /app/iast.py + +RUN python manage.py makemigrations +RUN python manage.py migrate +RUN DJANGO_SUPERUSER_PASSWORD=abcd python3 manage.py createsuperuser --noinput --username root --email root@n0wh3re.net + + +ENV DD_TRACE_HEADER_TAGS='user-agent:http.request.headers.user-agent' +ENV DD_REMOTECONFIG_POLL_SECONDS=1 +ENV _DD_APPSEC_DEDUPLICATION_ENABLED=false + + +# docker startup +CMD ./app.sh + +# docker build -f utils/build/docker/python/django-py3.13.Dockerfile -t test . +# docker run -ti -p 7777:7777 test diff --git a/utils/build/docker/python/django-py3.13.base.Dockerfile b/utils/build/docker/python/django-py3.13.base.Dockerfile new file mode 100644 index 0000000000..9c9276780d --- /dev/null +++ b/utils/build/docker/python/django-py3.13.base.Dockerfile @@ -0,0 +1,20 @@ +FROM python:3.13.1-slim + +# install bin dependancies +RUN apt-get update && apt-get install -y curl git gcc g++ make cmake + +# print versions +RUN python --version && curl --version + +# install python deps +ENV PIP_ROOT_USER_ACTION=ignore +RUN pip install --upgrade pip +RUN pip install django pycryptodome gunicorn gevent requests boto3==1.34.141 'moto[ec2,s3,all]'==5.0.14 + +# Install Rust toolchain +RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y +ENV PATH="/root/.cargo/bin:$PATH" + +# docker build --progress=plain -f utils/build/docker/python/django-py3.13.base.Dockerfile -t datadog/system-tests:django-py3.13.base-v0 . +# docker push datadog/system-tests:django-py3.13.base-v0 + diff --git a/utils/build/docker/python/python3.12.Dockerfile b/utils/build/docker/python/python3.12.Dockerfile index 7cb055bdda..6d3929e0f6 100644 --- a/utils/build/docker/python/python3.12.Dockerfile +++ b/utils/build/docker/python/python3.12.Dockerfile @@ -1,4 +1,4 @@ -FROM datadog/system-tests:python3.13.base-v0 +FROM datadog/system-tests:python3.12.base-v5 WORKDIR /app diff --git a/utils/build/docker/python/python3.12.base.Dockerfile b/utils/build/docker/python/python3.12.base.Dockerfile index bcff80cd6b..3948989775 100644 --- a/utils/build/docker/python/python3.12.base.Dockerfile +++ b/utils/build/docker/python/python3.12.base.Dockerfile @@ -1,4 +1,4 @@ -FROM python:3.13.1-slim +FROM python:3.12.1-slim # install bin dependancies RUN apt-get update && apt-get install -y curl git gcc g++ make cmake @@ -15,6 +15,6 @@ RUN pip install django pycryptodome gunicorn gevent requests boto3==1.34.141 'mo RUN curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain stable -y ENV PATH="/root/.cargo/bin:$PATH" -# docker build --progress=plain -f utils/build/docker/python/python3.12.base.Dockerfile -t datadog/system-tests:python3.13.base-v0 . -# docker push datadog/system-tests:python3.13.base-v0 +# docker build --progress=plain -f utils/build/docker/python/python3.12.base.Dockerfile -t datadog/system-tests:python3.12.base-v2 . +# docker push datadog/system-tests:python3.12.base-v2 diff --git a/utils/scripts/compute-workflow-parameters.py b/utils/scripts/compute-workflow-parameters.py index eac5756689..b33573aa9b 100644 --- a/utils/scripts/compute-workflow-parameters.py +++ b/utils/scripts/compute-workflow-parameters.py @@ -83,7 +83,7 @@ def get_endtoend_weblogs(library): *[f"apache-mod-{v}-zts" for v in ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]], *[f"php-fpm-{v}" for v in ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]], ], - "python": ["flask-poc", "django-poc", "uwsgi-poc", "uds-flask", "python3.12", "fastapi"], + "python": ["flask-poc", "django-poc", "uwsgi-poc", "uds-flask", "python3.12", "fastapi", "django-py3.13"], "ruby": [ "rack", "uds-sinatra",