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.

40 lines
1.5 KiB

  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. IdentityPublicHostName: identity$(EnvironmentName)
  24. jobs:
  25. - job: BasketApiDeployment
  26. displayName: 'Basket API Deployment'
  27. variables:
  28. - template: ../azure-devops-templates/variables.yml
  29. pool:
  30. vmImage: 'windows-latest'
  31. steps:
  32. - task: redhat.openshift-vsts.oc-setup-task.oc-setup@2
  33. displayName: 'Setup Openshift CLI'
  34. inputs:
  35. openshiftService: $(OpenShiftServiceConnection)
  36. - script: 'oc project $(OpenShiftProject)'
  37. failOnStderr: true
  38. displayName: 'Set OpenShift Project Context'
  39. - 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-'
  40. failOnStderr: true
  41. displayName: 'Ensure Basket API OpenShift DeploymentConfig and Service'