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.
 
 
 
 
 
 

44 lines
1.7 KiB

variables:
OpenShiftServiceConnection: 'OpenShift on ARO'
trigger:
branches:
include:
- master
- dev
paths:
include:
- deploy/aro/basket-api/*
- deploy/aro/openshift-templates/*
resources:
pipelines:
- pipeline: BasketApiBuild
source: Basket-API-Build
stages:
- stage: development
displayName: Development
variables:
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'
pool:
vmImage: 'windows-latest'
steps:
- 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/basketapi-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) -p IDENTITY_URL_EXTERNAL=$(IdentityUrlExternal) -p IDENTITY_URL=$(IdentityApiUrl) -p REDIS_HOSTNAME=$(RedisHostname) -p RABBITMQ_HOSTNAME=$(RabbitMqHostname) | oc apply -f-'
failOnStderr: true
displayName: 'Ensure Basket API OpenShift DeploymentConfig and Service'