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

Can't use variables in result files path pattern

    XMLWordPrintable

Details

    Description

      I'm trying to use vairables insiede the Publish FindBugs/Checkstyle/PMD results analysis, inside the field FindBugs/Checkstyle/PMD results but it seems to take my variable name literally and therefore not find the xml files.

      My usecase is that the same workspace is used for multiple branches and i would like it to scan only for one branch by pointing the scan to the right folder.

      Is it impossible or am I missing something?
      I'm not using the latest version (yet, have to deal with upgrade related issues first) but i looked in the changelog and didn't see a solution.

      Attachments

        Issue Links

          Activity

            yair Yair Yogev created issue -
            drulli Ulli Hafner added a comment -

            This is not possible yet. Which kind of variables are you talking about? Environment variables or variables from other Jenkins Plug-ins (like the token macro plug-in)?

            drulli Ulli Hafner added a comment - This is not possible yet. Which kind of variables are you talking about? Environment variables or variables from other Jenkins Plug-ins (like the token macro plug-in)?
            drulli Ulli Hafner made changes -
            Field Original Value New Value
            Component/s analysis-core-plugin [ 15709 ]
            Component/s findbugs-plugin [ 15496 ]
            Component/s pmd-plugin [ 15511 ]
            Component/s checkstyle-plugin [ 15512 ]
            yair Yair Yogev added a comment - - edited

            I'm not sure if the correct term is environment variable or a build variable so I'll just give an example:
            I'm using Jenkins-Reviewbot plugin which accepts a review URL as job parameter and lets me use "$REVIEW_BRANCH" or ${REVIEW_BRANCH} just about everywhere else in the project (shell commands, scm mapping, Description Setter Plugin post build action...)
            I also tried the variables defined in "inject environment variables to the build process" option of EnvInject plugin.

            Thanks for confirming, I'll try to work around it.

            yair Yair Yogev added a comment - - edited I'm not sure if the correct term is environment variable or a build variable so I'll just give an example: I'm using Jenkins-Reviewbot plugin which accepts a review URL as job parameter and lets me use "$REVIEW_BRANCH" or ${REVIEW_BRANCH} just about everywhere else in the project (shell commands, scm mapping, Description Setter Plugin post build action...) I also tried the variables defined in "inject environment variables to the build process" option of EnvInject plugin. Thanks for confirming, I'll try to work around it.
            drulli Ulli Hafner added a comment -

            Seems that this kind of feature someone already has been fixed for the warnings plug-in: https://github.com/jenkinsci/warnings-plugin/blob/master/src/main/java/hudson/plugins/warnings/WarningsPublisher.java#L414

            This code needs to be pulled up to analysis-core plug-in, so that all plug-ins can participate... Interested in providing a pull request?

            drulli Ulli Hafner added a comment - Seems that this kind of feature someone already has been fixed for the warnings plug-in: https://github.com/jenkinsci/warnings-plugin/blob/master/src/main/java/hudson/plugins/warnings/WarningsPublisher.java#L414 This code needs to be pulled up to analysis-core plug-in, so that all plug-ins can participate... Interested in providing a pull request?
            yair Yair Yogev added a comment -

            Thanks for the link. I can't commit to it time-wise right now (I imagine it requires a lot of testing for such a popular Jenkins plugin), but hope i'll get to it eventually if no one else does it first.

            yair Yair Yogev added a comment - Thanks for the link. I can't commit to it time-wise right now (I imagine it requires a lot of testing for such a popular Jenkins plugin), but hope i'll get to it eventually if no one else does it first.
            drulli Ulli Hafner made changes -
            Link This issue is related to JENKINS-34157 [ JENKINS-34157 ]
            drulli Ulli Hafner added a comment -

            Where should the environment variable be expanded? On master or slave? (I.e. which node has the correct value?)

            drulli Ulli Hafner added a comment - Where should the environment variable be expanded? On master or slave? (I.e. which node has the correct value?)

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            .idea/libraries/Maven__org_jenkins_ci_cucumber_annotation_indexer_1_3.xml
            .idea/libraries/Maven__org_jvnet_hudson_plugins_analysis_core_1_75.xml
            .idea/libraries/Maven__org_kohsuke_cucumber_annotation_indexer_1_2.xml
            analysis-test
            checkstyle
            warnings
            http://jenkins-ci.org/commit/analysis-suite-plugin/0a24fbbd3ee0f3f9a4815e28c8828e370c193479
            Log:
            [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: .idea/libraries/Maven__org_jenkins_ci_cucumber_annotation_indexer_1_3.xml .idea/libraries/Maven__org_jvnet_hudson_plugins_analysis_core_1_75.xml .idea/libraries/Maven__org_kohsuke_cucumber_annotation_indexer_1_2.xml analysis-test checkstyle warnings http://jenkins-ci.org/commit/analysis-suite-plugin/0a24fbbd3ee0f3f9a4815e28c8828e370c193479 Log: [FIXED JENKINS-30735] Expand environment variabes in file pattern.
            scm_issue_link SCM/JIRA link daemon made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Resolved [ 5 ]

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            analysis-collector.iml
            pom.xml
            http://jenkins-ci.org/commit/analysis-collector-plugin/3fbfed317d678168881ae99442a17b1fe25b590a
            Log:
            [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: analysis-collector.iml pom.xml http://jenkins-ci.org/commit/analysis-collector-plugin/3fbfed317d678168881ae99442a17b1fe25b590a Log: [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/java/hudson/plugins/analysis/core/HealthAwareRecorder.java
            http://jenkins-ci.org/commit/analysis-core-plugin/f1242471793e1c71f505ed0f4da7359cb737a04c
            Log:
            [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/analysis/core/HealthAwareRecorder.java http://jenkins-ci.org/commit/analysis-core-plugin/f1242471793e1c71f505ed0f4da7359cb737a04c Log: [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            analysis-test.iml
            pom.xml
            http://jenkins-ci.org/commit/analysis-test-plugin/8c5a77b1c468d653caa32aabfdb40282bef5f932
            Log:
            [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: analysis-test.iml pom.xml http://jenkins-ci.org/commit/analysis-test-plugin/8c5a77b1c468d653caa32aabfdb40282bef5f932 Log: [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            checkstyle.iml
            pom.xml
            src/main/java/hudson/plugins/checkstyle/CheckStylePublisher.java
            http://jenkins-ci.org/commit/checkstyle-plugin/873abc79f8c93c54f6cb97039af4a84c15704001
            Log:
            [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: checkstyle.iml pom.xml src/main/java/hudson/plugins/checkstyle/CheckStylePublisher.java http://jenkins-ci.org/commit/checkstyle-plugin/873abc79f8c93c54f6cb97039af4a84c15704001 Log: [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/java/hudson/plugins/dry/DryPublisher.java
            http://jenkins-ci.org/commit/dry-plugin/2ad35a7ead578ffa944e1c626fe52bf09f63734f
            Log:
            [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/hudson/plugins/dry/DryPublisher.java http://jenkins-ci.org/commit/dry-plugin/2ad35a7ead578ffa944e1c626fe52bf09f63734f Log: [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            src/main/java/hudson/plugins/warnings/WarningsPublisher.java
            warnings.iml
            http://jenkins-ci.org/commit/warnings-plugin/db62da8ba72d05c19564733e2bec6e702a566e97
            Log:
            [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml src/main/java/hudson/plugins/warnings/WarningsPublisher.java warnings.iml http://jenkins-ci.org/commit/warnings-plugin/db62da8ba72d05c19564733e2bec6e702a566e97 Log: [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pmd.iml
            pom.xml
            src/main/java/hudson/plugins/pmd/PmdPublisher.java
            http://jenkins-ci.org/commit/pmd-plugin/3a9abdb0ddb5b2d34e7d0ed29f7d015a19f67898
            Log:
            [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pmd.iml pom.xml src/main/java/hudson/plugins/pmd/PmdPublisher.java http://jenkins-ci.org/commit/pmd-plugin/3a9abdb0ddb5b2d34e7d0ed29f7d015a19f67898 Log: [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            plugin/findbugs.iml
            plugin/pom.xml
            plugin/src/main/java/hudson/plugins/findbugs/FindBugsPublisher.java
            http://jenkins-ci.org/commit/findbugs-plugin/0c7880bbe9c069bd98468f930ddddbb10c20987b
            Log:
            [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: plugin/findbugs.iml plugin/pom.xml plugin/src/main/java/hudson/plugins/findbugs/FindBugsPublisher.java http://jenkins-ci.org/commit/findbugs-plugin/0c7880bbe9c069bd98468f930ddddbb10c20987b Log: [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            pom.xml
            tasks.iml
            http://jenkins-ci.org/commit/tasks-plugin/ee05314e52a5d4981f94d5fdbc6579924895e855
            Log:
            [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: pom.xml tasks.iml http://jenkins-ci.org/commit/tasks-plugin/ee05314e52a5d4981f94d5fdbc6579924895e855 Log: [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/test/java/plugins/CheckStylePluginTest.java
            http://jenkins-ci.org/commit/acceptance-test-harness/8a41d9ca7b51c8af9d2b173a30b16b533af33639
            Log:
            [FIXED JENKINS-30735] Expand environment variabes in file pattern.

            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/test/java/plugins/CheckStylePluginTest.java http://jenkins-ci.org/commit/acceptance-test-harness/8a41d9ca7b51c8af9d2b173a30b16b533af33639 Log: [FIXED JENKINS-30735] Expand environment variabes in file pattern.
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 165860 ] JNJira + In-Review [ 197831 ]

            People

              drulli Ulli Hafner
              yair Yair Yogev
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: