Skip to content

Commit

Permalink
Users/vivasa/publishsymbol/manifest (#20709)
Browse files Browse the repository at this point in the history
* Update readme

* Update readme

* Update task readme

* Update readme changes

* Updated readme

* Update readme for generated files too

* Adding build steps for publishsymbols

* Update readme and build instructions

* Update manifest for symboltask

* Update localization resources and manifest validation

* Update task.loc.json

* update readme
  • Loading branch information
viralpandya authored Dec 11, 2024
1 parent 75ecf01 commit ec8af01
Show file tree
Hide file tree
Showing 47 changed files with 1,900 additions and 2,941 deletions.
29 changes: 27 additions & 2 deletions Tasks/PublishSymbolsV2/PublishSymbols.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ interface IClientToolOptions {
requestName: string;
sourcePathListFileName: string;
symbolServiceUri: string;
manifest: string;
}

export async function run(clientToolFilePath: string): Promise<void> {
Expand All @@ -37,7 +38,16 @@ export async function run(clientToolFilePath: string): Promise<void> {
let AsAccountName = tl.getVariable("ArtifactServices.Symbol.AccountName");
let symbolServiceUri = "https://" + encodeURIComponent(AsAccountName) + ".artifacts.visualstudio.com"
let personalAccessToken = tl.getVariable("ArtifactServices.Symbol.PAT");
const connectedServiceName = tl.getInput("ConnectedServiceName", false);
const connectedServiceName = tl.getInput("ConnectedServiceName", false);
const manifest = tl.getInput("Manifest", false);
if(manifest && !fileExists(manifest)) {
throw new Error(tl.loc("ManifestFileNotFound", manifest));
}
else
{
tl.debug("Manifest file found at: " + manifest);
}

tl.debug("connectedServiceName: " + connectedServiceName);

if(connectedServiceName){
Expand Down Expand Up @@ -111,7 +121,8 @@ export async function run(clientToolFilePath: string): Promise<void> {
personalAccessToken,
requestName,
sourcePathListFileName,
symbolServiceUri
symbolServiceUri,
manifest
} as IClientToolOptions;

let toolRunnerOptions = clientToolRunner.getClientToolOptions();
Expand Down Expand Up @@ -143,6 +154,15 @@ export async function run(clientToolFilePath: string): Promise<void> {
}
}

function fileExists(filePath: string): boolean {
try {
fs.accessSync(filePath);
return true;
} catch (error) {
return false;
}
}

function publishSymbolsUsingClientTool(
sourcePath: string,
options: IClientToolOptions,
Expand All @@ -155,6 +175,11 @@ function publishSymbolsUsingClientTool(
"--directory", sourcePath
);

if (options.manifest) {
command.push("--manifest", options.manifest);
tl.debug("Manifest: " + options.manifest);
}

if (options.expirationInDays) {
command.push("--expirationInDays", options.expirationInDays);
}
Expand Down
2 changes: 2 additions & 0 deletions Tasks/PublishSymbolsV2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ The task requires either Node v16 or Node v20 to run. The task does not support

* **SearchPattern**: The pattern used to discover the pdb files to publish.

* **Manifest**: The path to a file containing more symbol client keys to publish.

* **IndexSources**: Indicates whether to inject source server information into the PDB files. This option is only supported on Windows agents.

* **PublishSymbols**: Indicates whether to publish the symbol files.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"loc.input.help.SymbolsFolder": "Der Pfad zu dem Ordner, der nach Symboldateien durchsucht wird. Der Standardwert ist \"$(Build.SourcesDirectory)\". Geben Sie andernfalls einen Stammpfad an, z. B.: \"$(Build.BinariesDirectory)/MyProject\".",
"loc.input.label.SearchPattern": "Suchmuster",
"loc.input.help.SearchPattern": "Das Muster, das zum Ermitteln der zu veröffentlichenden PDB-Dateien verwendet wird.",
"loc.input.label.Manifest": "",
"loc.input.help.Manifest": "",
"loc.input.label.IndexSources": "Quellen indizieren",
"loc.input.help.IndexSources": "Gibt an, ob Quellserverinformationen in die PDB-Dateien eingefügt werden sollen. Diese Option wird nur auf Windows-Agents unterstützt.",
"loc.input.label.PublishSymbols": "Symbole veröffentlichen",
Expand Down Expand Up @@ -71,5 +73,6 @@
"loc.messages.UnexpectedDbghelpdllExpected0Actual1": "Die Bibliothek \"dbghelp.dll\" wurde bereits aus einem unerwarteten Pfad geladen. Erwartet: \"{0}\". Tatsächlich: \"{0}\".",
"loc.messages.UnsupportedSourceProvider0": "Nicht unterstützter Quellanbieter \"{0}\" für die Quellindizierung.",
"loc.messages.Win32Error0FromMethod1": "Win32-Fehler \"{0}\" aus der Methode \"{1}\".",
"loc.messages.NodeVersionSupport": "Node v{0} wird ab dem 31.08.2024 nicht mehr unterstützt. Aktualisieren Sie den Pipeline-Agent auf die neueste Version für Node 16 oder höher."
"loc.messages.NodeVersionSupport": "Node v{0} wird ab dem 31.08.2024 nicht mehr unterstützt. Aktualisieren Sie den Pipeline-Agent auf die neueste Version für Node 16 oder höher.",
"loc.messages.ManifestFileNotFound": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
"loc.input.help.SymbolsFolder": "The path to the folder that is searched for symbol files. The default is $(Build.SourcesDirectory). Otherwise specify a rooted path, for example: $(Build.BinariesDirectory)/MyProject",
"loc.input.label.SearchPattern": "Search pattern",
"loc.input.help.SearchPattern": "The pattern used to discover the pdb files to publish.",
"loc.input.label.Manifest": "Manifest",
"loc.input.help.Manifest": "The path to a file containing more symbol client keys to publish.",
"loc.input.label.IndexSources": "Index sources",
"loc.input.help.IndexSources": "Indicates whether to inject source server information into the PDB files. This option is only supported on Windows agents.",
"loc.input.label.PublishSymbols": "Publish symbols",
Expand Down Expand Up @@ -73,5 +75,6 @@
"loc.messages.UnexpectedDbghelpdllExpected0Actual1": "Library dbghelp.dll is already loaded from an unexpected path. Expected '{0}'. Actual '{0}'.",
"loc.messages.UnsupportedSourceProvider0": "Unsupported source provider '{0}' for source indexing.",
"loc.messages.Win32Error0FromMethod1": "Encountered Win32 error '{0}' from method '{1}'.",
"loc.messages.NodeVersionSupport": "Node v{0} is no longer supported starting 08/31/2024. Please upgrade pipeline agent to latest version for Node 16 or later."
"loc.messages.NodeVersionSupport": "Node v{0} is no longer supported starting 08/31/2024. Please upgrade pipeline agent to latest version for Node 16 or later.",
"loc.messages.ManifestFileNotFound": "Manifest file not found at '{0}'."
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"loc.input.help.SymbolsFolder": "Ruta de acceso a la carpeta en la que se buscan los archivos de símbolos. El valor predeterminado es $(Build.SourcesDirectory). De lo contrario, especifique una ruta de acceso raíz, por ejemplo: $(Build.BinariesDirectory)/MyProject",
"loc.input.label.SearchPattern": "Patrón de búsqueda",
"loc.input.help.SearchPattern": "Patrón usado para detectar los archivos pdb que se van a publicar.",
"loc.input.label.Manifest": "",
"loc.input.help.Manifest": "",
"loc.input.label.IndexSources": "Indexar orígenes",
"loc.input.help.IndexSources": "Indique si se debe insertar la información del servidor de origen en los archivos PDB. Esta opción solo se admite en agentes de Windows.",
"loc.input.label.PublishSymbols": "Publicar símbolos",
Expand Down Expand Up @@ -71,5 +73,6 @@
"loc.messages.UnexpectedDbghelpdllExpected0Actual1": "La biblioteca dbghelp.dll ya está cargada desde una ruta inesperada. Se esperaba '{0}'. Real '{0}'.",
"loc.messages.UnsupportedSourceProvider0": "Proveedor de origen no admitido '{0}' para la indexación de origen.",
"loc.messages.Win32Error0FromMethod1": "Error de Win32 '{0}' del método '{1}'.",
"loc.messages.NodeVersionSupport": "Node v{0} ya no se admite a partir del 31/08/2024. Actualice el agente de canalización a la última versión de Node 16 o posterior."
"loc.messages.NodeVersionSupport": "Node v{0} ya no se admite a partir del 31/08/2024. Actualice el agente de canalización a la última versión de Node 16 o posterior.",
"loc.messages.ManifestFileNotFound": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"loc.input.help.SymbolsFolder": "Chemin du dossier de recherche des fichiers de symboles. La valeur par défaut est $(Build.SourcesDirectory). Sinon, spécifiez un chemin associé à une racine. Exemple : $(Build.BinariesDirectory)/MyProject",
"loc.input.label.SearchPattern": "Modèle de recherche",
"loc.input.help.SearchPattern": "Modèle utilisé pour découvrir les fichiers pdb à publier.",
"loc.input.label.Manifest": "",
"loc.input.help.Manifest": "",
"loc.input.label.IndexSources": "Indexer les sources",
"loc.input.help.IndexSources": "Indique s’il faut injecter des informations sur le serveur source dans les fichiers PDB. Cette option est uniquement prise en charge sur les agents Windows.",
"loc.input.label.PublishSymbols": "Publier les symboles",
Expand Down Expand Up @@ -71,5 +73,6 @@
"loc.messages.UnexpectedDbghelpdllExpected0Actual1": "La bibliothèque dbghelp.dll est déjà chargée à partir d'un chemin inattendu. Le chemin attendu est '{0}'. Le chemin réel est '{0}'.",
"loc.messages.UnsupportedSourceProvider0": "Fournisseur de source '{0}' non pris en charge pour l'indexation des sources.",
"loc.messages.Win32Error0FromMethod1": "Erreur Win32 '{0}' rencontrée dans la méthode '{1}'.",
"loc.messages.NodeVersionSupport": "Le nœud v{0} n’est plus pris en charge à compter du 31/08/2024. Veuillez mettre à niveau l’agent de pipeline vers la dernière version pour le nœud 16 ou version ultérieure."
"loc.messages.NodeVersionSupport": "Le nœud v{0} n’est plus pris en charge à compter du 31/08/2024. Veuillez mettre à niveau l’agent de pipeline vers la dernière version pour le nœud 16 ou version ultérieure.",
"loc.messages.ManifestFileNotFound": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"loc.input.help.SymbolsFolder": "Percorso della cartella in cui vengono cercati i file di simboli. L'impostazione predefinita è $(Build.SourcesDirectory). In caso contrario, specificare un percorso completo, ad esempio: $(Build.BinariesDirectory)/MyProject",
"loc.input.label.SearchPattern": "Criteri di ricerca",
"loc.input.help.SearchPattern": "Criterio usato per individuare i file PDB da pubblicare.",
"loc.input.label.Manifest": "",
"loc.input.help.Manifest": "",
"loc.input.label.IndexSources": "Indicizza origini",
"loc.input.help.IndexSources": "Indica se inserire informazioni sul server di origine nei file PDB. Questa opzione è supportata solo negli agenti Windows.",
"loc.input.label.PublishSymbols": "Pubblica simboli",
Expand Down Expand Up @@ -71,5 +73,6 @@
"loc.messages.UnexpectedDbghelpdllExpected0Actual1": "La libreria dbghelp.dll è già stata caricata da un percorso imprevisto. Percorso previsto: '{0}'. Percorso effettivo: '{0}'.",
"loc.messages.UnsupportedSourceProvider0": "Il provider di origine '{0}' non è supportato per l'indicizzazione origine.",
"loc.messages.Win32Error0FromMethod1": "È stato rilevato l'errore Win32 '{0}' restituito dal metodo '{1}'.",
"loc.messages.NodeVersionSupport": "Il nodo v{0} non è più supportato a partire dal 31/08/2024. Aggiornare l'agente della pipeline alla versione più recente per Node 16 o versione successiva."
"loc.messages.NodeVersionSupport": "Il nodo v{0} non è più supportato a partire dal 31/08/2024. Aggiornare l'agente della pipeline alla versione più recente per Node 16 o versione successiva.",
"loc.messages.ManifestFileNotFound": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"loc.input.help.SymbolsFolder": "シンボル ファイルを検索するソース フォルダーへのパス。既定値は $(Build.SourcesDirectory) です。それ以外の場合は、$(Build.BinariesDirectory)/MyProject などのルート指定のパスを指定してください",
"loc.input.label.SearchPattern": "検索パターン",
"loc.input.help.SearchPattern": "発行する PDB ファイルの検出に使用するパターン。",
"loc.input.label.Manifest": "",
"loc.input.help.Manifest": "",
"loc.input.label.IndexSources": "ソースのインデックスを作成する",
"loc.input.help.IndexSources": "PDB ファイルにソース サーバー情報を挿入するかどうかを示します。このオプションは Windows エージェントでのみサポートされています。",
"loc.input.label.PublishSymbols": "シンボルを発行する",
Expand Down Expand Up @@ -71,5 +73,6 @@
"loc.messages.UnexpectedDbghelpdllExpected0Actual1": "ライブラリ dbghelp.dll は予期しないパスから既に読み込まれています。必要なパス '{0}'。実際のパス '{0}'。",
"loc.messages.UnsupportedSourceProvider0": "ソースのインデックス作成のサポートされていないソース プロバイダー '{0}'。",
"loc.messages.Win32Error0FromMethod1": "メソッド '{1}' から Win32 エラー '{0}' が発生しました。",
"loc.messages.NodeVersionSupport": "ノード v{0} は、2024 年 8 月 31 日からサポートされなくなりました。ノード 16 以降のパイプライン エージェントを最新バージョンにアップグレードしてください。"
"loc.messages.NodeVersionSupport": "ノード v{0} は、2024 年 8 月 31 日からサポートされなくなりました。ノード 16 以降のパイプライン エージェントを最新バージョンにアップグレードしてください。",
"loc.messages.ManifestFileNotFound": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"loc.input.help.SymbolsFolder": "기호 파일을 검색할 폴더의 경로입니다. 기본값은 $(Build.SourcesDirectory)입니다. 그렇지 않으면 루트 경로를 지정하세요(예: $(Build.BinariesDirectory)/MyProject).",
"loc.input.label.SearchPattern": "검색 패턴",
"loc.input.help.SearchPattern": "게시할 pdb 파일을 검색하는 데 사용된 패턴입니다.",
"loc.input.label.Manifest": "",
"loc.input.help.Manifest": "",
"loc.input.label.IndexSources": "소스 인덱싱",
"loc.input.help.IndexSources": "원본 서버 정보를 PDB 파일에 주입할지 여부를 나타냅니다. 이 옵션은 Windows 에이전트에서만 지원됩니다.",
"loc.input.label.PublishSymbols": "기호 게시",
Expand Down Expand Up @@ -71,5 +73,6 @@
"loc.messages.UnexpectedDbghelpdllExpected0Actual1": "라이브러리 dbghelp.dll이 예기치 않은 경로에서 이미 로드되었습니다. 예상된 경로: '{0}'. 실제 경로: '{0}'.",
"loc.messages.UnsupportedSourceProvider0": "소스 인덱싱에 대해 지원되지 않는 원본 공급자 '{0}'입니다.",
"loc.messages.Win32Error0FromMethod1": "메서드 '{1}'에서 Win32 오류 '{0}'이(가) 발생했습니다.",
"loc.messages.NodeVersionSupport": "Node v{0}은(는) 2024/08/31부터 더 이상 지원되지 않습니다. 파이프라인 에이전트를 노드 16 이상의 최신 버전으로 업그레이드하세요."
"loc.messages.NodeVersionSupport": "Node v{0}은(는) 2024/08/31부터 더 이상 지원되지 않습니다. 파이프라인 에이전트를 노드 16 이상의 최신 버전으로 업그레이드하세요.",
"loc.messages.ManifestFileNotFound": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"loc.input.help.SymbolsFolder": "Путь к папке, в которой ищутся файлы символов. По умолчанию используется папка $(Build.SourcesDirectory). В противном случае можно указать корневой путь, (например, $(Build.BinariesDirectory)/MyProject).",
"loc.input.label.SearchPattern": "Шаблон поиска",
"loc.input.help.SearchPattern": "Шаблон, используемый для обнаружения файлов PDB для публикации.",
"loc.input.label.Manifest": "",
"loc.input.help.Manifest": "",
"loc.input.label.IndexSources": "Индексация источников",
"loc.input.help.IndexSources": "Указывает, следует ли внедрять сведения об исходном сервере в PDB-файлы. Этот параметр поддерживается только в агентах Windows.",
"loc.input.label.PublishSymbols": "Публикация символов",
Expand Down Expand Up @@ -71,5 +73,6 @@
"loc.messages.UnexpectedDbghelpdllExpected0Actual1": "Библиотека dbghelp.dll уже загружена из непредвиденного пути. Ожидается — \"{0}\". Фактический — \"{0}\".",
"loc.messages.UnsupportedSourceProvider0": "Неподдерживаемый поставщик источника \"{0}\" для индексации источника.",
"loc.messages.Win32Error0FromMethod1": "Произошла ошибка Win32 \"{0}\" из метода \"{1}\".",
"loc.messages.NodeVersionSupport": "Начиная с 31.08.2024, Node v{0} больше не поддерживается. Обновите агент конвейера до последней версии для Node 16 или более поздней версии."
"loc.messages.NodeVersionSupport": "Начиная с 31.08.2024, Node v{0} больше не поддерживается. Обновите агент конвейера до последней версии для Node 16 или более поздней версии.",
"loc.messages.ManifestFileNotFound": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"loc.input.help.SymbolsFolder": "在其中搜索符号文件的文件夹的路径。默认为 $(Build.SourcesDirectory)。在其他情况下,指定根路径。例如: $(Build.BinariesDirectory)/MyProject",
"loc.input.label.SearchPattern": "搜索模式",
"loc.input.help.SearchPattern": "用于发现要发布的 pdb 文件的模式。",
"loc.input.label.Manifest": "",
"loc.input.help.Manifest": "",
"loc.input.label.IndexSources": "编制源索引",
"loc.input.help.IndexSources": "指示是否将源服务器信息注入 PDB 文件。此选项仅在 Windows 代理上受支持。",
"loc.input.label.PublishSymbols": "发布符号",
Expand Down Expand Up @@ -71,5 +73,6 @@
"loc.messages.UnexpectedDbghelpdllExpected0Actual1": "已从异常路径加载库 dbghelp.dll。应为“{0}”。实际为“{0}”。",
"loc.messages.UnsupportedSourceProvider0": "不受源索引编制支持的源提供程序“{0}”。",
"loc.messages.Win32Error0FromMethod1": "在方法“{1}”中遇到 Win32 错误“{0}”。",
"loc.messages.NodeVersionSupport": "从 2024 年 8 月 31 日起不再支持 Node v{0}。请将管道代理升级到最新版本以使用 Node 16 或更高版本。"
"loc.messages.NodeVersionSupport": "从 2024 年 8 月 31 日起不再支持 Node v{0}。请将管道代理升级到最新版本以使用 Node 16 或更高版本。",
"loc.messages.ManifestFileNotFound": ""
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
"loc.input.help.SymbolsFolder": "搜尋符號檔案所在資料夾的路徑。預設值為 $(Build.SourcesDirectory)。否則請指定根路徑。例如: $(Build.BinariesDirectory)/MyProject",
"loc.input.label.SearchPattern": "搜尋模式",
"loc.input.help.SearchPattern": "探索要發行之 pdb 檔案使用的模式。",
"loc.input.label.Manifest": "",
"loc.input.help.Manifest": "",
"loc.input.label.IndexSources": "索引來源",
"loc.input.help.IndexSources": "指出是否要將來源伺服器資訊插入 PDB 檔案。只有 Windows 代理程式支援此選項。",
"loc.input.label.PublishSymbols": "發行符號",
Expand Down Expand Up @@ -71,5 +73,6 @@
"loc.messages.UnexpectedDbghelpdllExpected0Actual1": "已從未預期的路徑載入程式庫 dbghelp.dll。預期為 '{0}'。實際為 '{0}'。",
"loc.messages.UnsupportedSourceProvider0": "來源索引編製作業不支援來源提供者 '{0}'。",
"loc.messages.Win32Error0FromMethod1": "方法 '{1}' 遇到 Win32 錯誤 '{0}'。",
"loc.messages.NodeVersionSupport": "自 2024 年 8 月 31 日起將不再支援 Node v{0}。請將管線代理程式升級為 Node 16 以上的最新版本。"
"loc.messages.NodeVersionSupport": "自 2024 年 8 月 31 日起將不再支援 Node v{0}。請將管線代理程式升級為 Node 16 以上的最新版本。",
"loc.messages.ManifestFileNotFound": ""
}
Loading

0 comments on commit ec8af01

Please sign in to comment.