I checkout the source into ${ws}/Platform via
stage('Checkout') {
steps {
script {
def gitVarsPlatform = checkout([$class: 'GitSCM',
branches: [[name: "${env.BRANCH_NAME}"]],
extensions: [[$class: 'CleanCheckout', $class: 'RelativeTargetDirectory', relativeTargetDir: 'Platform']],
userRemoteConfigs: [[url: 'https://XXXXX.git', name: 'Platform', credentialsId: 'XXXX' ]]
])
lastChanges since: 'LAST_SUCCESSFUL_BUILD', format:'SIDE',matching: 'LINE'
}
}
}
When I start analyzing the warnings following way:
post {
always {
dir('Platform') {
recordIssues enabledForFailure: true, tool: msBuild()
}
}
}
Warnings are counted correctly but git blame fails with
[Pipeline] dir
14:08:31 Running in C:\jenkins\w\latform_feature_jenkins_master_2\Platform
[Pipeline] {
[Pipeline] recordIssues
14:08:31 [MSBuild] Sleeping for 5 seconds due to JENKINS-32191...
14:08:36 [MSBuild] Parsing console log (workspace: 'C:\jenkins\w\latform_feature_jenkins_master_2\Platform')
14:08:45 using credential XXXX
14:08:45 using credential XXXX
14:08:50 > git rev-parse "HEAD^{commit}" # timeout=10
14:08:52 [MSBuild] [-ERROR-] Errors while extracting author and commit information from Git:
14:08:52 [MSBuild] [-ERROR-] - error running git blame on 'UnitTests/XXXXXXXXX/ServicePlugIn.UnitTest/TestCases/WhenSetXXXXXXXXXXXInvoked.cs' with revision 'AnyObjectId[be2c88e23e194da25873f9440a8f35d62ced0835]'
14:08:52 [MSBuild] [-ERROR-] org.eclipse.jgit.errors.MissingObjectException: Missing unknown be2c88e23e194da25873f9440a8f35d62ced0835
14:08:52 [MSBuild] [-ERROR-] at org.eclipse.jgit.internal.storage.file.WindowCursor.open(WindowCursor.java:158)
14:08:52 [MSBuild] [-ERROR-] at org.eclipse.jgit.lib.ObjectReader.open(ObjectReader.java:227)
14:08:52 [MSBuild] [-ERROR-] at org.eclipse.jgit.blame.BlameGenerator.push(BlameGenerator.java:317)
14:08:52 [MSBuild] [-ERROR-] at org.eclipse.jgit.api.BlameCommand.call(BlameCommand.java:214)
14:08:52 [MSBuild] [-ERROR-] [wrapped] org.eclipse.jgit.api.errors.JGitInternalException: Missing unknown be2c88e23e194da25873f9440a8f35d62ced0835
14:08:52 [MSBuild] [-ERROR-] at org.eclipse.jgit.api.BlameCommand.call(BlameCommand.java:232)
14:08:52 [MSBuild] [-ERROR-] at io.jenkins.plugins.git.forensics.blame.GitBlamer$BlameRunner.run(GitBlamer.java:265)
For comparison, when I start analyzing the warnings without dir statement:
post {
always {
recordIssues enabledForFailure: true, tool: msBuild()
}
}
Warnings are counted correctly but git blame fails with
[Pipeline] recordIssues
13:15:40 [MSBuild] Sleeping for 5 seconds due to JENKINS-32191...
13:15:46 [MSBuild] Parsing console log (workspace: 'C:\jenkins\w\latform_feature_jenkins_master_2')
13:15:55 using credential XXXX
13:15:55 using credential XXXX
13:16:02 > git rev-parse "HEAD^{commit}" # timeout=10
13:18:05 [MSBuild] [-ERROR-] Errors while extracting author and commit information from Git:
13:18:05 [MSBuild] [-ERROR-] - no blame results for file <Platform/XXXXXXX/ProviderServicePlugIn/MetaInformation/AdditionalAddressFieldMetaInformation.cs>
13:18:05 [MSBuild] [-ERROR-] - no blame results for file <Platform//XXXXXXX/TypeHierarchicalPresenter.cs>
13:18:05 [MSBuild] [-ERROR-] - no blame results for file <Platform//XXXXXXX/Services/CoreService.cs>
13:18:05 [MSBuild] [-ERROR-] - no blame results for file ....
|