Skip to content

Commit

Permalink
use maven for quarkus
Browse files Browse the repository at this point in the history
  • Loading branch information
waelABDALLAH1 committed Nov 11, 2024
1 parent 87e23b5 commit 881eaa4
Showing 1 changed file with 5 additions and 16 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/catalog-service-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,15 @@ jobs:
distribution: 'temurin'
java-version: '17'

- name: Install SDKMAN! and Quarkus
- name: Build with Maven
run: |
curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"
sdk install quarkus
- name: Build with Quarkus
run: |
source "$HOME/.sdkman/bin/sdkman-init.sh"
cd catalog/catalog-service/
quarkus build --uber-jar # Génère un fichier JAR exécutable
mvn clean package -Dquarkus.package.type=uber-jar # Création du JAR exécutable
- name: Run Tests
- name: Run Tests with Maven
run: |
source "$HOME/.sdkman/bin/sdkman-init.sh"
cd catalog/catalog-service/
quarkus test
mvn test
- name: Archive JAR Artifact
uses: actions/upload-artifact@v3
Expand All @@ -63,10 +55,7 @@ jobs:
username: ${{ secrets.VM_USERNAME }}
key: ${{ secrets.VM_SSH_KEY }}
script: |
# Crée un répertoire pour l'application s'il n'existe pas
mkdir -p ~/service-catalog
# Copie le fichier JAR sur la VM
scp service-catalog.jar ${{ secrets.VM_USERNAME }}@${{ secrets.VM_HOST }}:~/service-catalog/service-catalog.jar
# Redémarre l'application avec le nouveau JAR sur le port 8082
pkill -f 'java.*service-catalog.jar' || true # Arrête l'ancienne instance
pkill -f 'java.*service-catalog.jar' || true
nohup java -jar ~/service-catalog/service-catalog.jar --server.port=8082 > ~/service-catalog/app.log 2>&1 &

0 comments on commit 881eaa4

Please sign in to comment.