Build
Please refer to the Quarkus documentation for more details.
Running the application locally
You can run your application in dev mode that enables live coding using:
./gradlew --console=PLAIN quarkusDev
Be sure to have set the configurations correctly as described in the configuration page.
Example:
export GITLAB_HOST=https://gitlab.com
export GITLAB_API_TOKEN=glpat-rXzx1n17cqUnmo437XSf
export GITLAB_EXTERNAL_CHECK_URL=https://32e2-2a01-e0a-19d-8b20-ed94-7739-83db-7f87.eu.ngrok.io/u-sonar-status/gitlab
export GITLAB_EXTERNAL_CHECK_NAME=SONAR_local
export SONARQUBE_HOST=https://sonarcloud.io/
export SONARQUBE_API_TOKEN=3bd9fdc773d5a6df3d2a12f8c35ae2b3e13b8944
This will start the application is dev mode, available on port 8080
.
For more details check the Quarkus Gradle Tooling page.
Packaging the application
The application can be packaged using:
./gradlew build
It produces the quarkus-run.jar
file in the build/quarkus-app/
directory.
Be aware that it’s not an über-jar as the dependencies are copied into the build/quarkus-app/lib/
directory.
The application is now runnable using java -jar build/quarkus-app/quarkus-run.jar
.
If you want to build an über-jar, execute the following command:
./gradlew build -Dquarkus.package.type=uber-jar
The application, packaged as an über-jar, is now runnable using java -jar build/u-sonar-status-<version>-runner.jar
.
Build a docker image
./gradlew build \
-Dquarkus.container-image.build=true \
-Dquarkus.container-image.push=true \
-Dquarkus.container-image.registry=<registry name> \
-Dquarkus.container-image.group=<image path> \
-Dquarkus.container-image.name=<image name> \
-Dquarkus.container-image.username=<registry username> \
-Dquarkus.container-image.password=<registry password>
Run the docker image
docker run -p 8080:8080 -e "GITLAB_API_TOKEN=glpat-rXzx1n17cqUnmo437XSf" <u-sonar-status image name>
The server is running on the 8080 port.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.