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.

37 lines
1.2 KiB

5 years ago
  1. variables:
  2. AppName: basketapi
  3. OpenShiftServiceConnection: 'OpenShift on ARO'
  4. SourceImageRegistryProjectName: 'development'
  5. trigger:
  6. branches:
  7. include:
  8. - master
  9. - dev
  10. paths:
  11. include:
  12. - deploy/aro/basket-api/*
  13. - deploy/aro/openshift-templates/*
  14. resources:
  15. pipelines:
  16. - pipeline: BasketApiBuild
  17. source: Basket-API-Build
  18. stages:
  19. - stage: development
  20. displayName: Development
  21. variables:
  22. OpenShiftProject: development
  23. jobs:
  24. - job: Configuration_Deployment
  25. displayName: 'Configuration Deployment'
  26. pool:
  27. vmImage: 'windows-latest'
  28. steps:
  29. - task: redhat.openshift-vsts.oc-setup-task.oc-setup@2
  30. displayName: 'Setup Openshift CLI'
  31. inputs:
  32. openshiftService: $(OpenShiftServiceConnection)
  33. - script: 'oc project $(OpenShiftProject)'
  34. failOnStderr: true
  35. displayName: 'Set OpenShift Project Context'
  36. - 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-'
  37. failOnStderr: true
  38. displayName: 'Ensure OpenShift DeploymentConfig and Service'