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

variables:
OpenShiftServiceConnection: 'OpenShift on ARO'
trigger:
branches:
include:
- master
- dev
paths:
include:
- deploy/aro/web-mvc/*
stages:
- stage: development
displayName: Development
variables:
OpenShiftProject: development
SourceImageRegistryProjectName: development
EnvironmentName: -dev.msftnbu.com
jobs:
- job: WebMvcDeployment
displayName: 'Web MVC 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 webmvc-public-route'
inputs:
sourcePath: ./deploy/aro/web-mvc
filePattern: webmvc-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/web-mvc/webmvc-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) -p IDENTITY_API_URL=$(IdentityApiUrl) -p WEB_SHOPPING_API_GATEWAY_URL=$(WebShoppingApiGatewayUrl) -p MARKETING_API_URL=$(MarketingApiUrl) -p IDENTITY_API_HC_URL=$(IdentityApiHc) -p ORDERING_SIGNALR_HUB_URL=$(OrderingSignalRHubUrl) | oc apply -f-'
failOnStderr: true
displayName: 'Ensure Web MVC OpenShift DeploymentConfig and Service'
- script: 'oc apply -f ./deploy/aro/web-mvc/webmvc-public-route.json'
failOnStderr: true
displayName: 'Ensure Web MVC API Route'