• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • subversion-plugin
    • None

      In my global configuration, I define a variable as follows:

      BUILD_NAME = ${JOB_NAME}r${SVN_REVISION}_b${BUILD_NUMBER}${BUILD_ID}

      I then use this build name for the naming of folders and artifacts. This seems to work correctly, but about 80% of the time the SVN_REVISION is empty leaving my BUILD_NAME to contain "r" instead of "r####" as expected.

      I have tried using SVN_REVISION_1 as well.

      When I view the environment variables after the build is finished, it shows that both SVN_REVISION and SVN_REVISION_1 are set.

      If this did not work at all I would not have a problem, but the fact that it is seemingly random shows me that it can work but there are some issue that can hopefully be fixed.

          [JENKINS-20447] SVN_REVISION not always set

          Oleg Nenashev added a comment -

          Oleg Nenashev added a comment - Could it be related to https://issues.jenkins-ci.org/browse/JENKINS-20344 ?

          Chris Tobey added a comment -

          No, this is not related.

          I believe it has to do with when different variables are evaluated.

          I think that my configuration was different when I had this working, so the fact that it is not available at all makes more sense.

          Chris Tobey added a comment - No, this is not related. I believe it has to do with when different variables are evaluated. I think that my configuration was different when I had this working, so the fact that it is not available at all makes more sense.

          Yoav Miles added a comment -

          Hello, I'm using Jenkins 1.595 and the issue still exists.

          I'm using the shared workspace plugin which substitutes the SCM repository URL with a variable ($SHAREDSPACE_SCM_URL).
          Jenkins recognizes the URL as invalid and when I build the project I get the following lines in the system log:

          hudson.scm.SubversionSCM buildEnvVars
          no revision found corresponding to $SHAREDSPACE_SCM_URL; known: [<My repo URL>]
          

          When I run a script in the job to print SVN_REVISION it's null, although the revision number is displayed in the log when there is an update

          Yoav Miles added a comment - Hello, I'm using Jenkins 1.595 and the issue still exists. I'm using the shared workspace plugin which substitutes the SCM repository URL with a variable ($SHAREDSPACE_SCM_URL). Jenkins recognizes the URL as invalid and when I build the project I get the following lines in the system log: hudson.scm.SubversionSCM buildEnvVars no revision found corresponding to $SHAREDSPACE_SCM_URL; known: [<My repo URL>] When I run a script in the job to print SVN_REVISION it's null, although the revision number is displayed in the log when there is an update

          Daniel Beck added a comment -

          Yoav: What version of the Subversion plugin are you using?

          Daniel Beck added a comment - Yoav: What version of the Subversion plugin are you using?

          Yoav Miles added a comment -

          Hi Daniel, the Subversion plugin version is 2.4.5

          Yoav Miles added a comment - Hi Daniel, the Subversion plugin version is 2.4.5

          Yoav Miles added a comment -

          Updated Subversion plugin to latest version (2.5)

          Yoav Miles added a comment - Updated Subversion plugin to latest version (2.5)

            Unassigned Unassigned
            ctobey Chris Tobey
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: