From 6aeaad42ea055ec3720666015c910750e7d454b0 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Tue, 18 Feb 2020 15:37:23 +0300 Subject: [PATCH 1/4] Add step with download custom repository --- images.CI/azure-pipelines/image-generation.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/images.CI/azure-pipelines/image-generation.yml b/images.CI/azure-pipelines/image-generation.yml index 2f9840b6..459b55c3 100644 --- a/images.CI/azure-pipelines/image-generation.yml +++ b/images.CI/azure-pipelines/image-generation.yml @@ -6,6 +6,13 @@ jobs: - group: Image Generation Variables steps: + - pwsh: | + Remove-Item -path './*' -Recurse -Force + Write-Host "Download $(BRANCH_NAME) branch from $(IMAGE_GEN_REPO_URI)" + git clone $(IMAGE_GEN_REPO_URI) . -b $(BRANCH_NAME) --single-branch --depth 1 + displayName: 'Download custom repository' + condition: and(ne(variables['BRANCH_NAME'], ''), ne(variables['IMAGE_GEN_REPO_URI'], '')) + - task: PowerShell@2 displayName: 'Build VM' inputs: From 33a765dcc51a12204bbc89906f1217715b838542 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Tue, 18 Feb 2020 17:19:11 +0300 Subject: [PATCH 2/4] Change pwsh step to powershell step --- 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 459b55c3..bab1c1c8 100644 --- a/images.CI/azure-pipelines/image-generation.yml +++ b/images.CI/azure-pipelines/image-generation.yml @@ -6,7 +6,7 @@ jobs: - group: Image Generation Variables steps: - - pwsh: | + - powershell: | Remove-Item -path './*' -Recurse -Force Write-Host "Download $(BRANCH_NAME) branch from $(IMAGE_GEN_REPO_URI)" git clone $(IMAGE_GEN_REPO_URI) . -b $(BRANCH_NAME) --single-branch --depth 1 From 82bdea2dfe53bb63696e63fe5c6b92a0c87d13b6 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Wed, 19 Feb 2020 10:58:59 +0300 Subject: [PATCH 3/4] Update variables names --- images.CI/azure-pipelines/image-generation.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/images.CI/azure-pipelines/image-generation.yml b/images.CI/azure-pipelines/image-generation.yml index bab1c1c8..0c05a7e7 100644 --- a/images.CI/azure-pipelines/image-generation.yml +++ b/images.CI/azure-pipelines/image-generation.yml @@ -8,10 +8,10 @@ jobs: steps: - powershell: | Remove-Item -path './*' -Recurse -Force - Write-Host "Download $(BRANCH_NAME) branch from $(IMAGE_GEN_REPO_URI)" - git clone $(IMAGE_GEN_REPO_URI) . -b $(BRANCH_NAME) --single-branch --depth 1 + Write-Host "Download $(CUSTOM_REPOSITORY_BRANCH) branch from $(CUSTOM_REPOSITORY_URL)" + git clone $(CUSTOM_REPOSITORY_URL) . -b $(CUSTOM_REPOSITORY_BRANCH) --single-branch --depth 1 displayName: 'Download custom repository' - condition: and(ne(variables['BRANCH_NAME'], ''), ne(variables['IMAGE_GEN_REPO_URI'], '')) + condition: and(ne(variables['CUSTOM_REPOSITORY_BRANCH'], ''), ne(variables['CUSTOM_REPOSITORY_URL'], '')) - task: PowerShell@2 displayName: 'Build VM' From 68bde6422205d1b7aea26258f3b0376ea7120b01 Mon Sep 17 00:00:00 2001 From: MaksimZhukov Date: Wed, 19 Feb 2020 14:30:44 +0300 Subject: [PATCH 4/4] Change step to PowerShell task --- images.CI/azure-pipelines/image-generation.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/images.CI/azure-pipelines/image-generation.yml b/images.CI/azure-pipelines/image-generation.yml index 0c05a7e7..477cdc5f 100644 --- a/images.CI/azure-pipelines/image-generation.yml +++ b/images.CI/azure-pipelines/image-generation.yml @@ -6,12 +6,15 @@ jobs: - group: Image Generation Variables steps: - - powershell: | - 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 + - task: PowerShell@2 displayName: 'Download custom repository' condition: and(ne(variables['CUSTOM_REPOSITORY_BRANCH'], ''), ne(variables['CUSTOM_REPOSITORY_URL'], '')) + inputs: + targetType: 'inline' + 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 - task: PowerShell@2 displayName: 'Build VM'