Skip to content

tfbica/meryen-matt-tiago-irene-skeleton

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java CI with Maven

Application

  • HelloWorld
    • Uses Spark framework
    • Gets Heroku PORT from environment to set Spark WebServer port
    • Serves a page at https://[server]/hello

Test

  • EmptyTest
    • Dummy test asserting 1=1 (always passes)

Maven Build

  • Builds a jar with all the dependencies
    • uses maven-assembly-plugin
    • on the package command

CI/CD using GitHub Actions

  • Created a repository secret secrets.HEROKUAPIKEY to use
  • .github/workflows/maven.yml
    • Checkout the project using actions/checkout@v3
    • Setups JDK 17
    • Build and test running mvn package
    • Publish test report using scacap/action-surefire-report@v1
    • Deploy to Heroku (Irene's account) using akhileshns/[email protected]
      • use secrets.HEROKUAPIKEY

Run on Heroku

  • Heroku's configurations to run the application:
    • system.properties
      • define JDK 17
    • Procfile
      • tells Heroku how to run
        web: java -cp ./target/walking-scheleton-1-jar-with-dependencies.jar HelloWorld

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 91.9%
  • Procfile 8.1%