Skip to content

Commit 18a7ecf

Browse files
authored
refactor: remove dead code of debug container (#347)
closes #346
2 parents 7fa903a + a589896 commit 18a7ecf

7 files changed

Lines changed: 1 addition & 191 deletions

File tree

copier.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,6 @@ docker:
104104
Would you like to publish your project in a Docker container?
105105
You should select this if you are making a service.
106106
107-
docker_debug:
108-
type: bool
109-
when: "{{ docker }}"
110-
help: |
111-
Would you like to publish a debug image of your service?
112-
This will increase the number of published images, but may
113-
be useful if debugging the service inside of the cluster
114-
infrastructure is required.
115-
116107
docs_type:
117108
type: str
118109
help: |

docs/how-to/debug-in-cluster.md

Lines changed: 0 additions & 99 deletions
This file was deleted.
-53.8 KB
Binary file not shown.

example-answers.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ component_lifecycle: experimental
66
description: An expanded https://github.com/DiamondLightSource/python-copier-template to illustrate how it looks with all the options enabled.
77
distribution_name: dls-python-copier-template-example
88
docker: true
9-
docker_debug: true
109
docs_type: sphinx
1110
git_platform: github.com
1211
github_org: DiamondLightSource

template/Dockerfile.jinja

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,6 @@ ENV UV_PYTHON_INSTALL_DIR=/python
2323
RUN --mount=type=cache,target=/root/.cache/uv \
2424
uv sync --locked --no-editable --no-dev --managed-python
2525

26-
{% if docker_debug %}
27-
FROM build AS debug
28-
29-
{% if git_platform=="github.com" %}
30-
# Set origin to use ssh
31-
RUN git remote set-url origin git@github.com:{{github_org}}/{{repo_name}}.git
32-
{% endif %}
33-
34-
# For this pod to understand finding user information from LDAP
35-
RUN apt update
36-
RUN DEBIAN_FRONTEND=noninteractive apt install libnss-ldapd -y
37-
RUN sed -i 's/files/ldap files/g' /etc/nsswitch.conf
38-
39-
# Make editable and debuggable
40-
RUN uv pip install debugpy
41-
RUN uv pip install -e .
42-
ENV PATH=/app/.venv/bin:$PATH
43-
44-
# Alternate entrypoint to allow devcontainer to attach
45-
ENTRYPOINT [ "/bin/bash", "-c", "--" ]
46-
CMD [ "while true; do sleep 30; done;" ]
47-
48-
{% endif %}
4926
# The runtime stage copies the built venv into a runtime container
5027
FROM ubuntu:resolute AS runtime
5128

template/{% if git_platform=="github.com" %}.github{% endif %}/workflows/ci.yml.jinja

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,7 @@ jobs:
3535
permissions:
3636
contents: read
3737
packages: write
38-
{% endraw %}{% if docker_debug %}{% raw %}
39-
debug_container:
40-
needs: [container, test]
41-
uses: ./.github/workflows/_debug_container.yml
42-
with:
43-
publish: ${{ needs.test.result == 'success' }}
44-
permissions:
45-
contents: read
46-
packages: write
47-
{% endraw %}{% endif %}{% endif %}{% if sphinx %}
38+
{% endraw %}{% endif %}{% if sphinx %}
4839
docs:
4940
uses: ./.github/workflows/_docs.yml
5041
permissions:

template/{% if git_platform=="github.com" %}.github{% endif %}/workflows/{% if docker_debug %}_debug_container.yml{% endif %}

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)