Skip to content

Commit 2eff46d

Browse files
authored
Remove unnecessary clean and --no-build-cache from Gradle invocations (#1338)
`quarkusAppPartsBuild --rerun` is the right way to force a Docker image build.
1 parent 4fc96b5 commit 2eff46d

File tree

16 files changed

+87
-32
lines changed

16 files changed

+87
-32
lines changed

.github/workflows/helm.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,11 @@ jobs:
9999
if: steps.list-changed.outputs.changed == 'true'
100100
run: |
101101
eval $(minikube -p minikube docker-env)
102-
./gradlew :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
102+
./gradlew \
103+
:polaris-quarkus-server:assemble \
104+
:polaris-quarkus-server:quarkusAppPartsBuild --rerun \
105+
:polaris-quarkus-admin:assemble \
106+
:polaris-quarkus-admin:quarkusAppPartsBuild --rerun \
103107
-Dquarkus.container-image.build=true \
104108
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
105109
minikube image ls

.github/workflows/regtest.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,10 @@ jobs:
4545

4646
- name: Image build
4747
run: |
48-
./gradlew :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true
48+
./gradlew \
49+
:polaris-quarkus-server:assemble \
50+
:polaris-quarkus-server:quarkusAppPartsBuild --rerun \
51+
-Dquarkus.container-image.build=true
4952
5053
- name: Regression Test
5154
env:

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,13 @@ select * from db1.table1;
7676

7777
#### Running in Docker
7878

79-
- `./gradlew clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true --no-build-cache` - To
80-
build the image locally.
79+
- To build the image locally:
80+
```bash
81+
./gradlew \
82+
:polaris-quarkus-server:assemble \
83+
:polaris-quarkus-server:quarkusAppPartsBuild --rerun \
84+
-Dquarkus.container-image.build=true
85+
```
8186
- `docker run -p 8181:8181 -p 8182:8182 apache/polaris:latest` - To run the image.
8287

8388
The Polaris codebase contains some docker compose examples to quickly get started with Polaris,

getting-started/eclipselink/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@ This example requires `jq` to be installed on your machine.
2525
the Postgres JDBC driver:
2626

2727
```shell
28-
./gradlew clean :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
28+
./gradlew \
29+
:polaris-quarkus-server:assemble \
30+
:polaris-quarkus-server:quarkusAppPartsBuild --rerun \
31+
:polaris-quarkus-admin:assemble \
32+
:polaris-quarkus-admin:quarkusAppPartsBuild --rerun \
2933
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4 \
3034
-Dquarkus.container-image.tag=postgres-latest \
31-
-Dquarkus.container-image.build=true \
32-
--no-build-cache
35+
-Dquarkus.container-image.build=true
3336
```
3437

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

getting-started/spark/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,10 @@ 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 --no-build-cache
30+
./gradlew \
31+
:polaris-quarkus-server:assemble \
32+
:polaris-quarkus-server:quarkusAppPartsBuild --rerun \
33+
-Dquarkus.container-image.build=true
3134
```
3235

3336
## Run the `docker-compose` file

getting-started/telemetry/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ 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 --no-build-cache
27+
./gradlew \
28+
:polaris-quarkus-server:assemble \
29+
:polaris-quarkus-server:quarkusAppPartsBuild --rerun \
30+
-Dquarkus.container-image.build=true
2831
```
2932

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

getting-started/trino/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ 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 clean :polaris-quarkus-server:assemble -Dquarkus.container-image.build=true --no-build-cache
27+
./gradlew \
28+
:polaris-quarkus-server:assemble \
29+
:polaris-quarkus-server:quarkusAppPartsBuild --rerun \
30+
-Dquarkus.container-image.build=true
2831
```
2932

3033
## Run the `docker-compose` file

helm/polaris/README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,13 @@ 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 clean :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
89+
./gradlew \
90+
:polaris-quarkus-server:assemble \
91+
:polaris-quarkus-server:quarkusAppPartsBuild --rerun \
92+
:polaris-quarkus-admin:assemble \
93+
:polaris-quarkus-admin:quarkusAppPartsBuild --rerun \
9094
-Dquarkus.container-image.build=true \
91-
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4 \
92-
--no-build-cache
95+
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
9396
```
9497

9598
### Installing the chart locally

helm/polaris/README.md.gotmpl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,13 @@ 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 clean :polaris-quarkus-server:assemble :polaris-quarkus-admin:assemble \
90+
./gradlew \
91+
:polaris-quarkus-server:assemble \
92+
:polaris-quarkus-server:quarkusAppPartsBuild --rerun \
93+
:polaris-quarkus-admin:assemble \
94+
:polaris-quarkus-admin:quarkusAppPartsBuild --rerun \
9195
-Dquarkus.container-image.build=true \
92-
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4 \
93-
--no-build-cache
96+
-PeclipseLinkDeps=org.postgresql:postgresql:42.7.4
9497
```
9598

9699
### Installing the chart locally

quarkus/admin/README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ java -jar polaris-quarkus-admin-<version>-runner.jar
4747
To also build the Docker image, you can use the following command:
4848

4949
```shell
50-
./gradlew clean :polaris-quarkus-admin:assemble -Dquarkus.container-image.build=true --no-build-cache
50+
./gradlew \
51+
:polaris-quarkus-admin:assemble \
52+
:polaris-quarkus-admin:quarkusAppPartsBuild --rerun \
53+
-Dquarkus.container-image.build=true
5154
```
5255

5356
## Running the Admin Tool

0 commit comments

Comments
 (0)