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

Obtain reference build from SCM/Trigger

    XMLWordPrintable

    Details

    • Similar Issues:
    • Released As:
      5.0.0-beta2

      Description

      It would be great if the SCM would be queried for the reference build. If the builds are not in order (e.g. because the build are triggered by code review (e.g. Gerrit)), it doesn't make sense to use the last build as reference. The SCM (e.g. Git) or the Trigger (e.g. Gerrit) would know the previous commit which should be used as reference.

        Attachments

          Issue Links

            Activity

            Hide
            mirzazeyrek mirza zeyrek added a comment - - edited

            Latest stable build from another job would be ok for now

            But It would be nice to have something compatible with multi branch pipeline; being able to choose from:
            1- (different or same) multi branch pipeline job
            2- choosing branch from it and getting latest stable build as reference.

            Ulli Hafner 

            Show
            mirzazeyrek mirza zeyrek added a comment - - edited Latest stable build from another job would be ok for now But It would be nice to have something compatible with multi branch pipeline; being able to choose from: 1- (different or same) multi branch pipeline job 2- choosing branch from it and getting latest stable build as reference. Ulli Hafner  
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/main/java/io/jenkins/plugins/analysis/core/JenkinsFacade.java
            src/main/java/io/jenkins/plugins/analysis/core/graphs/AnnotationsByUserGraph.java
            src/main/java/io/jenkins/plugins/analysis/core/history/BuildHistory.java
            src/main/java/io/jenkins/plugins/analysis/core/history/OtherJobReferenceFinder.java
            src/main/java/io/jenkins/plugins/analysis/core/history/ReferenceFinder.java
            src/main/java/io/jenkins/plugins/analysis/core/history/ReferenceProvider.java
            src/main/java/io/jenkins/plugins/analysis/core/history/ResultHistory.java
            src/main/java/io/jenkins/plugins/analysis/core/model/AnalysisResult.java
            src/main/java/io/jenkins/plugins/analysis/core/model/StaticAnalysisLabelProvider.java
            src/main/java/io/jenkins/plugins/analysis/core/model/Summary.java
            src/main/java/io/jenkins/plugins/analysis/core/steps/AnalysisExecution.java
            src/main/java/io/jenkins/plugins/analysis/core/steps/PublishIssuesStep.java
            src/main/java/io/jenkins/plugins/analysis/core/steps/ScanForIssuesStep.java
            src/main/resources/io/jenkins/plugins/analysis/core/model/Messages.properties
            src/main/resources/io/jenkins/plugins/analysis/core/views/InfoErrorDetail/index.jelly
            src/main/resources/io/jenkins/plugins/analysis/core/views/IssuesDetail/index.jelly
            src/test/java/io/jenkins/plugins/analysis/core/history/OtherJobReferenceFinderTest.java
            src/test/java/io/jenkins/plugins/analysis/core/model/SummaryTest.java
            http://jenkins-ci.org/commit/analysis-core-plugin/3429aead0352f32c2b2c2114bd868e2a8a110dcf
            Log:
            JENKINS-13056JENKINS-31812 Added option to specify a reference job.

            The reference results will now be obtained either
            a) from the current job
            b) from a specified reference job (given by the name)

            The reference job will be selected using the properties:

            • ignoreAnalysisResult: ignores the result of the previous analysis run
            • overallResultMustBeSuccess: picks only builds with overall SUCCESS
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/main/java/io/jenkins/plugins/analysis/core/JenkinsFacade.java src/main/java/io/jenkins/plugins/analysis/core/graphs/AnnotationsByUserGraph.java src/main/java/io/jenkins/plugins/analysis/core/history/BuildHistory.java src/main/java/io/jenkins/plugins/analysis/core/history/OtherJobReferenceFinder.java src/main/java/io/jenkins/plugins/analysis/core/history/ReferenceFinder.java src/main/java/io/jenkins/plugins/analysis/core/history/ReferenceProvider.java src/main/java/io/jenkins/plugins/analysis/core/history/ResultHistory.java src/main/java/io/jenkins/plugins/analysis/core/model/AnalysisResult.java src/main/java/io/jenkins/plugins/analysis/core/model/StaticAnalysisLabelProvider.java src/main/java/io/jenkins/plugins/analysis/core/model/Summary.java src/main/java/io/jenkins/plugins/analysis/core/steps/AnalysisExecution.java src/main/java/io/jenkins/plugins/analysis/core/steps/PublishIssuesStep.java src/main/java/io/jenkins/plugins/analysis/core/steps/ScanForIssuesStep.java src/main/resources/io/jenkins/plugins/analysis/core/model/Messages.properties src/main/resources/io/jenkins/plugins/analysis/core/views/InfoErrorDetail/index.jelly src/main/resources/io/jenkins/plugins/analysis/core/views/IssuesDetail/index.jelly src/test/java/io/jenkins/plugins/analysis/core/history/OtherJobReferenceFinderTest.java src/test/java/io/jenkins/plugins/analysis/core/model/SummaryTest.java http://jenkins-ci.org/commit/analysis-core-plugin/3429aead0352f32c2b2c2114bd868e2a8a110dcf Log: JENKINS-13056 JENKINS-31812 Added option to specify a reference job. The reference results will now be obtained either a) from the current job b) from a specified reference job (given by the name) The reference job will be selected using the properties: ignoreAnalysisResult: ignores the result of the previous analysis run overallResultMustBeSuccess: picks only builds with overall SUCCESS
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Ulli Hafner
            Path:
            src/test/java/io/jenkins/plugins/analysis/warnings/PipelineITest.java
            src/test/java/io/jenkins/plugins/analysis/warnings/StepsITest.java
            src/test/resources/io/jenkins/plugins/analysis/warnings/java-start.txt
            http://jenkins-ci.org/commit/warnings-plugin/3c64ac6c68b433e3f3b4e960e02a99c414223b31
            Log:
            JENKINS-13056JENKINS-31812 Added option to specify a reference job.

            The reference results will now be obtained either
            a) from the current job
            b) from a specified reference job (given by the name)

            The reference job will be selected using the properties:

            • ignoreAnalysisResult: ignores the result of the previous analysis run
            • overallResultMustBeSuccess: picks only builds with overall SUCCESS
            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Ulli Hafner Path: src/test/java/io/jenkins/plugins/analysis/warnings/PipelineITest.java src/test/java/io/jenkins/plugins/analysis/warnings/StepsITest.java src/test/resources/io/jenkins/plugins/analysis/warnings/java-start.txt http://jenkins-ci.org/commit/warnings-plugin/3c64ac6c68b433e3f3b4e960e02a99c414223b31 Log: JENKINS-13056 JENKINS-31812 Added option to specify a reference job. The reference results will now be obtained either a) from the current job b) from a specified reference job (given by the name) The reference job will be selected using the properties: ignoreAnalysisResult: ignores the result of the previous analysis run overallResultMustBeSuccess: picks only builds with overall SUCCESS
            Hide
            drulli Ulli Hafner added a comment -

            Partly fixed by making the reference build configurable.

            Show
            drulli Ulli Hafner added a comment - Partly fixed by making the reference build configurable.
            Hide
            drulli Ulli Hafner added a comment -

            Released in 5.0.0-beta2.

            Show
            drulli Ulli Hafner added a comment - Released in 5.0.0-beta2.

              People

              Assignee:
              drulli Ulli Hafner
              Reporter:
              rschulz Roland Schulz
              Votes:
              9 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: