Skip to content

Commit

Permalink
Spring Boot CI Pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaynegi45 committed Sep 1, 2024
1 parent bf7e2aa commit 2914f61
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/spring-boot-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
branches:
- 'main'
pull_request:
branches:
- '**' # Run on all PRs to any branch

jobs:
build-and-test:
Expand All @@ -33,6 +31,13 @@ jobs:
DATABASE_USERNAME: ${{ secrets.DATABASE_USERNAME }}
DATABASE_PASSWORD: ${{ secrets.DATABASE_PASSWORD }}
DATABASE_DRIVER_CLASS_NAME: ${{ secrets.DATABASE_DRIVER_CLASS_NAME }}
MAIL_SERVICE_HOST: ${{ secrets.MAIL_SERVICE_HOST }}
MAIL_SERVICE_PORT: ${{ secrets.MAIL_SERVICE_PORT }}
MAIL_SERVICE_USERNAME: ${{ secrets.MAIL_SERVICE_USERNAME }}
MAIL_SERVICE_PASSWORD: ${{ secrets.MAIL_SERVICE_PASSWORD }}
MAIL_SERVICE_SMTP: ${{ secrets.MAIL_SERVICE_SMTP }}
MAIL_SERVICE_STARTTLS: ${{ secrets.MAIL_SERVICE_STARTTLS }}
MAIL_SERVICE_DOMAIN_NAME: ${{ secrets.MAIL_SERVICE_DOMAIN_NAME }}

- name: Run Tests
run: mvn test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@ build/
.DS_Store

src/main/resources/application-dev.properties
.github/workflows/java-code-quality.yml
.github/workflows/maven-publish.yml
10 changes: 10 additions & 0 deletions src/main/resources/application-production.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
# --- Database Setup ---
spring.datasource.url=${DATABASE_URL}
spring.datasource.username=${DATABASE_USERNAME}
spring.datasource.password=${DATABASE_PASSWORD}
spring.datasource.driver-class-name=${DATABASE_DRIVER_CLASS_NAME}
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=false


# --- Mail Service Setup ---
spring.mail.host=${MAIL_SERVICE_HOST}
spring.mail.port=${MAIL_SERVICE_PORT}
spring.mail.username=${MAIL_SERVICE_USERNAME}
spring.mail.password=${MAIL_SERVICE_PASSWORD}
spring.mail.properties.mail.smtp.auth=${MAIL_SERVICE_SMTP}
spring.mail.properties.mail.starttls.enable=${MAIL_SERVICE_STARTTLS}
spring.mail.properties.domain_name=${MAIL_SERVICE_DOMAIN_NAME}

0 comments on commit 2914f61

Please sign in to comment.