Skip to content

Commit

Permalink
update pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
waelABDALLAH1 committed Dec 24, 2024
1 parent 83c4ae4 commit 4211bd2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/order-ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Build with Maven
run: |
cd order/
mvn clean package -DskipTests
mvn clean package -DskipTests -Djava.version=17
- name: Archive JAR Artifact
uses: actions/upload-artifact@v3
Expand All @@ -45,7 +45,7 @@ jobs:
- name: Download JAR Artifact
uses: actions/download-artifact@v3
with:
name: order.jar
name: service-order.jar
path: ./

- name: Verify if the correct JAR file exists
Expand All @@ -56,17 +56,17 @@ jobs:
run: |
mkdir -p ~/.ssh
ssh-keyscan -H ${{ secrets.DEPLOYMENT_MACHINE_IP }} >> ~/.ssh/known_hosts
- name: Create destination directory on VPS
run: |
sshpass -p "${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }}" ssh ${{ secrets.DEPLOYMENT_MACHINE_USER }}@${{ secrets.DEPLOYMENT_MACHINE_IP }} \
"mkdir -p ~/order"
- name: Transfer JAR to VPS
run: |
sshpass -p "${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }}" scp order-1.0.0-SNAPSHOT.jar \
sshpass -p "${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }}" scp service-order.jar \
${{ secrets.DEPLOYMENT_MACHINE_USER }}@${{ secrets.DEPLOYMENT_MACHINE_IP }}:~/order/order.jar
- name: Verify if the JAR file exists on the VPS
run: |
sshpass -p "${{ secrets.DEPLOYMENT_MACHINE_USER_PSW }}" ssh ${{ secrets.DEPLOYMENT_MACHINE_USER }}@${{ secrets.DEPLOYMENT_MACHINE_IP }} \
Expand Down Expand Up @@ -98,4 +98,4 @@ jobs:
echo "Service deployed and healthy!"
tail -n 50 ~/order/order.log
tail -n 50 ~/order/order.log

0 comments on commit 4211bd2

Please sign in to comment.