зеркало из https://github.com/Azure/ARO-RP.git
templatize the deployment job so that it can be reused in a release pipeline
This commit is contained in:
Родитель
52be9641ff
Коммит
fb2f6d52b8
|
@ -2,45 +2,12 @@
|
|||
trigger: none
|
||||
pr: none
|
||||
|
||||
variables:
|
||||
- template: vars.yml
|
||||
|
||||
jobs:
|
||||
- job: "Deploy"
|
||||
pool:
|
||||
vmImage: "ubuntu-latest"
|
||||
steps:
|
||||
- template: ./templates/template-setup-golang-env.yml
|
||||
parameters:
|
||||
gobin: ${{ variables.GOBIN }}
|
||||
gopath: ${{ variables.GOPATH }}
|
||||
goroot: ${{ variables.GOROOT }}
|
||||
modulePath: ${{ variables.modulePath }}
|
||||
- task: DownloadBuildArtifacts@0
|
||||
inputs:
|
||||
buildType: 'specific'
|
||||
project: '5d69ab04-7ded-49dc-84d5-bbbcac4add8d'
|
||||
pipeline: '129296'
|
||||
buildVersionToDownload: 'latestFromBranch'
|
||||
branchName: 'refs/heads/master'
|
||||
downloadType: 'specific'
|
||||
downloadPath: '$(System.ArtifactsDirectory)/config'
|
||||
displayName: "Download Config"
|
||||
- task: DownloadBuildArtifacts@0
|
||||
inputs:
|
||||
buildType: 'specific'
|
||||
project: '5d69ab04-7ded-49dc-84d5-bbbcac4add8d'
|
||||
pipeline: '120903'
|
||||
buildVersionToDownload: 'latestFromBranch'
|
||||
branchName: 'refs/heads/master'
|
||||
downloadType: 'specific'
|
||||
downloadPath: '$(System.ArtifactsDirectory)/deployer'
|
||||
displayName: "Download Deployer"
|
||||
- template: ./templates/template-deploy-azure-env.yml
|
||||
parameters:
|
||||
workingDirectory: $(system.defaultWorkingDirectory)
|
||||
configDirectory: '$(System.ArtifactsDirectory)/config/drop/deploy'
|
||||
deployerDirectory: '$(System.ArtifactsDirectory)/deployer/drop'
|
||||
configFileName: $(CONFIG_FILE_NAME)
|
||||
location: $(LOCATION)
|
||||
azureDevOpsJSONSPN: $(aro-v4-ci-devops-spn)
|
||||
- template: ./templates-job-deploy-azure-env.yml
|
||||
parameters:
|
||||
LOCATION: $(LOCATION)
|
||||
CONFIG_FILE_NAME: $(CONFIG_FILE_NAME)
|
||||
aro-v4-ci-devops-spn: $(aro-v4-ci-devops-spn)
|
||||
vso-project-id: $(vso-project-id)
|
||||
vso-config-build-id: $(vso-config-build-id)
|
||||
vso-deployer-build-id: $(vso-deployer-build-id)
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
# Azure DevOps Job deploying rp
|
||||
parameters:
|
||||
LOCATION: ""
|
||||
CONFIG_FILE_NAME: ""
|
||||
aro-v4-ci-devops-spn: ""
|
||||
vso-project-id: ""
|
||||
vso-config-pipeline-id: ""
|
||||
vso-deployer-pipeline-id: ""
|
||||
|
||||
variables:
|
||||
- template: vars.yml
|
||||
|
||||
jobs:
|
||||
- job: "Deploy"
|
||||
pool:
|
||||
vmImage: "ubuntu-latest"
|
||||
steps:
|
||||
- template: ./templates/template-setup-golang-env.yml
|
||||
parameters:
|
||||
gobin: ${{ variables.GOBIN }}
|
||||
gopath: ${{ variables.GOPATH }}
|
||||
goroot: ${{ variables.GOROOT }}
|
||||
modulePath: ${{ variables.modulePath }}
|
||||
- task: DownloadBuildArtifacts@0
|
||||
inputs:
|
||||
buildType: 'specific'
|
||||
project: ${{ parameters.vso-project-id }}
|
||||
pipeline: ${{ parameters.vso-config-pipeline-id }}
|
||||
buildVersionToDownload: 'latestFromBranch'
|
||||
branchName: 'refs/heads/master'
|
||||
downloadType: 'specific'
|
||||
downloadPath: '$(System.ArtifactsDirectory)/config'
|
||||
displayName: "Download Config"
|
||||
- task: DownloadBuildArtifacts@0
|
||||
inputs:
|
||||
buildType: 'specific'
|
||||
project: ${{ parameters.vso-project-id }}
|
||||
pipeline: ${{ parameters.vso-deployer-pipeline-id }}
|
||||
buildVersionToDownload: 'latestFromBranch'
|
||||
branchName: 'refs/heads/master'
|
||||
downloadType: 'specific'
|
||||
downloadPath: '$(System.ArtifactsDirectory)/deployer'
|
||||
displayName: "Download Deployer"
|
||||
- template: ./templates/template-deploy-azure-env.yml
|
||||
parameters:
|
||||
workingDirectory: $(system.defaultWorkingDirectory)
|
||||
configDirectory: '$(System.ArtifactsDirectory)/config/drop/deploy'
|
||||
deployerDirectory: '$(System.ArtifactsDirectory)/deployer/drop'
|
||||
configFileName: ${{ parameters.CONFIG_FILE_NAME }}
|
||||
location: ${{ parameters.LOCATION }}
|
||||
azureDevOpsJSONSPN: ${{ parameters.aro-v4-ci-devops-spn }}
|
Загрузка…
Ссылка в новой задаче