Skip to content

Commit

Permalink
Merge pull request #47 from f-lab-edu/infra/39
Browse files Browse the repository at this point in the history
[#39] 배포 및 실행 스크립트 추가
  • Loading branch information
hyeok-kong authored Jul 3, 2024
2 parents 56453c6 + df79f3d commit 6b928c7
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions jenkins/group-service
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
pipeline {
agent any

environment {
JAR_FILE = 'group-service/build/libs/group-service-0.0.1-SNAPSHOT.jar'
}

stages {
stage('Git Clone') {
Expand Down Expand Up @@ -46,6 +50,35 @@ pipeline {
}
}
}

stage('Deploy') {
steps {
script {
sshPublisher(
failOnError: true,
publishers: [
sshPublisherDesc(
configName: 'ncp-server',
verbose: true,
transfers: [
sshTransfer(
cleanRemote: false,
sourceFiles: '${JAR_FILE}',
removePrefix: 'group-service/build/libs',
remoteDirectory: './music-everywhere/group-service',
),
sshTransfer(
execCommand: '''
./music-everywhere/group-service/deploy.sh
'''
)
]
)
]
)
}
}
}
}

post {
Expand Down

0 comments on commit 6b928c7

Please sign in to comment.