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.2 KiB

variables:
OpenShiftServiceConnection: 'OpenShift on ARO'
trigger:
branches:
include:
- master
- dev
paths:
include:
- deploy/aro/identity-api/*
stages:
- stage: development
displayName: Development
variables:
OpenShiftProject: development
SourceImageRegistryProjectName: development
EnvironmentName: -dev.msftnbu.com
jobs:
- job: IdentityApiDeployment
displayName: 'Identity 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: colinsalmcorner.colinsalmcorner-buildtasks.replace-tokens-task.ReplaceTokens@1
displayName: 'Replace tokens in identity-public-route'
inputs:
sourcePath: ./deploy/aro/identity-api
filePattern: identity-public-route.json
- 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/identity-api/identityapi-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) -p WEB_SPA_URL=$(WebSpaUrl) -p WEB_MVC_URL=$(WebMvcUrl) -p LOCATION_API_URL=$(LocationsApiUrl) -p MARKETING_API_URL=$(MarketingApiUrl) -p BASKET_API_URL=$(BasketApiUrl) -p ORDERING_API_URL=$(OrderingApiUrl) -p MOBILE_SHOPPING_AGGREGATOR_URL=$(MobileShoppingAggregatorUrl) -p WEB_SHOPPING_AGGREGATOR_URL=$(WebShoppingAggregatorUrl) -p WEBHOOKS_API_URL=$(WebhooksApiUrl) -p WEBHOOKS_WEB_CLIENT_URL=$(WebhooksWebClientUrl) | oc apply -f-'
failOnStderr: true
displayName: 'Ensure Identity API OpenShift DeploymentConfig and Service'
- script: 'oc apply -f ./deploy/aro/identity-api/identity-public-route.json'
failOnStderr: true
displayName: 'Ensure Identity API Route'