Auto trigger github

pipeline{
agent{
label 'k8s-permanent'
}
triggers{
pollSCM('* * * * *')
}
stages{
stage('Build'){
steps{
checkout([
$class: 'GitSCM',
branches: [[name: "origin/master"]],
userRemoteConfigs: [[
url: 'https://github.com/mrnim94/pipeline-triggers-pollSCM.git'
]]
])
}
}
}
}
Ấn save và build


giờ bạn mà change trên git 1 phút trigger 1 lần thấy có thay đổi thực hiện build

