Skip to content

Commit

Permalink
Update cd-prod.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
kelvin-alef committed Jun 5, 2023
1 parent fae1724 commit 65610c8
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .github/workflows/cd-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ jobs:
- 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: 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 @@ -56,12 +56,12 @@ jobs:
SSH_HOST: ${{ secrets.SSH_HOST_PROD }}
SSH_KEY: ${{ secrets.SSH_KEY_PROD }}

- 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'
#- 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'

- name: Deploy Docker
env:
Expand Down

0 comments on commit 65610c8

Please sign in to comment.