-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
36 lines (33 loc) ยท 1015 Bytes
/
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
pipeline {
agent any
stages {
stage('Clone Repository') {
steps {
git branch: 'development', url: 'https://github.com/boostcampwm-2024/web28-DDara.git'
}
}
stage('Set up Environment') {
steps {
script {
sh '''
echo "DB_HOST=${DB_HOST}" > backend/.env
echo "DB_PORT=${DB_PORT}" >> backend/.env
echo "DB_USER=${DB_USER}" >> backend/.env
echo "DB_PASSWORD=${DB_PASSWORD}" >> backend/.env
echo "DB_NAME=${DB_NAME}" >> backend/.env
echo "JWT_SECRET=${JWT_SECRET}" >> backend/.env
'''
}
}
}
stage('Build and Deploy') {
steps {
script {
sh '''
docker-compose up -d --build
'''
}
}
}
}
}