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.

47 lines
2.2 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/identity-api/*
  11. stages:
  12. - stage: development
  13. displayName: Development
  14. variables:
  15. OpenShiftProject: development
  16. SourceImageRegistryProjectName: development
  17. EnvironmentName: -dev.msftnbu.com
  18. jobs:
  19. - job: IdentityApiDeployment
  20. displayName: 'Identity API Deployment'
  21. variables:
  22. - template: ../azure-devops-templates/variables.yml
  23. pool:
  24. vmImage: 'windows-latest'
  25. steps:
  26. - task: AzureKeyVault@1
  27. displayName: 'Azure Key Vault: openshift-demo-vault'
  28. inputs:
  29. azureSubscription: 'Azure OpenShift Demo'
  30. KeyVaultName: 'openshift-demo-vault'
  31. - task: colinsalmcorner.colinsalmcorner-buildtasks.replace-tokens-task.ReplaceTokens@1
  32. displayName: 'Replace tokens in identity-public-route'
  33. inputs:
  34. sourcePath: ./deploy/aro/identity-api
  35. filePattern: identity-public-route.json
  36. - task: redhat.openshift-vsts.oc-setup-task.oc-setup@2
  37. displayName: 'Setup Openshift CLI'
  38. inputs:
  39. openshiftService: $(OpenShiftServiceConnection)
  40. - script: 'oc project $(OpenShiftProject)'
  41. failOnStderr: true
  42. displayName: 'Set OpenShift Project Context'
  43. - script: 'oc process -f ./deploy/aro/identity-api/identityapi-deploy-template.yml -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) -p WEB_SPA_URL=$(WebSpaUrl) -p WEB_MVC_URL=$(WebMvcUrl) -p LOCATION_API_URL=$(LocationsApiUrl) -p MARKETING_API_URL=$(MarketingApiUrl) -p BASKET_API_URL=$(BasketApiUrl) -p ORDERING_API_URL=$(OrderingApiUrl) -p MOBILE_SHOPPING_AGGREGATOR_URL=$(MobileShoppingAggregatorUrl) -p WEB_SHOPPING_AGGREGATOR_URL=$(WebShoppingAggregatorUrl) -p WEBHOOKS_API_URL=$(WebhooksApiUrl) -p WEBHOOKS_WEB_CLIENT_URL=$(WebhooksWebClientUrl) | oc apply -f-'
  44. failOnStderr: true
  45. displayName: 'Ensure Identity API OpenShift DeploymentConfig and Service'
  46. - script: 'oc apply -f ./deploy/aro/identity-api/identity-public-route.json'
  47. failOnStderr: true
  48. displayName: 'Ensure Identity API Route'