Skip to content

Commit

Permalink
17357 jenkins(jobs): add missing build result
Browse files Browse the repository at this point in the history
The 'not_built' build result was missing from our internal state
mapping, causing our plugin to crash upon receiving this value from the
Jenkins API.

Closes: #730
Co-authored-by: Logan Connolly <[email protected]>
Change-Id: I1f2f134455ed7ee9e5320766bdd5a7e46a6fc18d
  • Loading branch information
vafhornung and logan-connolly committed Nov 8, 2024
1 parent 53f765a commit 0dc5b7c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .werks/17357
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Title: Add missing Jenkins Job build result
Class: fix
Compatible: compat
Component: checks
Date: 1731057198
Edition: cre
Level: 1
Version: 2.2.0p37

Add <code>not_null</code> build result option to Jenkins Job parameters as it is a valid
build state that can be returned by the Jenkins API.
1 change: 1 addition & 0 deletions cmk/base/plugins/agent_based/jenkins_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
# The 'null' build state is only valid in Jenkins <= v1.622 - relevant commit:
# https://github.com/jenkinsci/jenkins/commit/90f29f8cbc68312cbdbef8d4101fa5b5e971e021
"null": State.WARN, # module was not built (legacy)
"not_built": State.WARN, # module was not built
"none": 0, # running
}

Expand Down
7 changes: 7 additions & 0 deletions cmk/gui/plugins/wato/check_parameters/jenkins_jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,13 @@ def _parameter_valuespec_jenkins_jobs():
default_value=1,
),
),
(
"not_built",
MonitoringState(
title=_("State when last build result is: module not built"),
default_value=1,
),
),
(
"none",
MonitoringState(
Expand Down

0 comments on commit 0dc5b7c

Please sign in to comment.