variables:
|
|
AppName: basketapi
|
|
OpenShiftServiceConnection: 'OpenShift on ARO'
|
|
SourceImageRegistryProjectName: 'development'
|
|
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
|
|
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/webapp-deploy-template.yml -p APPLICATION_NAME=$(AppName) -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-'
|
|
failOnStderr: true
|
|
displayName: 'Ensure OpenShift DeploymentConfig and Service'
|