I have Jenkins on the local machine and a git repository in the bitpack. I need to do an assembly after each commit in the repository, but I have to do it, without web hooks. I tried adding pollscm to my Jenkins file (this is a multi-brand pipeline.), But it does not work.
node {
properties([
pipelineTriggers([pollSCM('H/5 * * * *')])
]);
stage ('Checkout') {
checkout scm
}
stage ('Configure') {
properties([buildDiscarder(logRotator(artifactDaysToKeepStr: '', artifactNumToKeepStr: '', daysToKeepStr: '', numToKeepStr: '5')), parameters([[$class: 'ExtensibleChoiceParameterDefinition', choiceListProvider: [$class: 'FilenameChoiceListProvider', baseDirPath: 'D:\\0101', emptyChoiceType: 'AtTop', excludePattern: '', includePattern: '*', reverseOrder: false, scanType: 'Directory'], description: '', editable: false, name: 'choose_mnt'], booleanParam(defaultValue: false, description: '[TO DO]', name: 'include_installers')]), pipelineTriggers([])])
env.PATH = "${tool 'ANT1.9.8'}/bin;${env.PATH}"
}
stage ('Clean') {
bat 'ant -f lvm/Jenkins-build.xml continuous-integration'
}
stage ('Build') {
bat 'ant -f Jenkins-build.xml distribution'
bat 'del installx\\builder\\ant.install.properties'
bat 'ren installx\\builder\\ant.install.propertiestemp ant.install.properties'
}
}
source
share