Skip to content

Commit

Permalink
GCP Deployment Prep
Browse files Browse the repository at this point in the history
  • Loading branch information
sdikyarts committed Apr 24, 2024
1 parent 5969625 commit 7788724
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 2 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,4 @@ jobs:
run: |
./gradlew check --info --stacktrace
./gradlew test
./gradlew jacocoTestReport
./gradlew jacocoTestReport
Empty file added Dockerfile
Empty file.
10 changes: 9 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -72,5 +72,13 @@ tasks.test {
}

tasks.jacocoTestReport {
dependsOn(tasks.test)
classDirectories.setFrom(files(classDirectories.files.map {
fileTree(it) { exclude("**/*Application**") }
}))
dependsOn(tasks.test) // tests are required to run before generating the report
reports {
xml.required.set(false)
csv.required.set(false)
html.outputLocation.set(layout.buildDirectory.dir("jacocoHtml"))
}
}
7 changes: 7 additions & 0 deletions src/main/resources/application-dev.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
spring.datasource.url=jdbc:postgresql://localhost:5432/subscription-admin
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.jpa.hibernate.ddl-auto=create-drop
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.format_sql=true
7 changes: 7 additions & 0 deletions src/main/resources/application-prod.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
spring.datasource.url=${JDBC_DATABASE_URL}
spring.datasource.username=${JDBC_DATABASE_USERNAME}
spring.datasource.password=${JDBC_DATABASE_PASSWORD}
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.format_sql=true

7 changes: 7 additions & 0 deletions src/main/resources/application-test.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
spring.datasource.url=jdbc:postgresql://postgres:5432/subscription-admin
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.format_sql=true
1 change: 1 addition & 0 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
spring.application.name=subscription-admin
spring.profiles.active=${PRODUCTION:dev}

0 comments on commit 7788724

Please sign in to comment.