Added variables template; wired up basketapi and identityapi deploy pipelines to use the new variables template

This commit is contained in:
Tim McCarthy 2020-02-20 17:00:08 -08:00
parent b7c6aeea6d
commit fe4236ee62
3 changed files with 12 additions and 13 deletions

View File

@ -0,0 +1,7 @@
variables:
IdentityApiHostName: identityapi.$(OpenShiftProject).svc
RedisHostname: redis.$(OpenShiftProject).svc
RabbitMqHostname: rabbitmq.$(OpenShiftProject).svc
IdentityPublicHostName: identity$(EnvironmentName)
IdentityUrlExternal: https://$(IdentityPublicHostName)
IdentityApiUrl: http://$(IdentityApiHostName):8080

View File

@ -23,13 +23,9 @@ stages:
IdentityPublicHostName: identity$(EnvironmentName)
jobs:
- job: BasketApiDeployment
variables:
IdentityApiHostName: identityapi.$(OpenShiftProject).svc
RedisHostname: redis.$(OpenShiftProject).svc
RabbitMqHostname: rabbitmq.$(OpenShiftProject).svc
IdentityUrlExternal: https://$(IdentityPublicHostName)
IdentityApiUrl: http://$(IdentityApiHostName):8080
displayName: 'Basket API Deployment'
variables:
- template: ../azure-devops-templates/variables.yml
pool:
vmImage: 'windows-latest'
steps:

View File

@ -20,15 +20,11 @@ stages:
OpenShiftProject: development
SourceImageRegistryProjectName: $(OpenShiftProject)
EnvironmentName: dev
IdentityApiHostName: identityapi.$(OpenShiftProject).svc
RedisHostname: redis.$(OpenShiftProject).svc
RabbitMqHostname: rabbitmq.$(OpenShiftProject).svc
IdentityPublicHostName: identity$(EnvironmentName)
IdentityUrlExternal: https://$(IdentityPublicHostName)
IdentityApiUrl: http://$(IdentityApiHostName):8080
jobs:
- job: Configuration_Deployment
displayName: 'Configuration Deployment'
variables:
- template: ../azure-devops-templates/variables.yml
pool:
vmImage: 'windows-latest'
steps:
@ -39,6 +35,6 @@ stages:
- script: 'oc project $(OpenShiftProject)'
failOnStderr: true
displayName: 'Set OpenShift Project Context'
- script: 'oc process -f ./deploy/aro/openshift-templates/identityapi-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-'
- script: 'oc process -f ./deploy/aro/openshift-templates/identityapi-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) -p WEB_SPA_URL= -p WEB_MVC_URL= -p LOCATION_API_URL= -p MARKETING_API_URL= -p BASKET_API_URL= -p ORDERING_API_URL= -p MOBILE_SHOPPING_AGGREGATOR_URL= -p WEB_SHOPPING_AGGREGATOR_URL= -p WEBHOOKS_API_URL= -p WEBHOOKS_WEB_CLIENT_URL= | oc apply -f-'
failOnStderr: true
displayName: 'Ensure Identity API OpenShift DeploymentConfig and Service'