From 7520a2fca96719dfda1a4cfca4b7b4c5b5c3e24e Mon Sep 17 00:00:00 2001 From: Hyein Jeong Date: Sun, 17 Nov 2024 00:05:36 +0900 Subject: [PATCH] =?UTF-8?q?[BE][Chore]=20#166=20:=20jenkinsfile=20?= =?UTF-8?q?=EC=84=B8=ED=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - jenkinsfile 파일 작성 --- Jenkinsfile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 00000000..8fe97695 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,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 + ''' + } + } + } + } +}