Commit c6a25fa4 authored by JooHan Hong's avatar JooHan Hong

jenkins, source code deploy init

parent 0c9a28d7
Pipeline #6086 passed with stages
in 1 minute and 8 seconds
[![logo](https://www.hongsnet.net/images/logo.gif)](https://www.hongsnet.net)
# Jenkins Source Code Deploy Overview
> GitLab Project의 Push Event 발생 시 Jenkins가 이를 배포해주는 과정을 살펴본다.
**!참고** : GitLab Webhook 설정은 생략한다. 만약 확인이 필요하다면, 다음의 링크를 참조한다.
[바로가기](./WEBHOOK/)
# Jenkins Pipeline Script Configuration
> Jenkins 프로젝트 > 구성 > Pipeline 에서 설정한다.
```
pipeline {
agent any
stages {
stage('Git Clone') {
steps {
sh 'mkdir -p hongsnet'
dir("hongsnet")
{
git branch: 'master', credentialsId: 'juhanida21', url: 'https://gitlab.hongsnet.net/joohan.hong/hongsnet.git'
}
}
}
stage('Source code Deploy') {
steps {
sh 'rsync -avz --progress hongsnet/ 172.24.0.245::HONGSNET-WEB/'
}
}
}
}
```
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment