Skip to content

Commit

Permalink
Update and rename cd-prod.yml to CD.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-alef committed Jun 23, 2023
1 parent 1135b72 commit 5d49bb9
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions .github/workflows/cd-prod.yml → .github/workflows/CD.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Java CD with Maven - Prod
name: CD

on:
push:
branches: [ "main" ]

jobs:
cd-prod:
CD:

runs-on: ubuntu-latest

Expand All @@ -20,22 +20,6 @@ jobs:
distribution: 'corretto'
cache: maven

- name: Run Tests With Jacoco Coverage
run: mvn -B -f pom.xml test jacoco:prepare-agent jacoco:report

- name: SonarCloud Analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
mvn -B verify sonar:sonar \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.organization=kelvin-alef \
-Dsonar.projectKey=kelvin-alef_java-api \
-Dsonar.language=java \
-Dsonar.java.coveragePlugin=jacoco \
-Dmaven.test.skip=true
- name: Build The Application
run: mvn -B -f pom.xml clean install -Dmaven.test.skip=true

Expand All @@ -58,7 +42,5 @@ jobs:

- name: Deploy The Application
run: |
ssh azure 'sudo systemctl stop java-api'
ssh azure 'sudo rm -rf /api/java-api.jar'
scp target/java-api.jar azure:/api/java-api.jar
ssh azure 'sudo systemctl start java-api'

0 comments on commit 5d49bb9

Please sign in to comment.