Skip to content
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

[JENKINS-64324] Truncate version label at first slash #234

Merged
merged 1 commit into from Nov 27, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -238,6 +238,13 @@ protected PlatformDetails computeLabels(
if (computedVersion.equals(UNKNOWN_VALUE_STRING)) {
computedVersion = getRedhatReleaseIdentifier("VERSION_ID");
}
/* JENKINS-64324 notes that labels with '/' break various Jenkins components */
/* For example, Debian testing reports its version as "testing/unstable" */
/* Take the portion of the version string that precedes the '/' character */
if (computedVersion.contains("/")) {
int slashLocation = computedVersion.indexOf("/");
computedVersion = computedVersion.substring(0, slashLocation);
}
if (computedName.equals(UNKNOWN_VALUE_STRING)) {
computedName = getSuseReleaseIdentifier("ID");
}
Expand Down