diff --git a/README.md b/README.md index 275ae26..b9deec7 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,15 @@ Fork this repository to your GitHub account. 3. Add the following variable to the `.env` file: ```env jira-issue-lottery.access-token= + QUARKUS_MAILER_FROM= + QUARKUS_MAILER_USERNAME= + QUARKUS_MAILER_PASSWORD= + +**QUARKUS_MAILER_PASSWORD** +value of **** is password to the email address corresponding to **QUARKUS_MAILER_USERNAME**. **Note** You probably want to generate it using _Gmail_ > _Settings_ > _Security_ > _2-Step Verification_ > _App passwords_ + +***Default email service*** +is Gmail. To change this behavior or to override predefined parameters in _applications.properties_ file please refer to [Mailer Extension Documentation](https://quarkus.io/guides/mailer-reference#popular) ## Production deployment 1. Log into your Openshift @@ -78,7 +87,7 @@ oc create secret generic jira-lottery --from-literal=QUARKUS_MAILER_USERNAME={TBD} --from-literal=QUARKUS_MAILER_PASSWORD={TBD} ``` -3. Build the application, this step will eventually fail +3. Build the application, this step will eventually fail due to bug in quarkus > **_NOTE:_** You can use script `deploy.sh` for convenience. ```shell ./mvnw clean package -Dquarkus.openshift.deploy=true @@ -91,68 +100,4 @@ And in file `openshift.yml` delete the following line `selector: {}` 5. Deploy the YAML file ```shell oc apply -f openshift.yml -``` - - -## Running the application in dev mode - -You can run your application in dev mode that enables live coding using: -```shell script -./mvnw compile quarkus:dev -``` - -> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/. - -## Packaging and running the application - -The application can be packaged using: -```shell script -./mvnw package -``` -It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory. -Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory. - -The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`. - -If you want to build an _über-jar_, execute the following command: -```shell script -./mvnw package -Dquarkus.package.type=uber-jar -``` - -The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`. - -## Creating a native executable - -You can create a native executable using: -```shell script -./mvnw package -Pnative -``` - -Or, if you don't have GraalVM installed, you can run the native executable build in a container using: -```shell script -./mvnw package -Pnative -Dquarkus.native.container-build=true -``` - -You can then execute your native executable with: `./target/jira-lottery-1.0.0-SNAPSHOT-runner` - -If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling. - -## Related Guides - -- Camel Jira ([guide](https://camel.apache.org/camel-quarkus/latest/reference/extensions/jira.html)): Interact with JIRA issue tracker -- Picocli ([guide](https://quarkus.io/guides/picocli)): Develop command line applications with Picocli - -## Provided Code - -### Picocli Example - -Hello and goodbye are civilization fundamentals. Let's not forget it with this example picocli application by changing the command and parameters. - -[Related guide section...](https://quarkus.io/guides/picocli#command-line-application-with-multiple-commands) - -Also for picocli applications the dev mode is supported. When running dev mode, the picocli application is executed and on press of the Enter key, is restarted. - -As picocli applications will often require arguments to be passed on the commandline, this is also possible in dev mode via: -```shell script -./mvnw compile quarkus:dev -Dquarkus.args='Quarky' -``` +``` \ No newline at end of file diff --git a/deploy.sh b/deploy.sh index 63f60e7..e725b80 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,3 +1,7 @@ +# Tracker issue for quarkus bug. This script serves +# as a workaround for the time being. +# issue: https://github.com/quarkusio/quarkus/issues/38880 +# Please delete this script once the fix is released ./mvnw clean package -Dquarkus.kubernetes.deploy=true sed -i '/^\s*selector: {}/d' target/kubernetes/openshift.yml oc apply -f target/kubernetes/openshift.yml diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 7f21da4..c776003 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -8,7 +8,8 @@ quarkus.openshift.env.secrets=jira-lottery quarkus.openshift.labels.app=jira-issue-lottery # These 2 options are disabled to remove labels from selector field. However, -# a manual removal of selector field all together is needed in the generated yml file under target/kubernetes +# a manual removal of selector field all together is needed in the generated yml file under target/kubernetes. +# [Tracker] Currently filled issue in quarkus: https://github.com/quarkusio/quarkus/issues/38880 quarkus.openshift.add-version-to-label-selectors=false quarkus.openshift.add-name-to-label-selectors=false