Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: vprofile action
on: workflow_dispatch
env:
AWS_REGION: us-east-1
ECR_REPOSITORY: vprofileapp
EKS_CLUSTER: vprofile-eks

jobs:
Testing:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v4

- name: Maven test
run: mvn test

- name: checkstyle
run: mvn checkstyle:checkstyle

- name: Set Java 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'

#run sonar scanner
- name: Run SonarQube Scanner
run: |
mvn sonar:sonar \
-Dsonar.host.url=${{ secrets.SONAR_URL }} \
-Dsonar.login=${{ secrets.SONAR_TOKEN }} \
-Dsonar.organization=${{ secrets.SONAR_ORGANIZATION }} \
-Dsonar.projectKey=${{ secrets.SONAR_PROJECT_KEY }}

#check the quality gate status
- name: SonarQube Quality Gate Check
id: sonarqube-quality-gate-check
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_URL }}