Skip to content

Commit

Permalink
chore(docker): cleanup python code
Browse files Browse the repository at this point in the history
Signed-off-by: AtomicFS <[email protected]>
  • Loading branch information
AtomicFS committed Sep 23, 2024
1 parent cf96568 commit 187ddf2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
7 changes: 4 additions & 3 deletions .dagger-ci/daggerci/lib/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,7 @@ async def build_test_publish(
dockerfile,
)
else:
await self.__build_test_publish__(
client, top_element=top_element, dockerfile=dockerfile
)
await self.__build_test_publish__(client, top_element, dockerfile)

return self.results

Expand Down Expand Up @@ -250,9 +248,11 @@ async def __build_test_publish__(
dockerfile_args=dockerfile_args,
)
except dagger.ExecError as exc:
logging.error("Dagger execution error")
self.results.add(top_element, dockerfile, "build", False, exc.message)
return
except dagger.QueryError as exc:
logging.error("Dagger query error, try this: https://archive.docs.dagger.io/0.9/235290/troubleshooting/#dagger-pipeline-is-unable-to-resolve-host-names-after-network-configuration-changes")
self.results.add(
top_element, dockerfile, "build", False, exc.debug_query()
) # type: ignore [no-untyped-call]
Expand All @@ -277,6 +277,7 @@ async def __build_test_publish__(

# export as tarball
if not await built_docker.export(tarball_file):
logging.error("Failed to export docker container as tarball")
self.results.add(
top_element,
dockerfile,
Expand Down
12 changes: 3 additions & 9 deletions .dagger-ci/daggerci/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,14 +93,8 @@ def fixture_dockerfile():
return textwrap.dedent(
"""\
FROM ubuntu:22.04 AS base
ARG TARGETARCH=amd64
ARG COREBOOT_VERSION=4.19
RUN apt-get update && \\
apt-get install -y --no-install-recommends \\
bc nano git \\
&& \\
rm -rf /var/lib/apt/lists/*\
"""
ARG TARGETARCH=amd64\
"""
)


Expand Down Expand Up @@ -147,7 +141,7 @@ def dockerfile_broken():
"""\
FROM ubuntu:22.04 AS base
RUN false\
"""
"""
)


Expand Down

0 comments on commit 187ddf2

Please sign in to comment.