Skip to content

Fix Dockerfile Error for UDF Tests #495

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

Merged
merged 8 commits into from
Jun 2, 2025
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
23 changes: 18 additions & 5 deletions udfs/tests/Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
FROM gcr.io/google.com/cloudsdktool/cloud-sdk:latest
FROM gcr.io/google.com/cloudsdktool/google-cloud-cli:slim
WORKDIR /ci
COPY requirements.txt ./
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN pip3 install --no-cache-dir -r requirements.txt \
&& curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
&& apt-get install --no-install-recommends -y nodejs \
&& npm i -g @dataform/[email protected]

RUN apt-get update \
&& apt-get install --no-install-recommends -y python3-venv curl wget unzip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN python3 -m venv venv

RUN . venv/bin/activate \
&& pip install --no-cache-dir -r requirements.txt \
&& curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
&& apt-get update && apt-get install --no-install-recommends -y nodejs \
&& npm i -g @dataform/[email protected] \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

ENV PATH="/ci/venv/bin:$PATH"
1 change: 1 addition & 0 deletions udfs/tests/cloudbuild_udf_test_image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ steps:
entrypoint: hadolint
args:
- Dockerfile.ci
- --ignore=SC1091
############################################################
# Create ci image with all python dependencies installed
############################################################
Expand Down