Skip to content

[JENKINS-1047] JOB_NAME doesn't contain enough information in Matrix builds #315

Closed

Description

@jenkins-infra-bot

Currently if you use the JOB_NAME variable in your build file with a regular
build, the name of the build that was specified for the project is captured. If
you use JOB_NAME in a matrix build, a 'label=XYZ' is captured which is good, but
the actual name of the project is lost. This causes an issue if you have
special builds for different branches and write the JOB_NAME variable into files
that are used at runtime. you end up with multiple different builds having the
same "label=XYZ" even if they are from separate branches.

What would be nice is if the name of the project is captured, as well as the label.

eg. "Project X_cool_branch-label=XYZ" instead of label=XYZ


Originally reported by kundertk, imported from: JOB_NAME doesn't contain enough information in Matrix builds
  • status: Closed
  • priority: Major
  • component(s): matrix-project-plugin
  • resolution: Fixed
  • resolved: 2007-11-29T21:52:24+00:00
  • votes: 0
  • watchers: 0
  • imported: 2025-12-06
Raw content of original issue

Currently if you use the JOB_NAME variable in your build file with a regular build, the name of the build that was specified for the project is captured. If you use JOB_NAME in a matrix build, a 'label=XYZ' is captured which is good, but the actual name of the project is lost. This causes an issue if you have special builds for different branches and write the JOB_NAME variable into files that are used at runtime. you end up with multiple different builds having the same "label=XYZ" even if they are from separate branches.

What would be nice is if the name of the project is captured, as well as the label.

eg. "Project X_cool_branch-label=XYZ" instead of label=XYZ

  • environment: Platform: All, OS: All

Activity

  1. jenkins-infra-bot commented on Nov 29, 2007

    @jenkins-infra-bot
    Author
    kohsuke:

    Fixed in 1.160.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions