Skip to content

Commit

Permalink
ci: consolidate 'UV_VERSION' used into single place across Dockerfiles
Browse files Browse the repository at this point in the history
This approach does set the arg for all images even though many of them
don't need it. But it's a no-op in this case, so this isn't really an
issue.
  • Loading branch information
ahal committed Oct 8, 2024
1 parent 18e3886 commit c59463a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions taskcluster/docker/decision/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
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
# %ARG UV_VERSION
COPY --from=ghcr.io/astral-sh/uv:$UV_VERSION /uv /bin/uv

ENV UV_PROJECT_ENVIRONMENT=/setup/taskgraph

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
# %ARG PYTHON_VERSIONS
RUN uv python install $PYTHON_VERSIONS

Expand Down
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

0 comments on commit c59463a

Please sign in to comment.