Skip to content

Commit

Permalink
[#1295] improvement(CI): separate trino image for CI and users (#1344)
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?

Remove the Gravitino connector from the Trino CI image.

### Why are the changes needed?

In CI, we will mount the Gravitino connector to the Trino CI image to
test the latest code base, so we can fully test our PR.

Fix: #1295

### Does this PR introduce _any_ user-facing change?

N/A

### How was this patch tested?

N/A

Co-authored-by: Qi Yu <[email protected]>
  • Loading branch information
jerryshao and yuqi1129 authored Jan 5, 2024
1 parent c38440f commit c0509a0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
2 changes: 2 additions & 0 deletions dev/docker/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ else
exit 1
fi

build_args="${build_args} --build-arg IMAGE_NAME=${image_name}"

# Create multi-arch builder
BUILDER_NAME="gravitino-builder"
builders=$(docker buildx ls)
Expand Down
13 changes: 11 additions & 2 deletions dev/docker/trino/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,20 @@ RUN rm -rf /usr/lib/trino/plugin/accumulo \
&& rm -rf /usr/lib/trino/plugin/redis \
&& rm -rf /usr/lib/trino/plugin/session-property-managers \
&& rm -rf /usr/lib/trino/plugin/teradata-functions

COPY --chown=trino:trino packages/trino/conf /etc/trino
COPY --chown=trino:trino packages/gravitino-trino-connector/mysql-connector-java-8.0.27.jar /usr/lib/trino/plugin/iceberg/
COPY --chown=trino:trino packages/gravitino-trino-connector/postgresql-42.7.0.jar /usr/lib/trino/plugin/iceberg/
COPY --chown=trino:trino packages/gravitino-trino-connector /usr/lib/trino/plugin/gravitino

RUN mkdir /tmp/gravitino
COPY --chown=trino:trino packages/gravitino-trino-connector /tmp/gravitino

ARG IMAGE_NAME
RUN if [ "$IMAGE_NAME" = "datastrato/trino" ] ; then \
mv /tmp/gravitino /usr/lib/trino/plugin/; \
else echo "Copying files for other images"; \
fi



# Use ARGs to update trino conf and start Trino server
ARG GRAVITINO_HOST_IP
Expand Down
3 changes: 3 additions & 0 deletions docs/docker-image-details.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ You can use this image to test Trino.

Changelog

- gravitino-ci-trino:0.1.3
- Remove copy content in folder `gravitino-trino-connector` to plugin folder `/usr/lib/trino/plugin/gravitino`

- gravitino-ci-trino:0.1.2
- Copy JDBC driver 'mysql-connector-java' and 'postgres' to `/usr/lib/trino/iceberg/` folder

Expand Down

0 comments on commit c0509a0

Please sign in to comment.