forked from microsoft/vscode-azurearmtools
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Publsh vscode logs to better analyze dotnet rt problems (microsoft#760)
* Publsh vscode logs to better analyze dotnet rt problems * Mnor changes * Publsh logs for all extensons
- Loading branch information
1 parent
240591d
commit 2c1f27e
Showing
10 changed files
with
71 additions
and
43 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
steps: | ||
- task: CopyFiles@2 | ||
displayName: "Copy logs folder to staging directory" | ||
inputs: | ||
Contents: "logs/**" | ||
TargetFolder: "$(build.artifactstagingdirectory)" | ||
condition: succeededOrFailed() | ||
|
||
- task: PublishBuildArtifacts@1 | ||
displayName: "Publish artifacts: logs" | ||
inputs: | ||
PathtoPublish: "$(build.artifactstagingdirectory)" | ||
ArtifactName: logs-$(Agent.OS) | ||
condition: succeededOrFailed() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,4 @@ webpack.config* | |
*.zip | ||
pkgs | ||
tools | ||
pre-cache | ||
post-cache | ||
logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Microsoft Corporation. All rights reserved. | ||
* Licensed under the MIT License. See License.md in the project root for license information. | ||
*--------------------------------------------------------------------------------------------*/ | ||
|
||
import * as fse from 'fs-extra'; | ||
import * as path from 'path'; | ||
import { ext } from '../../extension.bundle'; | ||
import { logsFolder } from '../testConstants'; | ||
|
||
export async function publishVsCodeLogs(extensionid: string | undefined): Promise<void> { | ||
console.log(`Copying the vscode logs for ${extensionid ?? 'all'}...`); | ||
const parentPath = path.dirname(ext.context.logPath); | ||
const sourcePath = path.join(parentPath, extensionid ?? '..'); | ||
const destFolderPath = path.join(logsFolder, extensionid ?? 'all'); | ||
await fse.mkdir(destFolderPath); | ||
|
||
if (fse.pathExistsSync(sourcePath)) { | ||
await fse.copy(sourcePath, destFolderPath, { | ||
recursive: true, | ||
preserveTimestamps: true | ||
}); | ||
} else { | ||
console.log(` Log folder does not exist: ${sourcePath}`); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters