Skip to content

Commit

Permalink
Feat : Workflow for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
saimanaswini-k committed Aug 9, 2024
1 parent 0f14223 commit ca1dc24
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
21 changes: 20 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ on:
push:
tags:
- '*'
branches:
- master
- release-*

jobs:
Docker build:
Docker-build:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 11
Expand Down Expand Up @@ -63,3 +66,19 @@ jobs:
tags: |
${{ vars.DOCKERHUB_USERNAME }}/notification_service:${{ github.ref_name }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'

- name: Run SonarQube analysis
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn verify -DskipTests sonar:sonar
-Dsonar.projectKey=project-sunbird_sunbird-notification-service
-Dsonar.organization=project-sunbird
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.coverage.exclusions=**/cassandra-utils/**,**/platform-cache/**,**/sb-actor/**,**/sb-telemetry-utils/**,**/sb-utils/**,**/models/**,**/bean/*,**/sb-common/**
-Dsonar.coverage.jacoco.xmlReportPaths=/home/runner/work/notification-service/notification-service/reports/target/jacoco/jacoco.xml
7 changes: 6 additions & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,10 @@ jobs:
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn verify -DskipTests sonar:sonar -Dsonar.projectKey=project-sunbird_sunbird-notification-service -Dsonar.organization=project-sunbird -Dsonar.host.url=https://sonarcloud.io -Dsonar.coverage.exclusions=**/cassandra-utils/**,**/platform-cache/**,**/sb-actor/**,**/sb-telemetry-utils/**,**/sb-utils/**,**/models/**,**/bean/*,**/sb-common/** -Dsonar.coverage.jacoco.xmlReportPaths=/home/runner/work/notification-service/notification-service/reports/target/jacoco/jacoco.xml
mvn verify -DskipTests sonar:sonar
-Dsonar.projectKey=project-sunbird_sunbird-notification-service
-Dsonar.organization=project-sunbird
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.coverage.exclusions=**/cassandra-utils/**,**/platform-cache/**,**/sb-actor/**,**/sb-telemetry-utils/**,**/sb-utils/**,**/models/**,**/bean/*,**/sb-common/**
-Dsonar.coverage.jacoco.xmlReportPaths=/home/runner/work/notification-service/notification-service/reports/target/jacoco/jacoco.xml

0 comments on commit ca1dc24

Please sign in to comment.