Skip to content

Commit 37d74f8

Browse files
authored
Merge pull request #3 from aboutbits/ab-449-postgresql-operator-multi-project
AB-449 PostgreSQL Operator: Migrate to a multi-project Gradle build
2 parents d7f24cf + cf8b392 commit 37d74f8

58 files changed

Lines changed: 255 additions & 209 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
run: >-
1919
./gradlew
2020
--console=colored
21-
test
21+
:operator:test
2222
--fail-fast
2323
env:
2424
GITHUB_USER_NAME: ${{ github.actor }}

Makefile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ init:
44
$(MAKE) install
55

66
install:
7-
./gradlew --console=colored quarkusBuild
8-
7+
./gradlew --console=colored :operator:quarkusBuild
98

109
### EXECUTION
1110

1211
run:
13-
./gradlew --console=colored quarkusDev
12+
./gradlew --console=colored :operator:quarkusDev
13+
14+
generate-jooq:
15+
./gradlew --console=colored :generated:jooqCodegen
1416

1517
test:
16-
./gradlew --console=colored clean test
18+
./gradlew --console=colored :operator:clean :operator:test
1719

1820
# Flag targets as phony, to tell `make` that these are no file targets
19-
.PHONY: init install run test
21+
.PHONY: init install run generate-jooq test

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ make run
2929

3030
# or
3131

32-
./gradlew quarkusDev
32+
./gradlew :operator:quarkusDev
3333
```
3434

3535
The app service will be available at http://localhost:8080,
@@ -42,7 +42,7 @@ make test
4242

4343
# or
4444

45-
./gradlew test
45+
./gradlew :operator:test
4646
```
4747

4848
### Run the project as a service in IntelliJ
@@ -55,7 +55,7 @@ Afterward, the project can be started in IntelliJ by navigating to `Run` -> `Run
5555
## Test the CRD on the ephemeral Dev Services cluster
5656

5757
This example demonstrates how to set up a local development environment using Quarkus Dev Services to test the Operator manually.
58-
As the K3s cluster port and the secrets change on every `./gradlew quarkusDev` run, you will have to manually update the port and secrets in the `~/.kube/config` every time.
58+
As the K3s cluster port and the secrets change on every `./gradlew :operator:quarkusDev` run, you will have to manually update the port and secrets in the `~/.kube/config` every time.
5959

6060
### 1. Configure Kubeconfig from Dev Services
6161

@@ -170,7 +170,7 @@ spec:
170170
The application can be packaged using:
171171

172172
```shell script
173-
./gradlew build
173+
./gradlew :operator:build
174174
```
175175

176176
It produces the `quarkus-run.jar` file in the `build/quarkus-app/` directory.
@@ -181,7 +181,7 @@ The application is now runnable using `java -jar build/quarkus-app/quarkus-run.j
181181
If you want to build an _über-jar_, execute the following command:
182182

183183
```shell script
184-
./gradlew build -Dquarkus.package.jar.type=uber-jar
184+
./gradlew :operator:build -Dquarkus.package.jar.type=uber-jar
185185
```
186186

187187
The application, packaged as an _über-jar_, is now runnable using `java -jar build/*-runner.jar`.
@@ -191,13 +191,13 @@ The application, packaged as an _über-jar_, is now runnable using `java -jar bu
191191
You can create a native executable using:
192192

193193
```shell script
194-
./gradlew build -Dquarkus.native.enabled=true
194+
./gradlew :operator:build -Dquarkus.native.enabled=true
195195
```
196196

197197
Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
198198

199199
```shell script
200-
./gradlew build -Dquarkus.native.enabled=true -Dquarkus.native.container-build=true
200+
./gradlew :operator:build -Dquarkus.native.enabled=true -Dquarkus.native.container-build=true
201201
```
202202

203203
You can then execute your native executable with: `./build/postgresql-operator-1.0.0-SNAPSHOT-runner`

0 commit comments

Comments
 (0)