
외부 트리거
깃허브(트리거) -> 젠킨스
깃허브를 이용해서 젠킨스에 트리거
프로젝트에 Jenkinsfile 을 생성
pipeline {
agent any
stages {
stage("Permission") {
steps {
sh "chmod +x ./gradlew"
}
}
stage("Compile") {
steps {
sh "./gradlew compileJava"
}
}
stage("Test") {
steps {
sh "./gradlew test"
}
}
stage("Test Code Coverage"){
steps{
sh "./gradlew jacocoTestCoverageVerification"
sh "./gradlew jacocoTestReport"
}
}
}
}
추가한 Jenkinsfile을 git push
git add .
git commit -m "Jenkinsfile added"
git push



H/5 * * * * : 매 5분) 마다,
git add .
git commit -m "code changed"
git push











http://{내 jenkins서버 접속 url}/github-webhook/http://43.201.7.217:8080//github-webhook/
IntellJ에서 코드 수정 후 GitHub에 push
git add .
git commit -m "code changed"
git push
GitHub webhook에 의해 트리거되어 빌드가 수행된다.
