Skip to content

Commit 3aa998f

Browse files
committed
[chore] 젠킨스 파이프라인 스크립트 수정
1 parent 79ee0a4 commit 3aa998f

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

script/dev.jenkinsfile

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,22 @@ pipeline {
88
}
99
stage('Build') {
1010
steps {
11-
sh "./gradlew clean bootJar"
11+
dir('photi-server') {
12+
sh "./gradlew clean bootJar"
13+
}
1214
}
1315
}
1416
stage('Deploy') {
1517
steps {
16-
sshagent(credentials: ["$EC2_CREDENTIALS_ID"]) {
17-
sh '''
18-
ssh -o StrictHostKeyChecking=no ubuntu@$EC2_DEV_PRIVATE_IP
19-
scp build/libs/*.jar ubuntu@$EC2_DEV_PRIVATE_IP:/home/ubuntu
20-
ssh ubuntu@$EC2_DEV_PRIVATE_IP "sh photi-script.sh" &
21-
'''
22-
}
18+
dir('photi-server/build/libs') {
19+
sshagent(credentials: ["$EC2_CREDENTIALS_ID"]) {
20+
sh '''
21+
ssh -o StrictHostKeyChecking=no ubuntu@$EC2_DEV_PRIVATE_IP
22+
scp server-0.0.1-SNAPSHOT.jar ubuntu@$EC2_DEV_PRIVATE_IP:/home/ubuntu
23+
ssh ubuntu@$EC2_DEV_PRIVATE_IP "sh photi-script.sh" &
24+
'''
25+
}
26+
}
2327
}
2428
}
2529
}

0 commit comments

Comments
 (0)