Skip to content

Commit

Permalink
refactor(tooling): re-ordered package install and download steps for …
Browse files Browse the repository at this point in the history
…improved caching
  • Loading branch information
neil-iohk committed Oct 16, 2024
1 parent 6a235be commit 58e8a6b
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions earthly/postgresql/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@ postgres-base:
ripgrep \
wget \
pipx \
&& rm -rf /var/lib/apt/lists/* \
&& wget -O /bin/schemaspy.jar https://github.com/schemaspy/schemaspy/releases/download/v${SCHEMASPY_VERSION}/schemaspy-${SCHEMASPY_VERSION}.jar \
&& wget -O /bin/postgresql.jar https://jdbc.postgresql.org/download/postgresql-${POSTGRESQL_JDBC_VERSION}.jar

&& rm -rf /var/lib/apt/lists/*

# Use the cached java installation from the java Earthfile
DO java+COPY_DEPS

# Install SQLFluff - Check
ENV PATH="/root/.local/bin:${PATH}"
RUN pipx install sqlfluff==3.1.1 && sqlfluff version

# Install SchemaSpy and required Postgresql JDBC driver
RUN wget -O /bin/postgresql.jar https://jdbc.postgresql.org/download/postgresql-${POSTGRESQL_JDBC_VERSION}.jar
RUN wget -O /bin/schemaspy.jar https://github.com/schemaspy/schemaspy/releases/download/v${SCHEMASPY_VERSION}/schemaspy-${SCHEMASPY_VERSION}.jar

# Get refinery
COPY rust-tools+tool-refinery/refinery /bin

Expand All @@ -60,9 +65,6 @@ postgres-base:
# Copy templates to the working directory
COPY --dir templates /templates

# Use the cached java installation from the java Earthfile
DO java+COPY_DEPS

SAVE ARTIFACT /scripts /scripts
SAVE ARTIFACT /templates /templates

Expand Down

0 comments on commit 58e8a6b

Please sign in to comment.