Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-15209

Only update perforce label if it's not locked.

      There's a post build action to label a Jenkins build. There's already a configuration option to only do this if the build is successful, there should also be an option to only update the label if it is not already locked.

          [JENKINS-15209] Only update perforce label if it's not locked.

          Rob Petti added a comment -

          What use would an option for this be? You can't update the label if it's locked, so maybe the plugin should just not attempt to update locked labels at all.

          Rob Petti added a comment - What use would an option for this be? You can't update the label if it's locked, so maybe the plugin should just not attempt to update locked labels at all.

          Verbitan added a comment -

          That would also work. Currently if the label is locked, the plugin just goes and unlocks it for you.

          What would the desired behaviour be when the plugin tries to update a locked label? Failing the entire build seems a little draconian, however you'd still want to know if the labelling failed...

          Verbitan added a comment - That would also work. Currently if the label is locked, the plugin just goes and unlocks it for you. What would the desired behaviour be when the plugin tries to update a locked label? Failing the entire build seems a little draconian, however you'd still want to know if the labelling failed...

          Rob Petti added a comment -

          Maybe that's a good reason for having an option. Something like "Fail the build if label is locked"?

          Rob Petti added a comment - Maybe that's a good reason for having an option. Something like "Fail the build if label is locked"?

          Verbitan added a comment -

          Yup agreed, that makes a lot of sense. I've just had a quick look at the tek42 library that you use, and it doesn't seem to support checking if a label is locked. I'm not sure how hard it would be to add support for that.

          Verbitan added a comment - Yup agreed, that makes a lot of sense. I've just had a quick look at the tek42 library that you use, and it doesn't seem to support checking if a label is locked. I'm not sure how hard it would be to add support for that.

            Unassigned Unassigned
            verbitan Verbitan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: