Skip to content

Commit

Permalink
✨feature : batch 빌드방식 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ParkYunHo committed Jul 26, 2023
1 parent a154571 commit 3e986c6
Showing 1 changed file with 26 additions and 5 deletions.
31 changes: 26 additions & 5 deletions .github/workflows/number-batch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,29 @@ jobs:
- name: Build Gradle
run: ./gradlew clean --stacktrace --build-file=./batch/build.gradle.kts --exclude-task test build

- name: Job Execute
run: java -Dspring.profiles.active=prod -jar ./batch/build/libs/batch-0.0.1-SNAPSHOT.jar --spring.batch.job.names=lottoNumberJob --startDrwtNo=$START_DRWTNO --endDrwtNo=$END_DRWTNO
env:
START_DRWTNO: ${{ inputs.startDrwtNo }}
END_DRWTNO: ${{ inputs.endDrwtNo }}
# 인스턴스 내부에서 실행하기 테스트
- name: Upload JAR To Instance
uses: appleboy/scp-action@master
with:
host: ${{ secrets.REMOTE_SSH_HOST }}
username: ${{ secrets.REMOTE_SSH_USERNAME }}
key: ${{ secrets.REMOTE_SSH_KEY }}
source: "./batch/build/libs/batch-0.0.1-SNAPSHOT.jar"
target: "/home/opc/deploy"

- name: Execute Remote SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.REMOTE_SSH_HOST }}
username: ${{ secrets.REMOTE_SSH_USERNAME }}
key: ${{ secrets.REMOTE_SSH_KEY }}
script: |
echo jobName=lottoNumberJob startDrwtNo=${{ inputs.startDrwtNo }} endDrwtNo=${{ inputs.endDrwtNo }}
ls ~/deploy/batch/build/libs -all
# java -Dspring.profiles.active=prod -jar ~/deploy/batch/build/libs/batch-0.0.1-SNAPSHOT.jar --job.name=lottoNumberJob --startDrwtNo=${{ inputs.startDrwtNo }} --endDrwtNo=${{ inputs.endDrwtNo }}

# - name: Job Execute
# run: java -Dspring.profiles.active=prod -jar ./batch/build/libs/batch-0.0.1-SNAPSHOT.jar --spring.batch.job.names=lottoNumberJob --startDrwtNo=$START_DRWTNO --endDrwtNo=$END_DRWTNO
# env:
# START_DRWTNO: ${{ inputs.startDrwtNo }}
# END_DRWTNO: ${{ inputs.endDrwtNo }}

0 comments on commit 3e986c6

Please sign in to comment.