|
|
@ -1,3 +1,26 @@ |
|
|
|
variables: |
|
|
|
OpenShiftProject: development |
|
|
|
AppName: basketapi |
|
|
|
OpenShiftServiceConnection: 'OpenShift on ARO' |
|
|
|
resources: |
|
|
|
pipelines: |
|
|
|
- pipeline: BasketApiBuild |
|
|
|
source: Basket-API-Build |
|
|
|
stages: |
|
|
|
- stage: test |
|
|
|
dependsOn: test2 |
|
|
|
- stage: $(OpenShiftProject) |
|
|
|
displayName: Development |
|
|
|
jobs: |
|
|
|
- job: Configuration |
|
|
|
pool: |
|
|
|
vmImage: 'windows-latest' |
|
|
|
steps: |
|
|
|
- task: redhat.openshift-vsts.oc-setup-task.oc-setup@2 |
|
|
|
displayName: 'oc-setup ' |
|
|
|
inputs: |
|
|
|
openshiftService: $(OpenShiftServiceConnection) |
|
|
|
- script: 'oc project $(OpenShiftProject)' |
|
|
|
failOnStderr: true |
|
|
|
displayName: 'Set Project Context' |
|
|
|
- script: 'oc process -f $(Pipeline.Workspace)/openshift-webapp-deploy-template.yml -p APPLICATION_NAME=$(AppName) | oc apply -f-' |
|
|
|
failOnStderr: true |
|
|
|
displayName: 'Ensure OpenShift DeploymentConfig and Service' |