Skip to content

Commit

Permalink
debug collect in docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
wartraxx51 committed Mar 4, 2025
1 parent eb60128 commit 89fde0b
Show file tree
Hide file tree
Showing 7 changed files with 513 additions and 203 deletions.
13 changes: 12 additions & 1 deletion development/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@ RUN mkdir /prom_shared /remote

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install --no-install-recommends -y tini curl git pkg-config build-essential ca-certificates && \
apt-get install --no-install-recommends -y tini curl git pkg-config build-essential ca-certificates gnupg2 && \
install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
chmod a+r /etc/apt/keyrings/docker.gpg && \
# Ajouter le dépôt Docker
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt-get update && \
# Installer Docker et Docker Compose
apt-get install --no-install-recommends -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin && \

curl -sSL https://install.python-poetry.org | POETRY_VERSION=1.8.5 python3 - && \
apt-get autoremove -y && \
apt-get clean all && \
Expand Down
3 changes: 2 additions & 1 deletion tasks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from invoke import Collection, Context, task

from . import backend, demo, dev, docs, main, performance, release, schema, sdk
from . import backend, bundle, demo, dev, docs, main, performance, release, schema, sdk
from .utils import ESCAPED_REPO_PATH

ns = Collection()
Expand All @@ -11,6 +11,7 @@
ns.add_collection(docs)
ns.add_collection(performance)
ns.add_collection(backend)
ns.add_collection(bundle)
ns.add_collection(demo)
ns.add_collection(main)
ns.add_collection(schema)
Expand Down
30 changes: 30 additions & 0 deletions tasks/bundle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
from __future__ import annotations

import os
from typing import TYPE_CHECKING

from invoke.tasks import task

from .container_ops import (
collect_support_data,
)
from .shared import (
INFRAHUB_DATABASE,
Namespace,
)

if TYPE_CHECKING:
from invoke.context import Context

NAMESPACE = Namespace.DEFAULT


@task(optional=["database"])
def collect(
context: Context, database: str = INFRAHUB_DATABASE, include_queries: bool = False, project: str | None = None
) -> None:
"""Collect all logs and create a support archive."""
if project:
os.environ["INFRAHUB_BUILD_NAME"] = project
print("Discovering InfraHub projects...")
collect_support_data(context=context, database=database, namespace=NAMESPACE, include_queries=include_queries)
Loading

0 comments on commit 89fde0b

Please sign in to comment.