--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/60ee6556-433b-4718-9589-d6310fdf4a13%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
In the "Build Triggers" part inside your job configuration, you should have a "Periodically if not otherwise run" property.However, if you're able to configure webhooks on your SCM side to notify your master about new commits/branches and PR, it's a better approach : https://www.cloudbees.com/blog/polling-must-die-triggering-jenkins-builds-git-hook
2017-03-03 16:12 GMT+01:00 Limor Shemesh <li...@gigaspaces.com>:
HiI upgraded Jenkins to 2.4 and started migrate jobs to pipeline jobs.I have created JenkinsFile and configure the job to search it in github repo.The job works great but I cannot find the way to add poll scm.I want that the job will run on every push of the repo (master branch).Please help.Thanks.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/8b82d24f-130d-44d9-a358-b292ef36840e%40googlegroups.com.
pipeline {
triggers {
pollSCM('*/5 * * * *')
}
...
}
It works for me using subversion.
Bill
pipeline {
triggers {
pollSCM('*/5 * * * *')
}
agent { label 'web-ui-04888827' }
stages {
stage('Build') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'RelativeTargetDirectory', relativeTargetDir: 'cloudify-stage']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '5006a20b-84d4-4681-ae49-886247acd47b', url: 'https://github.com/cloudify-cosmo/cloudify-stage.git']]])
dir('cloudify-stage') {
sh '''sudo npm install
sudo npm install webpack -g
sudo npm install bower -g
sudo npm install gulp -g
sudo npm install grunt-cli -g
bower install'''
dir('semantic') {
sh 'gulp build'
}
sh 'grunt build'
dir('backend') {
sh 'npm install'
}
sh 'webpack --config webpack.config-prod.js --bail'
sh 'sudo chown jenkins:jenkins -R .'
}
}
}