-
Notifications
You must be signed in to change notification settings - Fork 348
fix(jenkins): resolve startup crash after upgrade to 2.555.1 #2169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,8 +13,7 @@ jenkins: | |
| password: "admin" | ||
| authorizationStrategy: loggedInUsersCanDoAnything | ||
| crumbIssuer: | ||
| standard: | ||
| excludeClientIPFromCrumb: false | ||
| standard: {} | ||
| nodes: | ||
| - permanent: | ||
| labelString: "docker jenkins agent" | ||
|
|
@@ -23,7 +22,8 @@ jenkins: | |
| credentialsId: "jenkins-ssh-agent-private-key" | ||
| host: "desktop-jenkins_agent-1" | ||
| port: 22 | ||
| sshHostKeyVerificationStrategy: "nonVerifyingKeyVerificationStrategy" | ||
| sshHostKeyVerificationStrategy: | ||
| nonVerifyingKeyVerificationStrategy: {} | ||
|
Comment on lines
24
to
+26
|
||
| name: "docker-ssh-jenkins-agent" | ||
| nodeDescription: "ssh jenkins docker agent " | ||
| remoteFS: "/home/jenkins/agent" | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This log-capture step can fail (and exit early) if no container name matches
controller: with the default GitHub Actions bash settings (-eandpipefail),grep controllerreturning 1 inside the command substitution will cause the whole step to error. Make the controller lookup non-fatal (e.g., add|| true, usegrep -m1 ... || true, or use anawkfilter that exits 0 when no match) so the diagnostics step reliably runs on failures.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot Good catch. The
grep controller | head -1pipeline inside the command substitution will exit 1 when no container matches under bash's default-e/pipefailsettings, defeating the purpose of a failure-diagnostics step. The suggested|| truefix is the right approach. Will update to:CTRL=$(docker ps -a --format "{{.Names}}" | grep -m1 controller || true)This also eliminates the
head -1pipe sincegrep -m1stops after the first match.