Skip to content

xjusko/jira-issue-lottery

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

62 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jira-issue-lottery

This project uses Quarkus, the Supersonic Subatomic Java Framework.

If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .

Set up the app

Fork the Repository

Fork this repository to your GitHub account.

Configure JIRA Lottery

  1. Write a valid jira-issue-lottery.yml config in the .github directory in your forked repository.

    • Valid Config Example:
      delay: P14D
      participants:
        - email: [email protected]
          projects:
            - project: WFLY
              components: [Logging]
              maxIssues: 5
            - project: ELY
              components: [HTTP, Core]
              maxIssues: 3

    delay:: The duration of the lottery cycle before participants are selected again.

    • Duration as a String in ISO-8601 format, mandatory, no default.

    participants:: A list of participants with their preferences for participating in the lottery.

    • List of Participants, mandatory, no default.

    email:: The email address of the participant, where the notification is sent.

    • String, mandatory, no default.

    projects:: The list of JIRA projects the participant is interested in, each with specific components and maximum allowed issues.

    • List of Projects, mandatory, no default.

    project:: The name of the JIRA project.

    • String, mandatory, no default.

    components:: The specific components within the project that the participant is interested in.

    • List of Strings, mandatory, no default.

    maxIssues:: The maximum number of issues the participant is willing to take for the specified project and components.

    • Integer, mandatory, no default.
  2. Commit and push the changes to your forked repository.

Configure Application Properties

  1. Change the value of jira-issue-lottery.config-file-repo in the application.properties file to point to a public repository with a valid config file according to first step in Configuration section such as https://github.com/jboss-set/jira-issue-lottery.

Create .env File

  1. Create a .env file in the main directory of your app.
  2. Create a Jira Personal Access Token (Guide on how to create the token)
  3. Add the following variable to the .env file:
    jira-issue-lottery.access-token=<YOUR TOKEN>
    QUARKUS_MAILER_FROM=<email address>
    QUARKUS_MAILER_USERNAME=<email address>
    QUARKUS_MAILER_PASSWORD=<email password>
    

QUARKUS_MAILER_PASSWORD value of <email_password> 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

Production deployment

  1. Log into your Openshift
oc login ...
  1. Create secret
oc create secret generic jira-lottery
--from-literal=JIRA_ISSUE_LOTTERY_ACCESS_TOKEN={TBD}
--from-literal=QUARKUS_MAILER_FROM={TBD}
--from-literal=QUARKUS_MAILER_USERNAME={TBD}
--from-literal=QUARKUS_MAILER_PASSWORD={TBD}
  1. Build the application, this step will eventually fail due to bug in quarkus

NOTE: You can use script deploy.sh for convenience.

./mvnw clean package -Dquarkus.openshift.deploy=true
  1. Update CronJob deployment
cd target/kubernetes

And in file openshift.yml delete the following line selector: {} 5. Deploy the YAML file

oc apply -f openshift.yml

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.4%
  • Shell 0.6%