From 50cd92aade7a77fdfeed8893ff825d7921866804 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Thu, 20 Feb 2020 19:10:36 +0300 Subject: [PATCH 1/3] Fix github issue --- images.CI/azure-pipelines/image-generation.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images.CI/azure-pipelines/image-generation.yml b/images.CI/azure-pipelines/image-generation.yml index eb0136eb..20adde52 100644 --- a/images.CI/azure-pipelines/image-generation.yml +++ b/images.CI/azure-pipelines/image-generation.yml @@ -14,7 +14,7 @@ jobs: script: | Remove-Item -path './*' -Recurse -Force Write-Host "Download $(CUSTOM_REPOSITORY_BRANCH) branch from $(CUSTOM_REPOSITORY_URL)" - git clone $(CUSTOM_REPOSITORY_URL) . -b $(CUSTOM_REPOSITORY_BRANCH) --single-branch --depth 1 + cmd /c "git clone $(CUSTOM_REPOSITORY_URL) . -b $(CUSTOM_REPOSITORY_BRANCH) --single-branch --depth 1 2>&1" - task: PowerShell@2 displayName: 'Build VM' From aa4c025a44514d590048f867353da1a5dc47b47c Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Thu, 20 Feb 2020 22:23:17 +0300 Subject: [PATCH 2/3] Add comment --- images.CI/azure-pipelines/image-generation.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/images.CI/azure-pipelines/image-generation.yml b/images.CI/azure-pipelines/image-generation.yml index 20adde52..d4fdf0ea 100644 --- a/images.CI/azure-pipelines/image-generation.yml +++ b/images.CI/azure-pipelines/image-generation.yml @@ -14,6 +14,8 @@ jobs: script: | Remove-Item -path './*' -Recurse -Force Write-Host "Download $(CUSTOM_REPOSITORY_BRANCH) branch from $(CUSTOM_REPOSITORY_URL)" + # git in powershell sometimes broke the AzDO pipelines with incorrect stdout interpretation + # we redirect the git output to stdout manually to avoid this issue. cmd /c "git clone $(CUSTOM_REPOSITORY_URL) . -b $(CUSTOM_REPOSITORY_BRANCH) --single-branch --depth 1 2>&1" - task: PowerShell@2 From 883c1e3253b5582f3024f02fa89580dbdb4bf9be Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Fri, 21 Feb 2020 10:30:54 +0300 Subject: [PATCH 3/3] Update comment --- images.CI/azure-pipelines/image-generation.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/images.CI/azure-pipelines/image-generation.yml b/images.CI/azure-pipelines/image-generation.yml index d4fdf0ea..51850254 100644 --- a/images.CI/azure-pipelines/image-generation.yml +++ b/images.CI/azure-pipelines/image-generation.yml @@ -14,8 +14,8 @@ jobs: script: | Remove-Item -path './*' -Recurse -Force Write-Host "Download $(CUSTOM_REPOSITORY_BRANCH) branch from $(CUSTOM_REPOSITORY_URL)" - # git in powershell sometimes broke the AzDO pipelines with incorrect stdout interpretation - # we redirect the git output to stdout manually to avoid this issue. + # git on self-hosted agent produces some output to stderr even during successful cloning + # use cmd output redirect to overcome it cmd /c "git clone $(CUSTOM_REPOSITORY_URL) . -b $(CUSTOM_REPOSITORY_BRANCH) --single-branch --depth 1 2>&1" - task: PowerShell@2