I have a Jenkins system. It runs build jobs for our company. We run multibranch pipelines. Yesterday one of the builds mysteriously dropped the devel branch from the build.
I looked through the Pull Requests for the branch and I can not find anything that affected by the Jenkins file in the time frame where this branch drop occurred.
I have looked through the Jenkins system log and I do not see any errors. Here is a copy of the relevant parts of the scan repository log:
Examining Bo**a/pro-***-ter
Checking branches...
Getting remote branches...
Checking branch devel
Getting remote pull requests...
Checking branch master
‘Jenkinsfile’ found
Met criteria
I have validated that the devel branch has a Jenkinsfile and that the Jenkinsfile is valid.
I can't figure out how to solve this. Any suggestions would be great.
Some plugin information:
github 1.28.0
branch 2.0.11
docker-common 1.13
docker-pipeline 1.17
git 3.6.0
git client 2.7.0
git server 1.7
SCM API 2.2.3
Jenkins version 2.73.2
I had this same problem with BitBucket Server and Jenkins when using Blue Ocean (BitBucket Server plugins). The branch would not create in Jenkins. I noticed that the branch commit and the pull request (PR) had a successful build. It seems that if Jenkins detects a PR is opened for a branch, it will not create the branch on the Jenkins side. Once I deleted the pull request from BitBucket Server, Jenkins registered the branch and it showed up. Would be better if the branch showed up, had no builds and referenced the Pull request Jenkins job!
Sorry for taking so long to answer this:
I did a plugin upgrade to the latest version of all of the plugins in my Jenkins.
That solved my issue.
I think we might found an answer (or problem causer).
In our case we automatically restarted Jenkins once a day in either in the shut down or boot up process branches went missing.
The amount of missing branches declined significantly after keeping the Jenkins running all the time.
Detected unsupported subitem repo » develop, skipping
In my case I just deleted the develop pipeline(by clicking its link on scan branch log page) and rescan, all worked.
It seems while performing scan it probably point to an obsolete hash in Git preventing Jenkins job to scan correctly.
Related
We have just upgraded our jenkins to 2.289.1 version. With the latest upgradation,the git plugin has started showing git data for the repositories of our Jenkinsfile as well. This did not happen with the earlier versions of jenkins.
Is there any way around where the git data for the service is being shown or downgrade is the only option that we have??
Since there is no obvious issue report (as seen in this search query) which matches your issue, for the Git Jenkins plugin, the next steps would be:
to confirm this is linked to Jenkins (downgrade)
or linked to the plugin (keep 2.289.1 and downgrade the plugin)
or linked to another plugin
And then report the bug for the appropriate Jenkins component (Jenkins core, or one of its plugins).
We have one project configured as multibranch pipeline project with branch filtered master and development. After few hours the master branch is disabled with a strikethrough symbol across its name and build option not available .
When clicked on "Scan Multibranch Pipeline", it enabled the branch and pipeline logs show "Branch ReOpened".
Initially we assumed it would be because of Option "Exclude branches included in pull request" but enabling "All branches" too is disabling the master branch time and time again.
Pipeline Logs are not providing any clear indication of whats happening causing it to disable .Please help .
Old topic but I faced the same error today but the solution was different.
The error was in the configuration of branch discovery
Discover branches > Strategy. I was using Exclude branches that are also filed as PRs
And there was a PR targeting this branch. Change for All branches did the trick.
This looks like a bug to me. First I'll go to http://[jenkins]/log/all to see if there are any interesting logs there, then I would open an issue on https://issues.jenkins.io/secure/Dashboard.jspa
Also this issue might be happening after a recent upgrade of jenkins plugins or jenkins itself, I would downgrade everything to try to get my jenkins back to the way it was, then upgrade the plugins one by one or few by few to try to isolate what is causing the issue.
Finally, if you have jobdsl scripts, I would check these scripts to see if there is not a script that when executed is recreating the job and overrides the disabled status
Not sure if you're using Bitbucket Branch Source plugin for hook on Jenkins, but I had the same issue on 737.vdf9dc06105be version. Everytime I pushed a change to branch (not pull request) it got disabled (strikethrough). Scan multibranch pipeline was restoring it until next push notification on webhook was performed.
Upgrading the plugin to 751.vda_24678a_f781 version resolved the issues:)
My pipeline creation is stuck at pending stage on Jenkins server. Nothing shows up on dashboard even after an hour. Tried multiple times but no luck.
When I try from my local Jenkins, it easily creates the pipeline for the same Git repository.
Solved this by updating Git API and Blueocean plugins in Jenkins to the latest version.
I'm using the Bitbucket Branch Source Plugin to automatically configure multibranch pipeline jobs for every repo under a specific project directory within Bitbucket. One repo contains a valid Jenkinsfile. The master branch for that repo builds and deploys fine. However, pull requests for that repo are not being built. I see the following logs:
Connecting to <URL> using <credentials>
Looking up repositories of team <Project>
Proposing test-project
Connecting to <URL> using <credentials>
Looking up <Project>/test-project for branches
Checking branch master from <Project>/test-project
Met criteria
Looking up <Project>/test-project for pull requests
Checking PR from ~<user>/test-project and branch feature/thing
Does not meet criteria
The specified branch for the pull request does contain a Jenkinsfile, so I do not understand why it says that the criteria are not met. Any suggestions?
The "Automatic branch project triggering" option is set to the default .*
I'm using the following plugins to Jenkins:
Bitbucket Branch Source Plugin 1.8
Branch API Plugin 1.10.2
GIT Plugin: 2.4.0
Pipeline 2.4
Pipeline: Multibranch 2.8
Pipeline: SCM Step 2.2
SCM API Plugin 1.3
... others omitted for brevity
Well, I feel dumb.
Jenkins did not have read permission on <user>'s fork of the repo containing the branch for the PR.
When you make a PR, all the users with access to the repository receiving the PR are able to view it without issue, so this may be an issue with Bitbucket Server itself (I'm on 4.2.0) not allowing those users to have remote read access to that branch once it has been included in a PR.
Since I'm using Gitflow all my branches include a slash. Like "feature/awesome-feature".
When I try to tell Jenkins to build this branch it throws an error "ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job."
Is it possible to use "/" in branch names at all? The issue was reported/fixed/unfixed numerous times. So I'm not sure about the current state.
Yes I build branches like this all the time and it works just fine.
Set your branch as "refs/heads/feature/awesome-feature"
Which version of jenkins are you on?
I'm on 1.580.3
Do you have any commits yet? If your repo is empty, it would have no HEAD, and therefore no branch, as in this question: While building a git project from jenkins it shows an error like couldn't find any revision to build