Skip to content

Commit bc131b7

Browse files
authored
⚗️ CI: improve workflow (#7612)
1 parent 85a0feb commit bc131b7

File tree

21 files changed

+206
-193
lines changed

21 files changed

+206
-193
lines changed

.github/workflows/ci-testing-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ jobs:
573573
- name: install uv
574574
uses: astral-sh/setup-uv@v6
575575
with:
576-
version: "0.5.x"
576+
version: "0.6.x"
577577
enable-cache: false
578578
cache-dependency-glob: "**/notifications/requirements/ci.txt"
579579
- name: show system version

packages/service-integration/Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
ARG PYTHON_VERSION="3.11.9"
55
ARG UV_VERSION="0.6"
66
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
7-
# we docker image is built based on debian
8-
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
7+
8+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-arm64
9+
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
10+
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
11+
ENV UV_CONCURRENT_INSTALLS=1
12+
13+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-amd64
14+
15+
FROM base-${TARGETARCH} AS base
916

1017
LABEL maintainer=pcrespov
1118

@@ -66,13 +73,7 @@ COPY --from=uv_build /uv /uvx /bin/
6673
# packages may be moved to production image easily by copying the venv
6774
RUN uv venv "${VIRTUAL_ENV}"
6875

69-
# Set UV_CONCURRENT_INSTALLS=1 for ARM64 to improve build performance
70-
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
71-
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
72-
RUN if [ "$TARGETARCH" = "arm64" ]; then \
73-
echo "Setting UV_CONCURRENT_INSTALLS=1 for ARM64 architecture"; \
74-
export UV_CONCURRENT_INSTALLS=1; \
75-
fi
76+
7677

7778
RUN --mount=type=cache,target=/root/.cache/uv \
7879
uv pip install --upgrade \

services/agent/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,15 @@ ARG PYTHON_VERSION="3.11.9"
55
ARG UV_VERSION="0.6"
66

77
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
8-
# we docker image is built based on debian
9-
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
8+
9+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-arm64
10+
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
11+
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
12+
ENV UV_CONCURRENT_INSTALLS=1
13+
14+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-amd64
15+
16+
FROM base-${TARGETARCH} AS base
1017

1118

1219
#
@@ -87,13 +94,7 @@ COPY --from=uv_build /uv /uvx /bin/
8794
# packages may be moved to production image easily by copying the venv
8895
RUN uv venv "${VIRTUAL_ENV}"
8996

90-
# Set UV_CONCURRENT_INSTALLS=1 for ARM64 to improve build performance
91-
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
92-
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
93-
RUN if [ "$TARGETARCH" = "arm64" ]; then \
94-
echo "Setting UV_CONCURRENT_INSTALLS=1 for ARM64 architecture"; \
95-
export UV_CONCURRENT_INSTALLS=1; \
96-
fi
97+
9798

9899
RUN --mount=type=cache,target=/root/.cache/uv \
99100
uv pip install --upgrade \
@@ -114,7 +115,7 @@ WORKDIR /build
114115
#
115116
FROM build AS prod-only-deps
116117

117-
ENV SC_BUILD_TARGET prod-only-deps
118+
ENV SC_BUILD_TARGET=prod-only-deps
118119

119120
WORKDIR /build/services/agent
120121

services/api-server/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
ARG PYTHON_VERSION="3.11.9"
55
ARG UV_VERSION="0.6"
66
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
7-
# we docker image is built based on debian
8-
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
7+
8+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-arm64
9+
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
10+
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
11+
ENV UV_CONCURRENT_INSTALLS=1
12+
13+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-amd64
14+
15+
FROM base-${TARGETARCH} AS base
916
#
1017
# USAGE:
1118
# cd sercices/api-server
@@ -80,13 +87,7 @@ COPY --from=uv_build /uv /uvx /bin/
8087
# packages may be moved to production image easily by copying the venv
8188
RUN uv venv "${VIRTUAL_ENV}"
8289

83-
# Set UV_CONCURRENT_INSTALLS=1 for ARM64 to improve build performance
84-
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
85-
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
86-
RUN if [ "$TARGETARCH" = "arm64" ]; then \
87-
echo "Setting UV_CONCURRENT_INSTALLS=1 for ARM64 architecture"; \
88-
export UV_CONCURRENT_INSTALLS=1; \
89-
fi
90+
9091

9192
RUN --mount=type=cache,target=/root/.cache/uv \
9293
uv pip install --upgrade \
@@ -107,7 +108,7 @@ WORKDIR /build
107108
#
108109
FROM build AS prod-only-deps
109110

110-
ENV SC_BUILD_TARGET prod-only-deps
111+
ENV SC_BUILD_TARGET=prod-only-deps
111112

112113
WORKDIR /build/services/api-server
113114

services/autoscaling/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
ARG PYTHON_VERSION="3.11.9"
55
ARG UV_VERSION="0.6"
66
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
7-
# we docker image is built based on debian
8-
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
7+
8+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-arm64
9+
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
10+
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
11+
ENV UV_CONCURRENT_INSTALLS=1
12+
13+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-amd64
14+
15+
FROM base-${TARGETARCH} AS base
916

1017
#
1118
# USAGE:
@@ -100,13 +107,7 @@ COPY --from=uv_build /uv /uvx /bin/
100107
# packages may be moved to production image easily by copying the venv
101108
RUN uv venv "${VIRTUAL_ENV}"
102109

103-
# Set UV_CONCURRENT_INSTALLS=1 for ARM64 to improve build performance
104-
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
105-
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
106-
RUN if [ "$TARGETARCH" = "arm64" ]; then \
107-
echo "Setting UV_CONCURRENT_INSTALLS=1 for ARM64 architecture"; \
108-
export UV_CONCURRENT_INSTALLS=1; \
109-
fi
110+
110111

111112
RUN --mount=type=cache,target=/root/.cache/uv \
112113
uv pip install --upgrade \
@@ -123,7 +124,7 @@ WORKDIR /build
123124
#
124125
FROM build AS prod-only-deps
125126

126-
ENV SC_BUILD_TARGET prod-only-deps
127+
ENV SC_BUILD_TARGET=prod-only-deps
127128

128129
WORKDIR /build/services/autoscaling
129130

services/catalog/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
ARG PYTHON_VERSION="3.11.9"
55
ARG UV_VERSION="0.6"
66
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
7-
# we docker image is built based on debian
8-
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
7+
8+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-arm64
9+
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
10+
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
11+
ENV UV_CONCURRENT_INSTALLS=1
12+
13+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-amd64
14+
15+
FROM base-${TARGETARCH} AS base
916
#
1017
#
1118
# USAGE:
@@ -81,13 +88,7 @@ COPY --from=uv_build /uv /uvx /bin/
8188
# packages may be moved to production image easily by copying the venv
8289
RUN uv venv "${VIRTUAL_ENV}"
8390

84-
# Set UV_CONCURRENT_INSTALLS=1 for ARM64 to improve build performance
85-
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
86-
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
87-
RUN if [ "$TARGETARCH" = "arm64" ]; then \
88-
echo "Setting UV_CONCURRENT_INSTALLS=1 for ARM64 architecture"; \
89-
export UV_CONCURRENT_INSTALLS=1; \
90-
fi
91+
9192

9293
RUN --mount=type=cache,target=/root/.cache/uv \
9394
uv pip install --upgrade \
@@ -108,7 +109,7 @@ WORKDIR /build
108109
#
109110
FROM build AS prod-only-deps
110111

111-
ENV SC_BUILD_TARGET prod-only-deps
112+
ENV SC_BUILD_TARGET=prod-only-deps
112113

113114
WORKDIR /build/services/catalog
114115

services/clusters-keeper/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
ARG PYTHON_VERSION="3.11.9"
55
ARG UV_VERSION="0.6"
66
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
7-
# we docker image is built based on debian
8-
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
7+
8+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-arm64
9+
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
10+
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
11+
ENV UV_CONCURRENT_INSTALLS=1
12+
13+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-amd64
14+
15+
FROM base-${TARGETARCH} AS base
916

1017
#
1118
# USAGE:
@@ -99,13 +106,7 @@ COPY --from=uv_build /uv /uvx /bin/
99106
# packages may be moved to production image easily by copying the venv
100107
RUN uv venv "${VIRTUAL_ENV}"
101108

102-
# Set UV_CONCURRENT_INSTALLS=1 for ARM64 to improve build performance
103-
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
104-
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
105-
RUN if [ "$TARGETARCH" = "arm64" ]; then \
106-
echo "Setting UV_CONCURRENT_INSTALLS=1 for ARM64 architecture"; \
107-
export UV_CONCURRENT_INSTALLS=1; \
108-
fi
109+
109110

110111
RUN --mount=type=cache,target=/root/.cache/uv \
111112
uv pip install --upgrade \
@@ -126,7 +127,7 @@ WORKDIR /build
126127
#
127128
FROM build AS prod-only-deps
128129

129-
ENV SC_BUILD_TARGET prod-only-deps
130+
ENV SC_BUILD_TARGET=prod-only-deps
130131

131132
WORKDIR /build/services/clusters-keeper
132133

services/dask-sidecar/Dockerfile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,7 @@ COPY --from=uv_build /uv /uvx /bin/
9090
# NOTE: python virtualenv is used here such that installed packages may be moved to production image easily by copying the venv
9191
RUN uv venv "${VIRTUAL_ENV}"
9292

93-
# Set UV_CONCURRENT_INSTALLS=1 for ARM64 to improve build performance
94-
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
95-
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
96-
RUN if [ "$TARGETARCH" = "arm64" ]; then \
97-
echo "Setting UV_CONCURRENT_INSTALLS=1 for ARM64 architecture"; \
98-
export UV_CONCURRENT_INSTALLS=1; \
99-
fi
93+
10094

10195
RUN --mount=type=cache,target=/root/.cache/uv \
10296
uv pip install --upgrade \

services/datcore-adapter/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
ARG PYTHON_VERSION="3.11.9"
55
ARG UV_VERSION="0.6"
66
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
7-
# we docker image is built based on debian
8-
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
7+
8+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-arm64
9+
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
10+
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
11+
ENV UV_CONCURRENT_INSTALLS=1
12+
13+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-amd64
14+
15+
FROM base-${TARGETARCH} AS base
916

1017
#
1118
# USAGE:
@@ -81,13 +88,7 @@ COPY --from=uv_build /uv /uvx /bin/
8188
# packages may be moved to production image easily by copying the venv
8289
RUN uv venv "${VIRTUAL_ENV}"
8390

84-
# Set UV_CONCURRENT_INSTALLS=1 for ARM64 to improve build performance
85-
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
86-
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
87-
RUN if [ "$TARGETARCH" = "arm64" ]; then \
88-
echo "Setting UV_CONCURRENT_INSTALLS=1 for ARM64 architecture"; \
89-
export UV_CONCURRENT_INSTALLS=1; \
90-
fi
91+
9192

9293
RUN --mount=type=cache,target=/root/.cache/uv \
9394
uv pip install --upgrade \
@@ -108,7 +109,7 @@ WORKDIR /build
108109
#
109110
FROM build AS prod-only-deps
110111

111-
ENV SC_BUILD_TARGET prod-only-deps
112+
ENV SC_BUILD_TARGET=prod-only-deps
112113

113114
WORKDIR /build/services/datcore-adapter
114115

services/director-v2/Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,15 @@
44
ARG PYTHON_VERSION="3.11.9"
55
ARG UV_VERSION="0.6"
66
FROM ghcr.io/astral-sh/uv:${UV_VERSION} AS uv_build
7-
# we docker image is built based on debian
8-
FROM python:${PYTHON_VERSION}-slim-bookworm AS base
7+
8+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-arm64
9+
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
10+
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
11+
ENV UV_CONCURRENT_INSTALLS=1
12+
13+
FROM python:${PYTHON_VERSION}-slim-bookworm AS base-amd64
14+
15+
FROM base-${TARGETARCH} AS base
916

1017
#
1118
# USAGE:
@@ -81,13 +88,7 @@ COPY --from=uv_build /uv /uvx /bin/
8188
# packages may be moved to production image easily by copying the venv
8289
RUN uv venv "${VIRTUAL_ENV}"
8390

84-
# Set UV_CONCURRENT_INSTALLS=1 for ARM64 to improve build performance
85-
# These environment variables are necessary because of https://github.com/astral-sh/uv/issues/6105
86-
# and until https://gitlab.com/qemu-project/qemu/-/issues/2846 gets fixed
87-
RUN if [ "$TARGETARCH" = "arm64" ]; then \
88-
echo "Setting UV_CONCURRENT_INSTALLS=1 for ARM64 architecture"; \
89-
export UV_CONCURRENT_INSTALLS=1; \
90-
fi
91+
9192

9293
RUN --mount=type=cache,target=/root/.cache/uv \
9394
uv pip install --upgrade \
@@ -108,7 +109,7 @@ WORKDIR /build
108109
#
109110
FROM build AS prod-only-deps
110111

111-
ENV SC_BUILD_TARGET prod-only-deps
112+
ENV SC_BUILD_TARGET=prod-only-deps
112113

113114
WORKDIR /build/services/director-v2
114115

0 commit comments

Comments
 (0)