Updated deploy pipeline

This commit is contained in:
Tim McCarthy 2020-02-13 22:09:52 -06:00
parent f46f8d36e5
commit d13d9b0d40

View File

@ -1,5 +1,4 @@
variables: variables:
OpenShiftProject: development
AppName: basketapi AppName: basketapi
OpenShiftServiceConnection: 'OpenShift on ARO' OpenShiftServiceConnection: 'OpenShift on ARO'
resources: resources:
@ -9,6 +8,8 @@ resources:
stages: stages:
- stage: development - stage: development
displayName: Development displayName: Development
variables:
OpenShiftProject: development
jobs: jobs:
- job: Configuration - job: Configuration
pool: pool:
@ -18,12 +19,12 @@ stages:
inputs: inputs:
pipeline: BasketApiBuild pipeline: BasketApiBuild
- task: redhat.openshift-vsts.oc-setup-task.oc-setup@2 - task: redhat.openshift-vsts.oc-setup-task.oc-setup@2
displayName: 'oc-setup ' displayName: 'Setup Openshift CLI'
inputs: inputs:
openshiftService: $(OpenShiftServiceConnection) openshiftService: $(OpenShiftServiceConnection)
- script: 'oc project $(OpenShiftProject)' - script: 'oc project $(OpenShiftProject)'
failOnStderr: true failOnStderr: true
displayName: 'Set Project Context' displayName: 'Set OpenShift Project Context'
- script: 'oc process -f $(Pipeline.Workspace)/openshift-webapp-deploy-template.yml -p APPLICATION_NAME=$(AppName) | oc apply -f-' - script: 'oc process -f $(Pipeline.Workspace)/openshift-webapp-deploy-template.yml -p APPLICATION_NAME=$(AppName) | oc apply -f-'
failOnStderr: true failOnStderr: true
displayName: 'Ensure OpenShift DeploymentConfig and Service' displayName: 'Ensure OpenShift DeploymentConfig and Service'