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.
Related
I have started learning Jenkins recently.
I installed docker on a server which I created on AWS server and using docker I have installed Jenkins.
I wanted to test a Hello pipeline stage by creating new item, but when I go to the pipeline tab I cant see any options like pipeline script or pipeline script from SCM . I have installed git plugin and pipeline plugin also seems to be installed successfully. I am not able to continue my study further. I will be really thankful if someone can help me here.
In reality the pipeline plugin is not just one plugin but a bunch of 6 to 8 plugins. So you may want to install all the pipeline related items in your available plugins section of Manage Jenkins. Once this is done, a reboot of Jenkins is required for the changes to take effect. Here are some of them:
https://plugins.jenkins.io/build-pipeline-plugin/
https://www.jenkins.io/doc/pipeline/steps/pipeline-build-step/
https://plugins.jenkins.io/pipeline-stage-view/
We are using Multi-branch pipeline Jenkins jobs with SCM sync
Configuration plugin installed. Since few days a warning is being popping up at the end of Jenkins console. Can anyone explain what it is trying to inform us.
Error: Delete jobs/wbe-middle-layer-inbound/branches/feature-LMS-4271-Release2.83lj1k
Here we in git we don't have branch feature-LMS-4271-Release2.83lj1k under wbe-middle-layer-inbound repo but having feature-LMS-4271-Release2.
Periodically the multi-branch pipeline job just scan your repo to determine if any of it's branches meet the criteria for a pipeline to be created for them. It also tells you the pipelines it deletes because the branch that it was matched to is no longer there. Could that be what you're seeing?
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.
We are using jenkins for manual triggered jobs to deploy some code.
Jenkinsfile describing our pipeline is located in a jenkinsfile dedicated repo (not in deployed code repo).
We are using declarative pipeline syntax and shared libraries in our jenkinsfiles.
In BlueOcean interface there are 2 interesting attributes (branch and commit) automatically filled when using plugins to trigger pipelines (like github organization).
I'm searching a way to set/update these 2 attributes manually from within the pipeline code for our manual pipelines.
Job description and name can be easily updated using something like :
stage('Set pipeline description'){
steps {
script {
currentBuild.description = "Deploying branch ${branch} on ${targetEnv}"
}
}
}
But I didn't find anywhere how to update branch or commit values.
Did anybody try this ?
This issue is reported as bug (see link).
"We are using GitLab web hooks to trigger Jenkins Pipeline project builds on new commit push to GitLab. Build is triggered, CI commit status report is being sent back to gitlab, but can't see branch and commit field in Header-details element."
Please vote on this issue on Jenkins CI website if you want for the issue to be resolved sooner.
I am using Jenkins 2.73.2 with Blue ocean 1.3.1 in the Linux Redhat. I wanted to build maven project located at GitHub repository. I have created a JenkinsFile for a blue ocean pipeline and recently updated it with some changes which were saved successfully on GitHub repository. But when I am running the pipeline again it is still running the old JenkinsFile.
So I checked the workspace of Jenkins and found that the folder for that pipeline was not updated and has old JenkinsFile which is causing this issue. Now I am stuck and don't know where did I go wrong or what I have missed in configuration/settings?
As susmit says in a comment,
This issue got resolved when I used the option available in the jobs where we can clear the workspace before running any jobs.
to avoid this problem you can use the option "Clear Workspace before running job" available in the jobs parameters.