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 jobs: - job: Infrastructure_Deployment displayName: 'Infrastructure Deployment' variables: SqlHostName: mssql-server-linux.$(OpenShiftProject).svc 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)" -p MARKETING_DB_CONNECTION_SECRET="$(MarketingDbConnection)" -p ORDERING_DB_CONNECTION_SECRET="$(OrderingDbConnection)" -p SQL_PASSWORD_SECRET=$(SqlPassword) -p WEBHOOKS_DB_CONNECTION_SECRET="$(WebhooksDbConnection)" | oc apply -f-' failOnStderr: true displayName: 'Secrets Deployment' - script: 'oc process -f ./deploy/aro/openshift-templates/infrastructure/rabbitmq-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-' failOnStderr: true displayName: 'RabbitMQ Deployment' - script: 'oc process -f ./deploy/aro/openshift-templates/infrastructure/redis-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-' failOnStderr: true displayName: 'Redis Deployment' - script: 'oc process -f ./deploy/aro/openshift-templates/infrastructure/seq-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-' failOnStderr: true displayName: 'Seq Deployment' - script: 'oc process -f ./deploy/aro/openshift-templates/infrastructure/mssql-server-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-' failOnStderr: true displayName: 'SQL Server Deployment' - script: 'oc process -f ./deploy/aro/openshift-templates/infrastructure/mongo-db-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-' failOnStderr: true displayName: 'MongoDB Deployment'