From 3e445902b6ee58330d77637b0d4ac1bb6d314662 Mon Sep 17 00:00:00 2001 From: Petr Kotas Date: Fri, 13 Aug 2021 11:28:26 +0200 Subject: [PATCH] Replace artifacts with direct code checkout Replaces configuration fetching via build pipeline with direct code checkout. Signed-off-by: Petr Kotas --- .pipelines/deploy-azure-env.yml | 5 ++-- .pipelines/int-release.yml | 7 +++--- .pipelines/prod-release.yml | 5 ++-- .../template-job-deploy-azure-env.yml | 25 ++++++------------- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/.pipelines/deploy-azure-env.yml b/.pipelines/deploy-azure-env.yml index 1c93b5980..68c2a9d75 100644 --- a/.pipelines/deploy-azure-env.yml +++ b/.pipelines/deploy-azure-env.yml @@ -4,8 +4,8 @@ pr: none parameters: - name: location -- name: vsoConfigBuildID - name: vsoDeployerBuildID +- name: configVersion jobs: - template: ./templates/template-job-deploy-azure-env.yml @@ -16,10 +16,9 @@ jobs: locations: - ${{ parameters.location }} configFileName: $(config-file-name) + configVersion: ${{ parameters.configVersion }} azureDevOpsJSONSPN: $(aro-v4-ci-devops-spn) vsoProjectID: $(vso-project-id) - vsoConfigPipelineID: $(vso-config-pipeline-id) - vsoConfigBuildID: ${{ parameters.vsoConfigBuildID }} vsoDeployerPipelineID: $(vso-deployer-pipeline-id) vsoDeployerBuildID: ${{ parameters.vsoDeployerBuildID }} azureDevOpsE2EJSONSPN: $(aro-v4-e2e-devops-spn) diff --git a/.pipelines/int-release.yml b/.pipelines/int-release.yml index 06a4745db..8e93e8558 100644 --- a/.pipelines/int-release.yml +++ b/.pipelines/int-release.yml @@ -6,9 +6,9 @@ parameters: - name: vsoDeployerBuildID type: string default: latest -- name: vsoConfigBuildID +- name: configVersion type: string - default: latest + default: int stages: - stage: Deploy_INT @@ -23,10 +23,9 @@ stages: locations: - eastus configFileName: int-config.yaml + configVersion: ${{ parameters.configVersion }} azureDevOpsJSONSPN: $(aro-v4-ci-devops-spn) vsoProjectID: $(vso-project-id) - vsoConfigPipelineID: $(vso-config-pipeline-id) - vsoConfigBuildID: ${{ parameters.vsoConfigBuildID }} vsoDeployerPipelineID: $(vso-deployer-pipeline-id) vsoDeployerBuildID: ${{ parameters.vsoDeployerBuildID }} azureDevOpsE2EJSONSPN: $(aro-v4-e2e-devops-spn) diff --git a/.pipelines/prod-release.yml b/.pipelines/prod-release.yml index 379461f11..e7f42aa4a 100644 --- a/.pipelines/prod-release.yml +++ b/.pipelines/prod-release.yml @@ -3,8 +3,8 @@ pr: none trigger: none parameters: -- name: vsoConfigBuildID - name: vsoDeployerBuildID +- name: configVersion stages: - stage: Deploy_CanarySector @@ -20,10 +20,9 @@ stages: - westcentralus - eastus2euap configFileName: prod-config.yaml + configVersion: ${{ parameters.configVersion }} azureDevOpsJSONSPN: $(aro-v4-ci-devops-spn) vsoProjectID: $(vso-project-id) - vsoConfigPipelineID: $(vso-config-pipeline-id) - vsoConfigBuildID: ${{ parameters.vsoConfigBuildID }} vsoDeployerPipelineID: $(vso-deployer-pipeline-id) vsoDeployerBuildID: ${{ parameters.vsoDeployerBuildID }} azureDevOpsE2EJSONSPN: $(aro-v4-e2e-devops-spn) diff --git a/.pipelines/templates/template-job-deploy-azure-env.yml b/.pipelines/templates/template-job-deploy-azure-env.yml index 01f0f0f7f..081da9c3c 100644 --- a/.pipelines/templates/template-job-deploy-azure-env.yml +++ b/.pipelines/templates/template-job-deploy-azure-env.yml @@ -5,14 +5,13 @@ parameters: azureDevOpsJSONSPN: '' billingE2EPipelineName: '' billingE2EBranchName: '' + configVersion: '' configFileName: '' e2eSubscription: '' environment: '' locations: [] rpMode: '' vsoProjectID: '' - vsoConfigPipelineID: '' - vsoConfigBuildID: '' vsoDeployerPipelineID: '' vsoDeployerBuildID: '' @@ -28,20 +27,12 @@ jobs: runOnce: deploy: steps: - - task: DownloadBuildArtifacts@0 - inputs: - buildType: specific - project: ${{ parameters.vsoProjectID }} - pipeline: ${{ parameters.vsoConfigPipelineID }} - ${{ if eq(parameters.vsoConfigBuildID, 'latest') }}: - buildVersionToDownload: latestFromBranch - branchName: refs/heads/master - ${{ if ne(parameters.vsoConfigBuildID, 'latest') }}: - buildVersionToDownload: specific - buildId: ${{ parameters.vsoConfigBuildID }} - downloadType: specific - downloadPath: $(System.ArtifactsDirectory)/config - displayName: Download Config + - ${{ if eq(parameters.configVersion, 'latest') }}: + - checkout: git://AzureRedHatOpenShift/RP-Config@refs/heads/master + path: $(Agent.BuildDirectory)/s/config + - ${{ if ne(parameters.configVersion, 'latest') }}: + - checkout: git://AzureRedHatOpenShift/RP-Config@refs/tags/${{parameters.configVersion}} + path: $(Agent.BuildDirectory)/s/config - task: DownloadBuildArtifacts@0 inputs: buildType: specific @@ -58,7 +49,7 @@ jobs: displayName: Download Deployer - template: ./template-deploy-azure-env.yml parameters: - configDirectory: $(System.ArtifactsDirectory)/config/drop/deploy + configDirectory: $(Agent.BuildDirectory)/s/config/deploy deployerDirectory: $(System.ArtifactsDirectory)/deployer/drop configFileName: ${{ parameters.configFileName }} location: ${{ location }}