-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSamsungSignature-Infrastructure-ConfigService.jenkinsfile
More file actions
52 lines (50 loc) · 1.57 KB
/
SamsungSignature-Infrastructure-ConfigService.jenkinsfile
File metadata and controls
52 lines (50 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
pipeline {
agent any
stages {
stage('CLONE') {
steps {
script {
git branch: 'infra-dev-config', credentialsId: 'jenkins-gitlab', url: 'https://lab.ssafy.com/s10-final/S10P31A503.git'
}
}
}
stage('BUILD') {
steps {
script {
sh '''
cd INFRA-ConfigService
chmod 755 gradlew
./gradlew clean bootjar
'''
}
}
}
stage('SCP') {
steps {
sshagent(credentials: ['jenkins-ssh']) {
sh'''
ssh -o StrictHostKeyChecking=no ubuntu@43.201.50.220 '
uptime
rm -rf /home/ubuntu/scp/infra-config
mkdir /home/ubuntu/scp/infra-config
'
'''
sh 'scp -r . ubuntu@43.201.50.220:/home/ubuntu/scp/infra-config'
}
}
}
stage('DEPLOY') {
steps {
sshagent(credentials: ['jenkins-ssh']) {
sh '''
ssh ubuntu@43.201.50.220 '
export CONFIG_SERVICE_PORT=8370
cd /home/ubuntu/scp/infra-config/INFRA-ConfigService
sh deploy.sh
'
'''
}
}
}
}
}