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.

43 lines
1.7 KiB

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