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

COPYARTIFACT_BUILD_NUMBER_ does not preserve numbers in job names

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      The COPYARTIFACT_BUIL_NUMBER_ variable name does not preserve numbers in job names. It removes numbers from job names. For example, if the job is called martin-test1, then the variable name name is: COPYARTIFACT_BUILD_NUMBER_MARTIN_TEST_ (the number has been removed)

      To reproduce:

      1. create a job whose name has a number in it, e.g. martin-test1
      2. run the job once to create some artifacts, and archive them
      3. create another job whose purpose is to copy the artifacts from the first job
      4. in the build phase of the second job, print the environment variables, e.g. with env, and examine the COPYARTIFACT_BUILD_NUMBER_ variable name. It should be missing the numbers

      This was tested in Jenkins 1.524, with version 1.27 of the Copy Artifacts plugin.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/config.jelly
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-resultVariableSuffix.html
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-resultVariableSuffix_ja.html
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-selector.html
            src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
            src/test/java/hudson/plugins/copyartifact/testutils/CopyArtifactUtil.java
            http://jenkins-ci.org/commit/copyartifact-plugin/462bf8f9b7374300e7a8f3b445787fc22d005c4b
            Log:
            [FIXED JENKINS-18938] Added a field to specify the suffix for the variable to store the build number

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/copyartifact/CopyArtifact.java src/main/resources/hudson/plugins/copyartifact/CopyArtifact/config.jelly src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-resultVariableSuffix.html src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-resultVariableSuffix_ja.html src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-selector.html src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java src/test/java/hudson/plugins/copyartifact/testutils/CopyArtifactUtil.java http://jenkins-ci.org/commit/copyartifact-plugin/462bf8f9b7374300e7a8f3b445787fc22d005c4b Log: [FIXED JENKINS-18938] Added a field to specify the suffix for the variable to store the build number
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
            src/main/resources/hudson/plugins/copyartifact/Messages.properties
            src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
            http://jenkins-ci.org/commit/copyartifact-plugin/0f3e11465397b556009a111437bc7b742f31daee
            Log:
            JENKINS-18938 Added validation for the variable suffix.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/copyartifact/CopyArtifact.java src/main/resources/hudson/plugins/copyartifact/Messages.properties src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java http://jenkins-ci.org/commit/copyartifact-plugin/0f3e11465397b556009a111437bc7b742f31daee Log: JENKINS-18938 Added validation for the variable suffix.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/test/java/hudson/plugins/copyartifact/testutils/CopyArtifactUtil.java
            http://jenkins-ci.org/commit/copyartifact-plugin/250f8a5c09ad702f09a9a77f670e74d4647a7fd5
            Log:
            JENKINS-18938 Fixed the test failure caused by a wrong change for test utility in the last two commits.

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/test/java/hudson/plugins/copyartifact/testutils/CopyArtifactUtil.java http://jenkins-ci.org/commit/copyartifact-plugin/250f8a5c09ad702f09a9a77f670e74d4647a7fd5 Log: JENKINS-18938 Fixed the test failure caused by a wrong change for test utility in the last two commits.
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: ikedam
            Path:
            src/main/java/hudson/plugins/copyartifact/CopyArtifact.java
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/config.jelly
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-resultVariableSuffix.html
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-resultVariableSuffix_ja.html
            src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-selector.html
            src/main/resources/hudson/plugins/copyartifact/Messages.properties
            src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java
            src/test/java/hudson/plugins/copyartifact/testutils/CopyArtifactUtil.java
            http://jenkins-ci.org/commit/copyartifact-plugin/ad631aec628fc881bb9becf4586a58952fc5f59c
            Log:
            Merge pull request #69 from ikedam/feature/JENKINS-18938_BuildNumberVariable

            JENKINS-18938 Added a field to specify the suffix for the variable to store the build number

            Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/e68ed44754e2...ad631aec628f

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: ikedam Path: src/main/java/hudson/plugins/copyartifact/CopyArtifact.java src/main/resources/hudson/plugins/copyartifact/CopyArtifact/config.jelly src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-resultVariableSuffix.html src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-resultVariableSuffix_ja.html src/main/resources/hudson/plugins/copyartifact/CopyArtifact/help-selector.html src/main/resources/hudson/plugins/copyartifact/Messages.properties src/test/java/hudson/plugins/copyartifact/CopyArtifactTest.java src/test/java/hudson/plugins/copyartifact/testutils/CopyArtifactUtil.java http://jenkins-ci.org/commit/copyartifact-plugin/ad631aec628fc881bb9becf4586a58952fc5f59c Log: Merge pull request #69 from ikedam/feature/ JENKINS-18938 _BuildNumberVariable JENKINS-18938 Added a field to specify the suffix for the variable to store the build number Compare: https://github.com/jenkinsci/copyartifact-plugin/compare/e68ed44754e2...ad631aec628f
            Hide
            ikedam ikedam added a comment -

            Fixed in 1.36, which introduced a field to specify the suffix used instead of the project name.
            It will be available in the update center in a day.
            Please try that.

            Show
            ikedam ikedam added a comment - Fixed in 1.36, which introduced a field to specify the suffix used instead of the project name. It will be available in the update center in a day. Please try that.

              People

              • Assignee:
                ikedam ikedam
                Reporter:
                deepchip Martin d'Anjou
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: