From 771e2ad35c806520d1da6aba5304b3719b5c2570 Mon Sep 17 00:00:00 2001 From: Kanika Pasrija <58769601+kanika1894@users.noreply.github.com> Date: Tue, 15 Dec 2020 17:41:58 +0530 Subject: [PATCH] Fixing bug - Azure pipeline with GH repo (#200) * Added GitHub Workflow YAML definition. * path fixes * del file * adding comment Co-authored-by: Kanika Pasrija Co-authored-by: Kanika Pasrija --- src/configure/configurers/azurePipelineConfigurer.ts | 3 ++- src/configure/helper/devOps/azureDevOpsHelper.ts | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/configure/configurers/azurePipelineConfigurer.ts b/src/configure/configurers/azurePipelineConfigurer.ts index d1a232d1..692e591d 100644 --- a/src/configure/configurers/azurePipelineConfigurer.ts +++ b/src/configure/configurers/azurePipelineConfigurer.ts @@ -220,7 +220,8 @@ export class AzurePipelineConfigurer implements Configurer { } public async getPathToPipelineFile(inputs: WizardInputs, localGitRepoHelper: LocalGitRepoHelper): Promise { - return path.join(inputs.sourceRepository.localPath, await LocalGitRepoHelper.GetAvailableFileName('azure-pipelines.yml', inputs.sourceRepository.localPath)); + let rootDirectory = await localGitRepoHelper.getGitRootDirectory(); + return path.join(rootDirectory, await LocalGitRepoHelper.GetAvailableFileName('azure-pipelines.yml', rootDirectory)); } public async getPathToManifestFile(inputs: WizardInputs, localGitRepoHelper: LocalGitRepoHelper, fileName: string): Promise { return null; } diff --git a/src/configure/helper/devOps/azureDevOpsHelper.ts b/src/configure/helper/devOps/azureDevOpsHelper.ts index 9382532f..14a5caa4 100644 --- a/src/configure/helper/devOps/azureDevOpsHelper.ts +++ b/src/configure/helper/devOps/azureDevOpsHelper.ts @@ -117,7 +117,7 @@ export class AzureDevOpsHelper { }, process: { type: 2, - yamlFileName: path.join(inputs.pipelineConfiguration.workingDirectory, path.basename(inputs.pipelineConfiguration.filePath)) + yamlFileName: path.basename(inputs.pipelineConfiguration.filePath) // As required, it will be at the root location and should be same as committed pipeline file }, queue: { id: queueId // Default queue Hosted VS 2017. This value is overriden by queue specified in YAML @@ -168,4 +168,4 @@ export class AzureDevOpsHelper { sourceVersion: inputs.sourceRepository.commitId }; } -} +} \ No newline at end of file