Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debug collect in docker image #5893

Open
wants to merge 1 commit into
base: stable
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading