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.9 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
jobs:
- job: Infrastructure_Deployment
displayName: 'Infrastructure Deployment'
variables:
SqlHostName: $[format('mssql-server-linux.{0}.svc', variables['OpenShiftProject'])]
CatalogDbConnection: $[format('Server={0};Database=Microsoft.eShopOnContainers.Services.CatalogDb;User Id={1};Password={2}', variables['SqlHostName'], variables['SqlUsername'], variables['SqlPassword'])]
IdentityDbConnection: $[format('Server={0};Database=Microsoft.eShopOnContainers.Services.IdentityDb;User Id={1};Password={2}', variables['SqlHostName'], variables['SqlUsername'], variables['SqlPassword'])]
MarketingDbConnection: $[format('Server={0};Database=Microsoft.eShopOnContainers.Services.MarketingDb;User Id={1};Password={2}', variables['SqlHostName'], variables['SqlUsername'], variables['SqlPassword'])]
OrderingDbConnection: $[format('Server={0};Database=Microsoft.eShopOnContainers.Services.OrderingDb;User Id={1};Password={2}', variables['SqlHostName'], variables['SqlUsername'], variables['SqlPassword'])]
WebhooksDbConnection: $[format('Server={0};Database=Microsoft.eShopOnContainers.Services.WebhooksDb;User Id={1};Password={2}', variables['SqlHostName'], variables['SqlUsername'], variables['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=12345 -p IDENTITY_DB_CONNECTION_SECRET=12345 -p MARKETING_DB_CONNECTION_SECRET=12345 -p ORDERING_DB_CONNECTION_SECRET=12345 -p SQL_PASSWORD_SECRET=12345 -p WEBHOOKS_DB_CONNECTION_SECRET=12345 | 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'