eShopOnContainers/deploy/aro/catalog-api/azure-pipelines.yml
2020-02-26 15:16:26 -08:00

41 lines
1.7 KiB
YAML

variables:
OpenShiftServiceConnection: 'OpenShift on ARO'
trigger:
branches:
include:
- master
- dev
paths:
include:
- deploy/aro/catalog-api/*
- deploy/aro/openshift-templates/*
stages:
- stage: development
displayName: Development
variables:
OpenShiftProject: development
SourceImageRegistryProjectName: development
EnvironmentName: -dev.msftnbu.com
jobs:
- job: CatalogApiDeployment
displayName: 'Catalog API Deployment'
variables:
- template: ../azure-devops-templates/variables.yml
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/catalogapi-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) -p PIC_BASE_URL=$(PicBaseUrl) -p RABBITMQ_HOSTNAME=$(RabbitMqHostname) -p CATALOG_PUBLIC_HOSTNAME=$(CatalogPublicHostName) -p CA_CERTIFICATE="$(CaCertificate)" -p CERTIFICATE="$(Certificate)" -p PRIVATE_KEY="$(PrivateKey)" | oc apply -f-'
failOnStderr: true
displayName: 'Ensure Catalog API OpenShift DeploymentConfig and Service'