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

Automatically select/build the latest svn tag (via "List Subversion tags" build params?)

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor Minor
    • subversion-plugin
    • None

      My use case is that I want jenkins to automatically build new tags when they are created, so jenkins should somehow automcatically choose the latest tag.

      The "List Subversion tags" already allows to limit the tags to only 1, and with "Sort newest first" it actually shows the latest tag, but this cannot be chosen automatically.

      To select the latest tag automatically I can think of an option "Select newest automatically".

      This build param (newest tag) should be used in scm polling and also when a manual build is triggered.

          [JENKINS-14155] Automatically select/build the latest svn tag (via "List Subversion tags" build params?)

          How would this play with other parameters? It would seem that either this would have to be the only parameter, or all the other parameters would have to have valid defaults for a build to automatically launch.

          Daniel Kirkdorffer added a comment - How would this play with other parameters? It would seem that either this would have to be the only parameter, or all the other parameters would have to have valid defaults for a build to automatically launch.

          Yes, that would be the consequence. So this would have to be proper documented.

          Martin Grotzke added a comment - Yes, that would be the consequence. So this would have to be proper documented.

          Dmitry Kozlov added a comment - - edited

          Hi Guys,

          This feature would be highly appreciated, as it allows to properly automate RC tags processing.

          Regarding other parameters - I think the default logic (we already have) should work fine here.
          We're already able to configure parameterized job to run on scm change using default param values. What makes it different when [List Subversion tags] field is used?
          I.e. if there is a triggered build with validating params and no proper defaults provided - it just fails and doesn't start till next triggering event like SCM change (or new tag created), otherwise default values applied.

          Actually, what I'd be looking for is a NewTag-SCMTrigger with tag base/mask configurable similar to [List Subversion tags].

          Think of it as of traditional SCM polling build trigger. It's just that we use "new tag" category rather than "new commits".

          (Sounds like a separate feature request that deserves new JIRA item )

          But this particual JIRA implementation should also be helpfull as it allows to trigger builds remotely, e.g. from script.

          Kind regards,
          Dmitry.

          Dmitry Kozlov added a comment - - edited Hi Guys, This feature would be highly appreciated, as it allows to properly automate RC tags processing. Regarding other parameters - I think the default logic (we already have) should work fine here. We're already able to configure parameterized job to run on scm change using default param values. What makes it different when [List Subversion tags] field is used? I.e. if there is a triggered build with validating params and no proper defaults provided - it just fails and doesn't start till next triggering event like SCM change (or new tag created ), otherwise default values applied. Actually , what I'd be looking for is a NewTag-SCMTrigger with tag base/mask configurable similar to [List Subversion tags] . Think of it as of traditional SCM polling build trigger. It's just that we use "new tag" category rather than "new commits" . (Sounds like a separate feature request that deserves new JIRA item ) But this particual JIRA implementation should also be helpfull as it allows to trigger builds remotely, e.g. from script. Kind regards, Dmitry.

          Hi Guys,
          I implemented most of the items of this tickets (https://github.com/jenkinsci/subversion-plugin/pull/40/commits).

          But I'm still missing the described option "Select newest automatically". Can someone add this option?

          On my implementation when you limit the tags to only 1, and with "Sort newest first" it's automatically enabled.

          Kind regards,
          Pedro

          Pedro Goncalves added a comment - Hi Guys, I implemented most of the items of this tickets ( https://github.com/jenkinsci/subversion-plugin/pull/40/commits ). But I'm still missing the described option "Select newest automatically". Can someone add this option? On my implementation when you limit the tags to only 1, and with "Sort newest first" it's automatically enabled. Kind regards, Pedro

          S B added a comment -

          Hi Guys,

          Do we have this option enabled as to "select newest automatically" in List Subversion tags while polling in CI builds.

          S B added a comment - Hi Guys, Do we have this option enabled as to "select newest automatically" in List Subversion tags while polling in CI builds.

          Hi S B,
          Sorry, I just made a fresh install from Jenkins, and I don't see this option there. Can you show us ?

          kind regards,

          Pedro Goncalves added a comment - Hi S B, Sorry, I just made a fresh install from Jenkins, and I don't see this option there. Can you show us ? kind regards,

          S B added a comment -

          Hi Pedro,

          I am also seeing no as such option as i mentioned in this plugin ,so I am looking for the same and asking if anyone has already implemented it as I am eagerly looking for.

          Best Regards,

          S B added a comment - Hi Pedro, I am also seeing no as such option as i mentioned in this plugin ,so I am looking for the same and asking if anyone has already implemented it as I am eagerly looking for. Best Regards,

          S B added a comment -

          this is the issue i raised looking for the same feature: https://issues.jenkins-ci.org/browse/JENKINS-22274

          S B added a comment - this is the issue i raised looking for the same feature: https://issues.jenkins-ci.org/browse/JENKINS-22274

          Hi S B, sorry, I though you made an affirmation, not a question. This issue (feature) is not Done.

          Pedro Goncalves added a comment - Hi S B, sorry, I though you made an affirmation, not a question. This issue (feature) is not Done.

          er gt added a comment -

          Is anyone working on this?
          The feature that we can check the option "Select newest automatically" is urgently needed.

          er gt added a comment - Is anyone working on this? The feature that we can check the option "Select newest automatically" is urgently needed.

          Hi er gt, Looks like it's no one was able to help me. Christoph Kutzinski Made some observations on my pull request (https://github.com/jenkinsci/subversion-plugin/pull/40) but no movement so far.

          Kind regards,

          Pedro Goncalves added a comment - Hi er gt, Looks like it's no one was able to help me. Christoph Kutzinski Made some observations on my pull request ( https://github.com/jenkinsci/subversion-plugin/pull/40 ) but no movement so far. Kind regards,

          Oleg Nenashev added a comment -

          Please don't forget to update assignments.
          Just for tracking and preventing double efforts on hot issues...

          Oleg Nenashev added a comment - Please don't forget to update assignments. Just for tracking and preventing double efforts on hot issues...

          Please take a note on my comments in JENKINS-19560

          In was thinking of a more general approach on selecting the DEFAULT value
          which would help us a lot if it was implemented that way!

          Thank you very much!

          Tom Ghyselinck added a comment - Please take a note on my comments in JENKINS-19560 In was thinking of a more general approach on selecting the DEFAULT value which would help us a lot if it was implemented that way! Thank you very much!

          er gt added a comment -

          Just curious: Is there coming a new version of the subversion plugin or not?

          er gt added a comment - Just curious: Is there coming a new version of the subversion plugin or not?

          Huy Phu added a comment - - edited

          I also have same issue using "List Subversion tag" where latest or newly created tag is picked by manual builds. However, automated build through SCM Polling fails to pickup or recognize latest tag. I setup "List Subversion tag" similar to the following:

          Name = SVN_TAG
          Repository URL = <my_url>/tags (https://my_domain/svn/my_groupID/my_artifactID/tags)
          Maximum tags to display = 1
          Sort newest first = true

          Is there fix for this by any chance?

          Thanks!

          Huy Phu added a comment - - edited I also have same issue using "List Subversion tag" where latest or newly created tag is picked by manual builds. However, automated build through SCM Polling fails to pickup or recognize latest tag. I setup "List Subversion tag" similar to the following: Name = SVN_TAG Repository URL = <my_url>/tags ( https://my_domain/svn/my_groupID/my_artifactID/tags ) Maximum tags to display = 1 Sort newest first = true Is there fix for this by any chance? Thanks!

          pmoranga, Are you working on this?

          Manuel Recena Soto added a comment - pmoranga , Are you working on this?

          Code changed in jenkins
          User: Manuel Recena
          Path:
          src/main/java/hudson/scm/listtagsparameter/ListSubversionTagsParameterDefinition.java
          http://jenkins-ci.org/commit/subversion-plugin/5012326e8dc523e5e7706839b7853a86b1f3dce5
          Log:
          JENKINS-14155 Automatically select the first option of tags listing if default value is not defined

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Manuel Recena Path: src/main/java/hudson/scm/listtagsparameter/ListSubversionTagsParameterDefinition.java http://jenkins-ci.org/commit/subversion-plugin/5012326e8dc523e5e7706839b7853a86b1f3dce5 Log: JENKINS-14155 Automatically select the first option of tags listing if default value is not defined

          Code changed in jenkins
          User: Manuel Recena
          Path:
          src/main/java/hudson/scm/listtagsparameter/ListSubversionTagsParameterDefinition.java
          http://jenkins-ci.org/commit/subversion-plugin/d66d0565484bd96e561d8d6dd4f515b9b7132f46
          Log:
          Merge pull request #148 from recena/JENKINS-14155

          JENKINS-14155 Automatically select the first option of tags listing if default value is not defined

          Compare: https://github.com/jenkinsci/subversion-plugin/compare/7e586e7a7867...d66d0565484b

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Manuel Recena Path: src/main/java/hudson/scm/listtagsparameter/ListSubversionTagsParameterDefinition.java http://jenkins-ci.org/commit/subversion-plugin/d66d0565484bd96e561d8d6dd4f515b9b7132f46 Log: Merge pull request #148 from recena/ JENKINS-14155 JENKINS-14155 Automatically select the first option of tags listing if default value is not defined Compare: https://github.com/jenkinsci/subversion-plugin/compare/7e586e7a7867...d66d0565484b

          pras sawant added a comment -

          Is this fixed , I am using Jenkins ver. 1.652 and subversion plugin 2.5.7
          I also have same issue using "List Subversion tag" where latest or newly created tag is picked by manual builds. However, automated build through SCM Polling fails to pickup or recognize latest tag. I setup "List Subversion tag" similar to the following:
          Name = SVN_TAG
          Repository URL = <my_url>/tags
          Maximum tags to display = 1
          Sort newest first = true

          Subversion's Repository URL - <my_url>/tags/$SVN_TAG

          Thanks!
          Prashant
          prashant.sawant@mastek.com

          pras sawant added a comment - Is this fixed , I am using Jenkins ver. 1.652 and subversion plugin 2.5.7 I also have same issue using "List Subversion tag" where latest or newly created tag is picked by manual builds. However, automated build through SCM Polling fails to pickup or recognize latest tag. I setup "List Subversion tag" similar to the following: Name = SVN_TAG Repository URL = <my_url>/tags Maximum tags to display = 1 Sort newest first = true Subversion's Repository URL - <my_url>/tags/$SVN_TAG Thanks! Prashant prashant.sawant@mastek.com

          Christoph Bro added a comment -

          Is this fixed? is there a Status?

          Christoph Bro added a comment - Is this fixed? is there a Status?

            recena Manuel Recena Soto
            martin_grotzke Martin Grotzke
            Votes:
            10 Vote for this issue
            Watchers:
            19 Start watching this issue

              Created:
              Updated:
              Resolved: