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.

52 lines
2.0 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/catalog-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: CatalogApiDeployment
  20. displayName: 'Catalog 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 catalog-public-route'
  33. inputs:
  34. sourcePath: ./deploy/aro/catalog-api
  35. filePattern: catalog-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/catalog-api/catalogapi-deploy-template.yml
  44. -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName)
  45. -p PIC_BASE_URL=$(PicBaseUrl)
  46. -p RABBITMQ_HOSTNAME=$(RabbitMqHostname)
  47. -p CATALOG_PUBLIC_HOSTNAME=$(CatalogPublicHostName)
  48. | oc apply -f-'
  49. failOnStderr: true
  50. displayName: 'Ensure Catalog API OpenShift DeploymentConfig and Service'
  51. - script: 'oc apply -f ./deploy/aro/catalog-api/catalog-public-route.json'
  52. failOnStderr: true
  53. displayName: 'Ensure Catalog API Route'