Skip to content

Commit d81eadd

Browse files
Fix inconsistent image build issue (#1010)
* fix inconsistent image build issue * Add clean and no-build-cache for image build commands
1 parent 01a8799 commit d81eadd

File tree

13 files changed

+25
-19
lines changed

13 files changed

+25
-19
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ select * from db1.table1;
7676

7777
#### Running in Docker
7878

79-
- `./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true` - To
79+
- `./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true --no-build-cache` - To
8080
build the image locally.
8181
- `docker run -p 8181:8181 -p 8182:8182 apache/polaris:latest` - To run the image.
8282

getting-started/eclipselink/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,11 @@ This example requires `jq` to be installed on your machine.
2525
the Postgres JDBC driver:
2626

2727
```shell
28-
./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
28+
./gradlew clean :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
2929
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4 \
3030
-Dquarkus.container-image.tag=postgres-latest \
31-
-Dquarkus.container-image.build=true
31+
-Dquarkus.container-image.build=true \
32+
--no-build-cache
3233
```
3334

3435
2. Start the docker compose group by running the following command from the root of the repository:

getting-started/spark/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ A Jupyter notebook is used to run PySpark.
2727
If a Polaris image is not already present locally, build one with the following command:
2828

2929
```shell
30-
./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true
30+
./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true --no-build-cache
3131
```
3232

3333
## Run the `docker-compose` file

getting-started/telemetry/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This example requires `jq` to be installed on your machine.
2424
1. Build the Polaris image if it's not already present locally:
2525

2626
```shell
27-
./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true
27+
./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true --no-build-cache
2828
```
2929

3030
2. Start the docker compose group by running the following command from the root of the repository:

getting-started/trino/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This getting started guide provides a `docker-compose` file to set up [Trino](ht
2424
## Build Polaris Image
2525
Build Polaris Image while Docker is running
2626
```
27-
./gradlew :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true
27+
./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true --no-build-cache
2828
```
2929

3030
## Run the `docker-compose` file

helm/polaris/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,10 @@ If necessary, build and load the Docker images with support for Postgres into Mi
8686
```bash
8787
eval $(minikube -p minikube docker-env)
8888

89-
./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
89+
./gradlew clean :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
9090
-Dquarkus.container-image.build=true \
91-
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
91+
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4 \
92+
--no-build-cache
9293
```
9394

9495
### Installing the chart locally

helm/polaris/README.md.gotmpl

+3-2
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ If necessary, build and load the Docker images with support for Postgres into Mi
8787
```bash
8888
eval $(minikube -p minikube docker-env)
8989

90-
./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
90+
./gradlew clean :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
9191
-Dquarkus.container-image.build=true \
92-
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
92+
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4 \
93+
--no-build-cache
9394
```
9495

9596
### Installing the chart locally

quarkus/admin/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ java -jar polaris-quarkus-admin-<version>-runner.jar
2828
To also build the Docker image, you can use the following command:
2929

3030
```shell
31-
./gradlew :polaris-quarkus-admin:assemble -Dquarkus.container-image.build=true
31+
./gradlew clean :polaris-quarkus-admin:assemble -Dquarkus.container-image.build=true --no-build-cache
3232
```
3333

3434
## Running the Admin Tool

quarkus/server/README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,16 @@ To also build the Docker image, you can use the following command (a running Doc
2727
required):
2828

2929
```shell
30-
./gradlew :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true
30+
./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true --no-build-cache
3131
```
3232

3333
If you need to customize the Docker image, for example to push to a local registry, you can use the
3434
following command:
3535

3636
```shell
37-
./gradlew :polaris-quarkus-server:build -Dquarkus.container-image.build=true \
37+
./gradlew clean :polaris-quarkus-server:build -Dquarkus.container-image.build=true \
3838
-Dquarkus.container-image.registry=localhost:5001 \
3939
-Dquarkus.container-image.group=apache \
40-
-Dquarkus.container-image.name=polaris-local
40+
-Dquarkus.container-image.name=polaris-local \
41+
--no-build-cache
4142
```

regtests/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Tests can be run with docker-compose using the provided `./regtests/docker-compo
3939
follows:
4040

4141
```shell
42-
./gradlew :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true
42+
./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true --no-build-cache
4343
docker compose -f ./regtests/docker-compose.yml up --build --exit-code-from regtest
4444
```
4545

run.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ sh ./kind-registry.sh
5252

5353
# Build and deploy the server image
5454
echo "Building polaris image..."
55-
./gradlew :polaris-quarkus-server:build $ECLIPSE_LINK_DEPS \
55+
./gradlew clean :polaris-quarkus-server:build $ECLIPSE_LINK_DEPS \
5656
-Dquarkus.container-image.build=true \
57-
-Dquarkus.container-image.registry=localhost:5001
57+
-Dquarkus.container-image.registry=localhost:5001 \
58+
--no-build-cache
5859

5960
echo "Pushing polaris image..."
6061
docker push localhost:5001/apache/polaris

site/content/in-dev/unreleased/admin-tool.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ example, to build the tool with support for Postgres, run the following:
3030
```shell
3131
./gradlew clean :polaris-quarkus-admin:build \
3232
-Dquarkus.container-image.build=true \
33-
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
33+
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4 \
34+
--no-build-cache
3435
```
3536

3637
The above command will generate:

site/content/in-dev/unreleased/quickstart.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ To start using Polaris in Docker, launch Polaris while Docker is running:
105105

106106
```shell
107107
cd ~/polaris
108-
./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true
108+
./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true --no-build-cache
109109
docker run -p 8181:8181 -p 8182:8182 apache/polaris:latest
110110
```
111111

0 commit comments

Comments
 (0)