Add Billing E2E into RP release pipeline (#652)

* Add Billing E2E into RP release pipeline

* add missed branch name parameter
This commit is contained in:
Zhuoli Liang 2020-05-06 12:14:31 -07:00 коммит произвёл GitHub
Родитель 7fd17eaa11
Коммит a4642b68b8
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 58 добавлений и 2 удалений

Просмотреть файл

@ -18,3 +18,5 @@ jobs:
vsoDeployerPipelineID: $(vso-deployer-pipeline-id)
azureDevOpsE2EJSONSPN: $(aro-v4-e2e-devops-spn)
e2eSubscription: $(e2e-subscription)
billingE2EPipelineName: $(billing-e2e-pipeline-name)
billingE2EBranchName: $(billing-e2e-branch-name)

Просмотреть файл

@ -19,3 +19,5 @@ stages:
vsoDeployerPipelineID: $(vso-deployer-pipeline-id)
azureDevOpsE2EJSONSPN: $(aro-v4-e2e-devops-spn)
e2eSubscription: $(e2e-subscription)
billingE2EPipelineName: $(billing-e2e-pipeline-name)
billingE2EBranchName: $(billing-e2e-branch-name)

Просмотреть файл

@ -19,6 +19,8 @@ stages:
vsoDeployerPipelineID: $(vso-deployer-pipeline-id)
azureDevOpsE2EJSONSPN: $(aro-v4-e2e-devops-spn)
e2eSubscription: $(e2e-subscription)
billingE2EPipelineName: $(billing-e2e-pipeline-name)
billingE2EBranchName: $(billing-e2e-branch-name)
- stage: Deploy_USSector
condition: succeededOrFailed()
dependsOn: [Deploy_LowTrafficSector]
@ -39,6 +41,8 @@ stages:
vsoDeployerPipelineID: $(vso-deployer-pipeline-id)
azureDevOpsE2EJSONSPN: $(aro-v4-e2e-devops-spn)
e2eSubscription: $(e2e-subscription)
billingE2EPipelineName: $(billing-e2e-pipeline-name)
billingE2EBranchName: $(billing-e2e-branch-name)
- stage: Deploy_EuropeSector
dependsOn: [Deploy_USSector]
condition: succeededOrFailed()
@ -57,6 +61,8 @@ stages:
vsoDeployerPipelineID: $(vso-deployer-pipeline-id)
azureDevOpsE2EJSONSPN: $(aro-v4-e2e-devops-spn)
e2eSubscription: $(e2e-subscription)
billingE2EPipelineName: $(billing-e2e-pipeline-name)
billingE2EBranchName: $(billing-e2e-branch-name)
- stage: Deploy_ROWSector
dependsOn: [Deploy_EuropeSector]
condition: succeededOrFailed()
@ -76,3 +82,5 @@ stages:
vsoDeployerPipelineID: $(vso-deployer-pipeline-id)
azureDevOpsE2EJSONSPN: $(aro-v4-e2e-devops-spn)
e2eSubscription: $(e2e-subscription)
billingE2EPipelineName: $(billing-e2e-pipeline-name)
billingE2EBranchName: $(billing-e2e-branch-name)

Просмотреть файл

@ -9,6 +9,8 @@ parameters:
vsoDeployerPipelineID: ''
azureDevOpsE2EJSONSPN: ''
e2eSubscription: ''
billingE2EPipelineName: ''
billingE2EBranchName: ''
jobs:
- ${{ each location in parameters.locations }}:
@ -56,7 +58,7 @@ jobs:
configFileName: ${{ parameters.configFileName }}
location: ${{ location }}
azureDevOpsJSONSPN: ${{ parameters.azureDevOpsJSONSPN }}
- job: ${{ location }}_E2E
- job: RP_E2E_${{ location }}
dependsOn: Deploy_${{ location }}
variables:
- template: ../vars.yml
@ -73,4 +75,46 @@ jobs:
location: ${{ location }}
subscription: ${{ parameters.e2eSubscription }}
azureDevOpsE2EJSONSPN: ${{ parameters.azureDevOpsE2EJSONSPN }}
# trigger billing e2e after wait
- job: Billing_E2E_${{ location }}_Wait
dependsOn: RP_E2E_${{ location }}
timeoutInMinutes: 400
pool: server
steps:
- task: Delay@1
inputs:
delayForMinutes: '360'
- job: ${{ location }}_TriggerBillingBuild
displayName: Trigger Billing E2E pipeline
dependsOn: Billing_E2E_${{ location }}_Wait
steps:
- script: |
# Pass variables between tasks: https://medium.com/microsoftazure/how-to-pass-variables-in-azure-pipelines-yaml-tasks-5c81c5d31763
echo "##vso[task.setvariable variable=REGION]${{ location }}"
CLUSTER="v4-e2e-V$BUILD_BUILDID"
echo "##vso[task.setvariable variable=CLUSTER]$CLUSTER"
CLUSTER_RESOURCEGROUP="v4-e2e-rg-V$BUILD_BUILDID-${{ location }}"
echo "##vso[task.setvariable variable=CLUSTER_RESOURCEGROUP]$CLUSTER_RESOURCEGROUP"
echo "E2E Cluster Resource Group Name:" $CLUSTER_RESOURCEGROUP
echo "E2E Cluster Name:" $CLUSTER
displayName: Pass variables into next Task
- task: TriggerBuild@3
inputs:
definitionIsInCurrentTeamProject: true
buildDefinition: $(billingE2EPipelineName)
queueBuildForUserThatTriggeredBuild: true
ignoreSslCertificateErrors: false
useSameSourceVersion: false
useCustomSourceVersion: false
useSameBranch: false
branchToUse: ${{ parameters.billingE2EBranchName }}
waitForQueuedBuildsToFinish: true
storeInEnvironmentVariable: false
buildParameters: CLUSTER_RESOURCEGROUP:$(CLUSTER_RESOURCEGROUP), CLUSTER:$(CLUSTER),
REGION:$(REGION)
authenticationMethod: OAuth Token
password: $(System.AccessToken)
enableBuildInQueueCondition: false
dependentOnSuccessfulBuildCondition: true
dependentOnFailedBuildCondition: true
checkbuildsoncurrentbranch: false
failTaskIfConditionsAreNotFulfilled: true