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

Consolidate uv version + add it to run-task image #581

Merged
merged 2 commits into from
Oct 8, 2024
Merged
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
3 changes: 0 additions & 3 deletions taskcluster/docker/decision/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
FROM $DOCKER_IMAGE_PARENT
LABEL maintainer="Release Engineering <[email protected]>"

# Keep uv version in sync with python image
COPY --from=ghcr.io/astral-sh/uv:0.4.9 /uv /bin/uv

ENV UV_PROJECT_ENVIRONMENT=/setup/taskgraph

# %include src
Expand Down
4 changes: 2 additions & 2 deletions taskcluster/docker/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ ENV SHELL=/bin/bash \
HOME=/builds/worker \
PATH=/builds/worker/.local/bin:$PATH

# Keep uv version in sync with decision image
COPY --from=ghcr.io/astral-sh/uv:0.4.9 /uv /bin/uv
# %ARG UV_VERSION
COPY --from=ghcr.io/astral-sh/uv:$UV_VERSION /uv /bin/uv
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL you can copy from images outside of your own build. Neat.

# %ARG PYTHON_VERSIONS
RUN uv python install $PYTHON_VERSIONS

Expand Down
3 changes: 3 additions & 0 deletions taskcluster/docker/run-task/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ ENV PATH=/builds/worker/bin:$PATH \
SHELL=/bin/bash \
HOME=/builds/worker

# %ARG UV_VERSION
COPY --from=ghcr.io/astral-sh/uv:$UV_VERSION /uv /bin/uv

# Set a default command useful for debugging
CMD ["/bin/bash", "--login"]
4 changes: 4 additions & 0 deletions taskcluster/kinds/docker-image/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ transforms:
- taskgraph.transforms.cached_tasks:transforms
- taskgraph.transforms.task:transforms

task-defaults:
args:
UV_VERSION: 0.4.9

# make a task for each docker-image we might want. For the moment, since we
# write artifacts for each, these are whitelisted, but ideally that will change
# (to use subdirectory clones of the proper directory), at which point we can
Expand Down
Loading