1919
repost from /r/jenkinsci using @r_channels
Anyone else tired of Jenkins Stage View randomly disappearing? Found a solution that actually works
This is driving me crazy. Stage View just vanishes from my job pages randomly. I'll be looking at a pipeline, refresh the page, and it's gone. Sometimes it comes back after like 30 minutes, sometimes I have to restart Jenkins.
Thought it was just me but found some old threads about this. Apparently it's a known issue that never got fixed properly.
Someone mentioned Pipeline Graph View plugin as an alternative. Tried it out and wow... why didn't I do this sooner? No more disappearing acts, loads way faster, and you can actually see what's happening in real time.
Only thing is you need a newer Jenkins version (2.479.3+). Had to upgrade from 2.401 but whatever, probably should have done that anyway.
Anyone else dealing with Stage View being unreliable? Starting to think I should just ditch it completely. The Graph View thing seems way more solid.
btw wrote up my experience switching over if anyone's curious: https://medium.com/p/77b32213dd68
https://redd.it/1lhi4oa
@jenkinsci
Automating Jenkins with Configuration as Code (JCasC)
https://buildkite.com/resources/blog/automating-jenkins-with-jcasc-configuration-as-code/
https://redd.it/1lg7cgo
@jenkinsci
Junit hangs and eventually kills agent
I have this open issue https://github.com/jenkinsci/junit-plugin/issues/693#issuecomment-2813506800 that hasn't seen much love. I wonder if anyone here could help?
The basic problem is that we have a new installation of Jenkins that we're migrating pipelines to. Most stuff works but when it tries to process junit files it hangs. The junit XML is around 30Mb and we've had a bit of success by splitting the file and processing it in chunks, however it still happens and can be a major problem.
There's more info in the post above. Note since the post we have tried upgrading to the latest versions of Jenkins LTS and plugins, Java 21 and Rocky 9.6. Seems to happen on Ubuntu agents too. The controller is in AWS ECS using the official Jenkins docker container image.
Thanks!
https://redd.it/1lfdlw2
@jenkinsci
How do I make the pipeline trigger at a random time between certain hours, every time?
\[please be gentle, this is my first time meddling with pipeline triggers, cron jobs or groovy\]
hi there!
at work we have a bunch of jenkins pipelines that trigger every night, and to ease the workload on the servers, we have specified to start the pipeline at a random time between 2 and 6am. or so we thought. it turns out that only the first night will actually be random, and every subsequent night it will trigger at the exact same time as the first night.
how could we/i mitigate this?
at the moment we have it like this:
def jobTrigger = 'H H(2-5) * * *'
triggers{ cron("${jobTrigger}") }
as said before, ideally we would like each pipeline to trigger at a different time each night between 2 and 6am.
is there a way to, idk, work variables into the cron job that we can then fill with random numbers? is it possible to have this be random each night at all?
thanks in advance!
https://redd.it/1ldo3hi
@jenkinsci
Groovy script on the slave
Hi, to reduce the workload on our jenkins master we would like to run grooy code (stored in shared library) inside the slaves (containers running on a k8s cluster), does anyone know if it is possible?
https://redd.it/1l9ncnv
@jenkinsci
Any course recommendations for Jenkins on Coursera or Udemy?
I was recently assigned to supervise a team of 6 developers. I am from full-stack background with around 6+ YOE having knowledge in Python, Django, React, Docker, Kubernetes. I was asked to go through Jenkins so that what the team does make sense to you. There is 1 guy who has expertise in Jenkins who would be reporting to me.
I don't aim to become an expert in Jenkins, just wanted to familiarise myself with Jenkins. Any course recommendations preferably not more than 15 hours long which would help me get started with Jenkins? Any other resource like Ebook, Youtube channel would also work.
https://redd.it/1l9d7cj
@jenkinsci
Issue with Git Credential Access in Jenkins on Mac (M1 & Intel) – "fatal: could not read Username"
I'm using Jenkins to build on Mac M1, Mac Intel, and Linux test machines.
In my [`build.sh`](http://build.sh/) script, I need to clone a private Git repository.
On Linux, I successfully used `libsecret` to store credentials, and it works without any prompt.
However, on Mac (both M1 and Intel), the clone fails with the following error:
fatal: could not read Username for 'https://some_repo.com': Device not configured
I've tried the following on Mac:
* Stored credentials in `~/.git-credentials`
* Configured Git with `git config --global credential.helper osxkeychain`
* Verified that `git-credential-osxkeychain` is installed
* Stored the username/token in the macOS Keychain
Despite this, Jenkins builds still fail at the Git clone step due to the missing credentials. Running the same script manually (outside Jenkins) works fine.
**Has anyone encountered this issue or have suggestions on how to properly configure Git credentials for Jenkins on macOS?**
https://redd.it/1l3x96g
@jenkinsci
Jenkins pipeline script with two SCM
Hey guys, basically I'm dealing with a situation. We have two repositories (BitBucket and Github) and I wrote a pipeline script that pulls a dockerfile from GH and the rest of the code from Bitbucket. We have a lot of stages inside the script, so for example, if we have a change in GH, it will deploy the whole build (obviously lol). Essentially, what I want is that when there are changes in GitHub, doesn't deploy the whole build. Only if it has changes in Bitbucket and then clones the GH repository with his current state.
So far I had something like this, but it didn't work:
stage('Clone GitHub repo)') {
steps {
withCredentials(
usernamePassword(
credentialsId: 'github-credentials-id-example',
usernameVariable: 'GH_USER',
passwordVariable: 'GH_TOKEN'
)
) {
script {
def user = GHUSER
def token = GHTOKEN
def baseRepo = GITHUBREPO.replace("https://", "")
def fullUrl = "https://${user}:${token}@${baseRepo}"
sh '''
set +x
git clone -b "$GITHUBBRANCH" "$fullUrl" Github
'''
}
}
}
}
Thank you in advance!
https://redd.it/1kxh896
@jenkinsci
Difference between step XUnitPublisher and xunit?
What is the difference between
1. https://www.jenkins.io/doc/pipeline/steps/xunit/#xunit-publish-xunit-test-result-report
2. https://www.jenkins.io/doc/pipeline/steps/xunit/#stepclass-xunitpublisher-publish-xunit-test-result-report
https://redd.it/1ktds3i
@jenkinsci
Install Jenkins on AWS: A Complete Step-by-Step Blueprint
https://signiance.com/install-jenkins-on-aws/
https://redd.it/1kr1err
@jenkinsci
Missing Global Tools Configuration setting
I am missing the GTC setting under Manage Jenkins. I have the Jenkins 2.504.1 LTS version for Windows installed. I need it for a Jenkins exercise and assignment that I am working on. Any help on this?
https://redd.it/1kqumry
@jenkinsci
Jenkins 2.504 Very Slow Checkouts
Wondering if anyone has heard of this.
Using Amazon Linux 2023, 4 cores, 16Gb, gp3 volume I recently ran the dnf update and went from Jenkins version 2.492.3-1.1 to 2.504.1-1.1.
Git checkout times on a particular build went from 4.5 sec to 5 minutes 15 seconds. All builds are experiencing this sort of effect.
The build agent has not changed. Examination of the logs makes it look like the checkout is slow to start or the end of checkout is not detected. This is an opinion and not necessarily a fact.
Logging onto the build agent and running the checkout/compile runs in \~ 1.5 minutes.
https://redd.it/1kmuwu9
@jenkinsci
Windows hosted Jenkins node fails to connect to Jenkins server.
Hi Jenkins enthusiasts,
I'm having Jenkins version 2.493.2 and winsw v 2.12.
When I try to run the command: "java -jar agent.jar -url ..." to connect the agent to the Jenkins server, I get the following message: May 09, 2025 1:09:00 AM hudson.remoting.Launcher$CuiListener statusINFO: Failed to connect: Handshake error.May 09, 2025 1:09:00 AM hudson.remoting.Launcher$CuiListener statusINFO: Waiting 10 seconds before retry
On the Jenkins server I can see the following error: 025-05-08 19:38:58.993+0000 [id=31] SEVERE jenkins.InitReactorRunner$1#onTaskFailed: Failed SSHD.initjava.net.BindException: Address already in use: bind
at java.base/sun.nio.ch.Net.bind0(Native Method)
at java.base/sun.nio.ch.Net.bind(Net.java:555)
at java.base/sun.nio.ch.ServerSocketChannelImpl.netBind(ServerSocketChannelImpl.java:337)
at java.base/sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:294)
at java.base/sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:89)
at PluginClassLoader for mina-sshd-api-core//org.apache.mina.transport.socket.nio.NioSocketAcceptor.open(NioSocketAcceptor.java:295)Caused: java.io.IOException: Error while binding on `0.0.0.0/0.0.0.0:8080`
Has anyone any idea how to troubleshoot this?
https://redd.it/1kidbxl
@jenkinsci
Jenkins Windows Installation
https://cubensquare.com/jenkins-windows-installation/
https://redd.it/1kf7w92
@jenkinsci
AI vs ML
https://GitHub.com/AwyNaibaho72
https://redd.it/1kcj55z
@jenkinsci
How to Set Up Jenkins in Docker with Docker-in-Docker (DinD) on Ubuntu ?
https://ariefshaik.hashnode.dev/how-to-set-up-jenkins-in-docker-with-docker-in-docker-dind-on-ubuntu
https://redd.it/1lgj74h
@jenkinsci
Learning Jenkins on the job, I'd like some help
Hey r/jenkinsci,
I'm new to Jenkins, and I've been tasked with building a pipeline for some Spring-based projects. So far, I've created a basic pipeline that compiles the project and deploys both the JAR (to Nexus) and the Docker image (to Harbor). However, there are a few specific tasks I need help with, and I'm not sure how to approach them:
1. I need the pipeline to fail if the branch name doesn't match a specific regex pattern. I don't want to simply skip the build, I want it to actively fail early in the process.
2. Some projects are microservices, and others are just libraries. I’d like to maintain a single, reusable pipeline that can handle both types. Ideally, I’d set up the pipeline (and any shared dependencies or logic) in a separate repository, and have all the individual projects reference that shared pipeline. Is this a common approach in Jenkins? What’s the best way to structure it?
Any tips, example, advice would be appreciated !
https://redd.it/1lfmtip
@jenkinsci
Run your Gatling Enterprise simulations from your Jenkins CI
https://redd.it/1lecgpw
@jenkinsci
Running jenkins pipeline in k8s
I have deployed jenkins in my cluster. I want to know that can I create a pipeline using jenkins helm charts, or is there a way to run pipeline by specifying in groovy script or something in helm itlsef. Finding a declarative way if possible.
https://redd.it/1lai9pw
@jenkinsci
Pull requests init in wrong directory
https://redd.it/1l9ey5s
@jenkinsci
Java8 on Jenkins 2.504
We still have projects that use java8 (temurin) with maven for which we use old jenkins versions, like 2.222 or similar. I'm testing whether we could use a new jenkins (e.g. 2.504) in which we would have both new projects and old ones. Which option did I try (toolchains, agent with java8), I can't run a build with java8 at all, I get errors like this and similar:
[Build testProject\] $ /usr/lib/jvm/temurin-8-jdk/bin/java -Xdiag -cp /mnt/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.14.jar:/mnt/maven/maven-3.8.8-java8/boot/plexus-classworlds-2.6.0.jar:/mnt/maven/maven-3.8.8-java8/conf/logging jenkins.maven3.agent.Maven35Main /mnt/maven/maven-3.8.8-java8 /var/cache/jenkins/war/WEB-INF/lib/remoting-3301.v4363ddcca_4e7.jar /mnt/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-interceptor-1.14.jar /mnt/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.14.jar 43817
Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0
i need project to be compiled with java8.
Maybe someone has run such a variant and could share what principle you used, "to make it work"?
https://redd.it/1l7tbxv
@jenkinsci
Perforce to Jenkins issues
Hello everyone. I am trying to have Jenkins integrate with the p4 plugin for perforce. When I try running a build. it changes the perforce workspace root to the Jenkins workspace root and messes up everything. Is there a way to prevent this.
https://redd.it/1kxo2cz
@jenkinsci
Testing multiple Jenkins DSL scripts in a single test
I am hoping someone can help me, I am pulling my hair out and utterly stumped
I have the following test
https://github.com/REBELinBLUE/jenkins-tests-poc/blob/master/src/test/groovy/JobsScriptsTest.groovytestDslScriptsWithRunScriptruns absolutely fine, to test a single DSL script at a time, but I have scripts that depend on each other, for example foo.groovy creates the folder foo and foo_jobs.groovy creates jobs within that folder, so I run multiple scripts at once using the example in testDslScriptsWithScriptRequestsWithJustBody. The issue with this is that when there is an error it is not easy to see which script it is in as it just outputs Processing provided DSL script
I noticed you can pass the filename to ScriptRequest and then it will output Processing provided DSL script foo.groovy but when I do this, as in testDslScriptsWithFullScriptRequests it errors with
javaposse.jobdsl.dsl.DslScriptException: (JobsScriptsTest.groovy, line 35) No signature of method: static javaposse.jobdsl.dsl.AbstractDslScriptLoader.getPackages() is applicable for argument types: () values:
Debugging it, I can see it is happening here https://github.com/jenkinsci/job-dsl-plugin/blob/7c25ba2b20871e3c7e267fdae16471a0077ed750/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/AbstractDslScriptLoader.groovy#L170 which is only called if the scriptPath is set as in the last example https://github.com/jenkinsci/job-dsl-plugin/blob/7c25ba2b20871e3c7e267fdae16471a0077ed750/job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/AbstractDslScriptLoader.groovy#L93
But I am stumped as to why it is happening. I have stepped through with the debugger on my script, and on this one
https://github.com/jenkinsci/job-dsl-plugin/blob/master/job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/DslScriptLoaderSpec.groovy#L409-L418
and they both look as I would expect but as soon as packages is called in my case it errors
https://preview.redd.it/d2ttephlbh3f1.png?width=1708&format=png&auto=webp&s=44656666d9d92080e64ac428394b5a7bedd0ab84
https://preview.redd.it/p57fa2zmbh3f1.png?width=783&format=png&auto=webp&s=9ff47abd8e7665a7a7703f4533420773178c3184
but on the job-dsl-plugin example
https://preview.redd.it/7fh2lqtvbh3f1.png?width=1387&format=png&auto=webp&s=cef3b399b4a42adcdecfe94ace2c7f457c5c5ae7
https://preview.redd.it/56gy5oqxbh3f1.png?width=573&format=png&auto=webp&s=1fb538bdee6ebb52b5d2d04c4ccef259f9641105
Does anyone have any pointers how I can figure out what is going on?
Thanks
https://redd.it/1kxbif0
@jenkinsci
sheehan/job-dsl-example forked and updated
Hi
I am always using sheehan/job-dsl-gradle-example to build my job-dsl locally before pushing. In the last six years it was not updated. Currently in between jobs so i took some time to try and update it so it works with Java 21, recent Jenkins LTS and recent Gradle Version.
Please be advised that i am in no way proficient in those technologies.
Looking for Feedback here to see if it works for you guys too.
https://github.com/jansenm/job-dsl-gradle-example
Right now there is one big Problem for me. When building the jobs locally i get asked for ssh key passwords repeatedly. I guess that means the jobs immediately run after being created. That did not happen before. I am not sure what exactly triggered this behavior but i suspect the update of the jenkins test harness. I hope someone here knows the solution.
Jobs and views get created successfully now.
https://redd.it/1kr8bq8
@jenkinsci
Any benefit to being on the latest version of java vs java 21?
Any benefit to being on the latest version of java vs java 21?
https://redd.it/1kqulv0
@jenkinsci
Inheritance using K8s Plugin
Just spent 5.5 hrs investigating why I couldn’t set fsGroup security context for an agent that was inheriting from multiple pod templates. I feel both stupid and yet, now slightly enlightened and wanted to share with folks who may know the pain of troubleshooting issues with declarative pipelines using the Kubernetes plugin.
https://redd.it/1kox244
@jenkinsci
Jenkins 403 in traefik logs and 520 in the browser
Hi everyone, I am trying to deploy jenkins.
I can access it using custom hostname and adding it to the /etc/hosts
but when I bind my ingress route with the actual public domain, I am getting error 520 from the browser.
when I checked the logs from the traefik its giving 403.
this is the response from the whoami
Hostname: whoami-64f6cf779d-wzcflIP: `127.0.0.1`IP: `10.42.1.247`RemoteAddr: `10.42.1.65:47170`GET / HTTP/1.1Host: jenkins-***.comUser-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8Accept-Encoding: gzip, brAccept-Language: en-US,en;q=0.7Cdn-Loop: cloudflare; loops=1Cf-Connecting-Ip: 2001:4451:981:9d00:b986:a5ee:d8f:67baCf-Ipcountry: PHCf-Ray: 93fade65b81f04f6-HKGCf-Visitor: {"scheme":"https"}Priority: u=0, iSec-Ch-Ua: "Chromium";v="136", "Brave";v="136", "Not.A/Brand";v="99"Sec-Ch-Ua-Mobile: ?0Sec-Ch-Ua-Platform: "Linux"Sec-Fetch-Dest: documentSec-Fetch-Mode: navigateSec-Fetch-Site: noneSec-Fetch-User: ?1Sec-Gpc: 1Upgrade-Insecure-Requests: 1X-Forwarded-For: 2001:4451:981:9d00:b986:a5ee:d8f:67ba, `10.42.0.0`X-Forwarded-Host: jenkins-***.comX-Forwarded-Port: 443X-Forwarded-Proto: httpsX-Forwarded-Server: traefik-9d5c4656b-mslrnX-Real-Ip: `10.42.0.0`
So, I am using cloudflare flexible and traefik in k3s servers
I tried using traefik plugin to get the real ip, I also tried to put custom header as middleware but no luck.
Any idea?
https://redd.it/1kmfs4k
@jenkinsci
Does your Jenkins ever fail CI jobs… and you have no idea why?
Lately I’ve been noticing this weird pattern:
1. CI jobs fail for no clear reason.
2. I check the logs, nothing useful.
3. I rerun the job — and it passes.
Sometimes it’s a flaky test.
Sometimes it’s an infra hiccup.
Sometimes I don’t even know what fixed it — just that it’s green now.
It’s fine once or twice. But over time, you stop trusting failures.
You just rerun by default. Which kind of defeats the point of CI in the first place.
I’m curious how others deal with this in Jenkins:
* Do you auto-retry jobs?
* Do you track flakes somehow?
* Is there a good way to surface patterns without getting buried in logs?
Would love to hear how other teams stay sane.
(I’m coming from a GitHub Actions-heavy background but we’re exploring Jenkins support now.)
https://redd.it/1kgwmmu
@jenkinsci
List of domains that Jenkins uses to update packages and plugins
The infrastructure on which my Jenkins is deployed has port and domain restrictions, and internet access is also limited.
Please tell me where I can find a list or what domain names and ports need to be added to the allowed ones so that Jenkins can update plugins and packages?
I have already seen this link, which has a link to a json with the described accesses, but there is a list of accesses that Jenkins uses, not the one under them. I will attach a screenshot below
https://www.jenkins.io/templates/updates/
https://preview.redd.it/bwiqqcrlwxye1.png?width=1218&format=png&auto=webp&s=e6bd1df0bc4dc56c12d0193038068e1a4dde5dfe
https://redd.it/1kf86ui
@jenkinsci
Need help on jenkins-cli
As a hands-on experience I automate Jenkins installation with Ansible.
I convert the normal install step to Ansible tasks but I bumped into a few jenkins-cli problems...
Since I don't want any interactive steps during the installation just a nice Jenkins login page when the playbook finished I want to get rid of the Unlock Jenkins wizard page which presented in the initial phase when Jenkins starts.
My approach is to disable the wizard with Groovy (worked) and change the initial password with my password stored in ansible-vault file, BUT jenkins-cli has no such command like set-password.
How could I change the initial password ?
Other Issue!
Since I don't want to use the controller node (master) to build stuffs, during Jenkins setup I want to disable the master node as executor (get the node XML and change the executor to 0) but can't find the proper name for the built-in node when running the jenkins-cli command.
I ran a query in jenkins Script Console to get the node name:
println "Listing Jenkins Computers:"
Jenkins.instance.computers.each { computer ->
println " - Name: '${computer.getName()}', DisplayName: '${computer.getDisplayName()}'"
}
println "Listing Complete."
Listing Jenkins Computers:
- Name: '', DisplayName: 'Built-In Node'
Listing Complete.
Output result shows that computer name is empty ' '
but when try the ' ' or 'master' or 'built-in' with jenkins-cli I got errors like:
java -jar /tmp/jenkins-cli.jar -s http://127.0.0.1:8080 \-auth admin:<initial-password> get-node built-in
ERROR: No such node 'built-in' || 'master' || ' '
Any ide what is the controller node name or what is happening here, why can't I get any result with get-node built-in ?
Jenkins version: 2.492.3
Thanks!
https://redd.it/1kbcuai
@jenkinsci