You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
2.5 KiB

variables:
OpenShiftServiceConnection: 'OpenShift on ARO'
trigger:
branches:
include:
- master
- dev
paths:
include:
- deploy/aro/infrastructure/*
- deploy/aro/openshift-templates/infrastructure/*
stages:
- stage: development
displayName: Development
variables:
OpenShiftProject: development
SourceImageRegistryProjectName: development
SqlHostName: mssql-server-linux.$(OpenShiftProject).svc
jobs:
- job: Infrastructure_Deployment
displayName: 'Infrastructure Deployment'
variables:
CatalogDbConnection: Server=$(SqlHostName);Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id=$(SqlUsername);Password=$(SqlPassword)
IdentityDbConnection: Server=$(SqlHostName);Database=Microsoft.eShopOnContainers.Service.IdentityDb;User Id=$(SqlUsername);Password=$(SqlPassword)
MarketingDbConnection: Server=$(SqlHostName);Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id=$(SqlUsername);Password=$(SqlPassword)
OrderingDbConnection: Server=$(SqlHostName);Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id=$(SqlUsername);Password=$(SqlPassword)
WebhooksDbConnection: Server=$(SqlHostName);Database=Microsoft.eShopOnContainers.Services.WebhooksDb;User Id=$(SqlUsername);Password=$(SqlPassword)
pool:
vmImage: 'windows-latest'
steps:
- task: AzureKeyVault@1
displayName: 'Azure Key Vault: openshift-demo-vault'
inputs:
azureSubscription: 'Azure OpenShift Demo'
KeyVaultName: 'openshift-demo-vault'
- task: redhat.openshift-vsts.oc-setup-task.oc-setup@2
displayName: 'Setup Openshift CLI'
inputs:
openshiftService: $(OpenShiftServiceConnection)
- script: 'oc project $(OpenShiftProject)'
failOnStderr: true
displayName: 'Set OpenShift Project Context'
- script: 'oc process -f ./deploy/aro/openshift-templates/infrastructure/secrets-deploy-template.yml -p CATALOG_DB_CONNECTION_SECRET=$(CatalogDbConnection) -p IDENTITY_DB_CONNECTION_SECRET=$(IdentityDbConnection) | oc apply -f-'
failOnStderr: true
displayName: 'Secrets Deployment'
- script: 'oc process -f ./deploy/aro/openshift-templates/infrastructure/rabbitmq-image-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-'
failOnStderr: true
displayName: 'RabbitMQ Deployment'