Skip to content
Open
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
4 changes: 3 additions & 1 deletion playground/backend/containers/python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,16 @@ RUN cd /opt/playground/backend/kafka-emulator/ && tar -xvf kafka-emulator.tar &&
mv kafka-emulator/*.jar . && rmdir kafka-emulator/ &&\
mv beam-playground-kafka-emulator-*.jar beam-playground-kafka-emulator.jar
RUN apt-get update && \
apt install openjdk-17-jre-headless -y
apt install openjdk-17-jre-headless -y

# Create a user group `appgroup` and a user `appuser`
RUN groupadd --gid 20000 appgroup \
&& useradd --uid 20000 --gid appgroup --shell /bin/bash --create-home appuser

RUN mkdir -p /opt/playground/backend/executable_files/

RUN pip install apache-beam[gcp,interactive]==$BEAM_VERSION

# Chown all required files to the `appuser`.
RUN chown -R appuser:appgroup /opt/playground/backend/executable_files/ && chmod +x /entrypoint.sh

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ LogOutput "Input variables:
BEAM_USE_WEBGRPC=$BEAM_USE_WEBGRPC
DATASTORE_NAMESPACE=$DATASTORE_NAMESPACE
FORCE_CD=$FORCE_CD"


# Script starts in a clean environment in Cloud Build. Set minimal required environment variables
if [ -z "$PATH" ]; then
Expand Down Expand Up @@ -110,6 +110,7 @@ apt install -y python3.10-venv > /dev/null 2>&1
LogOutput "Installing Python packages from beam/playground/infrastructure/requirements.txt"
cd $BEAM_ROOT_DIR
pip install -r playground/infrastructure/requirements.txt
pip install setuptools

LogOutput "Looking for files changed by the merge commit $MERGE_COMMIT"
git fetch origin $MERGE_COMMIT
Expand All @@ -130,7 +131,7 @@ do
LogOutput "FORCE_CD is true. Example deployment for SDK_${sdk^^} is forced"
example_has_changed="true"
else
LogOutput "------------------Starting checker.py for SDK_${sdk^^}------------------"
LogOutput "------------------Starting checker.py for SDK_${sdk^^}------------------"
cd $BEAM_ROOT_DIR/playground/infrastructure
python3 checker.py \
--verbose \
Expand Down Expand Up @@ -159,7 +160,7 @@ do
eval "check_${sdk}_passed"="true"
continue
fi

cd $BEAM_ROOT_DIR/playground/infrastructure
LogOutput "Running ci_cd.py for SDK $sdk"

Expand Down Expand Up @@ -187,4 +188,4 @@ do
exit 1
fi
done
exit 0
exit 0
Loading