-
Notifications
You must be signed in to change notification settings - Fork 4
/
jenkinsfile
44 lines (39 loc) · 1.8 KB
/
jenkinsfile
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
pipeline {
agent any
environment {
DB_URL="${env.DB_URL}"
DB_USERNAME="${env.DB_USERNAME}"
DB_PASSWORD="${env.DB_PASSWORD}"
S3_ACCESSKEY="${env.S3_ACCESSKEY}"
S3_SECRETKEY="${env.S3_SECRETKEY}"
S3_NAME="${env.S3_NAME}"
GOOGLE_CLIENT_ID="${env.GOOGLE_CLIENT_ID}"
GOOGLE_CLIENT_SECRET="${env.GOOGLE_CLIENT_SECRET}"
KAKAO_CLIENT_ID="${env.KAKAO_CLIENT_ID}"
KAKAO_CLIENT_SECRET="${env.KAKAO_CLIENT_SECRET}"
JWT_SECRET="${env.JWT_SECRET}"
EC2_PUBLIC_IP="${env.EC2_PUBLIC_IP}"
REDIS_PW="${env.REDIS_PW}"
OPENVIDU_URL="${env.OPENVIDU_URL}"
OPENVIDU_SECRET="${env.OPENVIDU_SECRET}"
}
stages {
stage("Checkout") {
steps {
script {
git credentialsId: 'gitlab', url: 'https://lab.ssafy.com/s10-webmobile1-sub2/S10P12D209.git', branch: "master"
}
}
}
stage("Deploy") {
steps {
script {
sh 'cd /var/jenkins_home/workspace/S10P12D209'
sh 'pwd'
def dockerComposeCmd = "DB_URL=${env.DB_URL} DB_USERNAME=${env.DB_USERNAME} DB_PASSWORD=${env.DB_PASSWORD} S3_ACCESSKEY=${env.S3_ACCESSKEY} S3_SECRETKEY=${env.S3_SECRETKEY} S3_NAME=${env.S3_NAME} GOOGLE_CLIENT_ID=${env.GOOGLE_CLIENT_ID} GOOGLE_CLIENT_SECRET=${env.GOOGLE_CLIENT_SECRET} KAKAO_CLIENT_ID=${env.KAKAO_CLIENT_ID} KAKAO_CLIENT_SECRET=${env.KAKAO_CLIENT_SECRET} JWT_SECRET=${env.JWT_SECRET} EC2_PUBLIC_IP=${env.EC2_PUBLIC_IP} REDIS_PW=${env.REDIS_PW} OPENVIDU_URL=${env.OPENVIDU_URL} OPENVIDU_SECRET=${env.OPENVIDU_SECRET} docker-compose up -d --build"
sh dockerComposeCmd
}
}
}
}
}