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

Cannot use Jenkins variable to override Release Number after plugin upgrade to 3.0

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Critical Critical
    • None
    • Jenkins 2.204.1
      BuildMaster plugin 3.0.0

      After upgrading to 3.0 of the plugin I can no longer specify the Release Number with a variable as I could before in the Create Build and Deploy Build tasks.
      This in the classic Jenkins job mode.

      We run multiple release builds simultaneously at times so I need to be able to specify it via a variable otherwise we have to have have extra jobs and hard code the release number as we cannot use Latest Active Release. 

      Having the ability to override it in the both tasks or even better would be to have the override in the Inject BuildMaster release details step that would then set the buildmaster_release_number variable for the other BM tasks.

      I have not tried yet in declarative script mode yet but this would be needed there as well. 

      I am going to have to downgrade to the older 2.4.0 version of the plugin for now but I don't know if that version will work with BuildMaster 6.2 when it comes out. 

          [JENKINS-60613] Cannot use Jenkins variable to override Release Number after plugin upgrade to 3.0

          Jon Starbird added a comment -

          I sort of thought doing that might prove difficult. It's solvable in other ways so it really is not a big deal.

          I had used that plugin before on an older server but I had to drop it as it ended up causing the server to become corrupted, or rather the scriptler portion. I never used the scriptler portion but it eventually made it so the Jenkins server could not be upgraded. I never had a chance to dig real deep into it.

          Then with Scriptler is of course a security issue plugin which here I cannot risk using. 

          Anyway, thanks for spending the time to look into it. 

          Have a great year!

          Jon Starbird added a comment - I sort of thought doing that might prove difficult. It's solvable in other ways so it really is not a big deal. I had used that plugin before on an older server but I had to drop it as it ended up causing the server to become corrupted, or rather the scriptler portion. I never used the scriptler portion but it eventually made it so the Jenkins server could not be upgraded. I never had a chance to dig real deep into it. Then with Scriptler is of course a security issue plugin which here I cannot risk using.  Anyway, thanks for spending the time to look into it.  Have a great year!

          Andrew Sumner added a comment -

          I haven't given up yet, there is one more thing I want to try .

          Scriptler is an optional component, it can all be done within the active choice plugin.  Scriptler was just a little tidier which is why I documented that approach.

           

          Andrew Sumner added a comment - I haven't given up yet, there is one more thing I want to try . Scriptler is an optional component, it can all be done within the active choice plugin.  Scriptler  was just a little tidier which is why I documented that approach .  

          Andrew Sumner added a comment -

          Good news, I've finally got this working. The solution ended up being rather simple - around 20 lines of code. Shame the Jenkins documentation is garbage, it should have been much easier to get this up and running.  

          I've got a bit more testing to do but should have a new release out in the next few days.

          Andrew Sumner added a comment - Good news, I've finally got this working. The solution ended up being rather simple - around 20 lines of code. Shame the Jenkins documentation is garbage, it should have been much easier to get this up and running.   I've got a bit more testing to do but should have a new release out in the next few days.

          Jon Starbird added a comment -

          Great. I'll keep an eye out for it.  Thanks!

          Jon Starbird added a comment - Great. I'll keep an eye out for it.  Thanks!

          Andrew Sumner added a comment -

          I've released version 3.1 to support this. Let me know how it goes. As a first cut the cascading dropdown was easier to implement as a single parameter with two dropdowns, so let me know how this goes - and whether you need a build number dropdown as well.

          I would still like to seperate this out into seperate parameters and get a similar behviour to active choices so depending on time constraints I will continue to play with this.

          Andrew Sumner added a comment - I've released version 3.1 to support this. Let me know how it goes. As a first cut the cascading dropdown was easier to implement as a single parameter with two dropdowns, so let me know how this goes - and whether you need a build number dropdown as well. I would still like to seperate this out into seperate parameters and get a similar behviour to active choices so depending on time constraints I will continue to play with this.

          Jon Starbird added a comment -

          Put on my test server, works great. Not sure you need to do it any differently but up to you. 

          Thank you!

          Jon Starbird added a comment - Put on my test server, works great. Not sure you need to do it any differently but up to you.  Thank you!

          Andrew Sumner added a comment -

          I've got this working with seperate parameters and even support builds as well as application and release. I've got this sitting in a seperate branch and I'm not planning on releasing it for the moment unless anyone asks for it, so if you ever want to move in that direction let me know

          Andrew Sumner added a comment - I've got this working with seperate parameters and even support builds as well as application and release. I've got this sitting in a seperate branch and I'm not planning on releasing it for the moment unless anyone asks for it, so if you ever want to move in that direction let me know

          Jon Starbird added a comment -

          actually that would be great. just the other day I was thinking about asking if selecting builds would be possible but it wasn't a critical thing

          Jon Starbird added a comment - actually that would be great. just the other day I was thinking about asking if selecting builds would be possible but it wasn't a critical thing

          Andrew Sumner added a comment -

          Just to let you know - I haven't forgotten about this. I am in the process of moving house so I haven't had much spare time lately. This change is ready to go.

          However... the BuildMaster 6.2.5 release has a bug in one of the APIs used by the "wait for build to complete" option. There where a couple of other minor changes to the API but those were easily fixed. As soon as I have a fix for this I will be getting a new version out.

          Andrew Sumner added a comment - Just to let you know - I haven't forgotten about this. I am in the process of moving house so I haven't had much spare time lately. This change is ready to go. However... the BuildMaster 6.2.5 release has a bug in one of the APIs used by the "wait for build to complete" option. There where a couple of other minor changes to the API but those were easily fixed. As soon as I have a fix for this I will be getting a new version out.

          Jon Starbird added a comment -

          No worries. I'm not ready to move to 6.2.x of BM yet anyway. 

          thanks for the update. Good luck with the move.

          Jon Starbird added a comment - No worries. I'm not ready to move to 6.2.x of BM yet anyway.  thanks for the update. Good luck with the move.

            andrewsumner Andrew Sumner
            jstarbird Jon Starbird
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: