问题
I am just starting with jenkins. And I am trying to run a build on a branch/master.
And all I am getting is Did not schedule build for branch: master
Here is the log:
Started by timer
[Sun Mar 05 18:23:43 NPT 2017] Starting branch indexing...
Connecting to https://bitbucket.org using sameerkattel@hotmail.com/****** (sameer_kattel)
Repository type: Git
Looking up sameer_kattel/protected-consumer for branches
Checking branch single_page_app from sameer_kattel/protected-consumer
Checking branch master from sameer_kattel/protected-consumer
‘Jenkinsfile’ found
Met criteria
Changes detected: master (null → b2e24fc7a3a3c68f84dddf69d2cedc79f8478bf3)
Did not schedule build for branch: master
Checking branch enable_cors_response_lamda from sameer_kattel/protected-consumer
Looking up sameer_kattel/protected-consumer for pull requests
[Sun Mar 05 18:23:45 NPT 2017] Finished branch indexing. Indexing took 2.1 sec
Finished: SUCCESS
How do I schedule a branch?? Here is my JenkinsFile
#!groovy
node {
currentBuild.result = "SUCCESS"
try {
stage 'Build'
checkout scm
dir(spa)
sh 'npm install'
sh 'ng build'
}
catch (err) {
currentBuild.result = "FAILURE"
echo 'failed'
throw err
}
}
Can some one point me to right direction??
回答1:
A suggestion found in some old IRC logs is that the "Automatic branch project triggering" option has been set to something that doesn't match the branch you want built. Set that option appropriately so that your desired branch or branches will build automatically.
来源:https://stackoverflow.com/questions/42608490/did-not-schedule-build-for-branch