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.

45 lines
1.6 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/catalog-api/*
  11. - deploy/aro/openshift-templates/*
  12. stages:
  13. - stage: development
  14. displayName: Development
  15. variables:
  16. OpenShiftProject: development
  17. SourceImageRegistryProjectName: development
  18. EnvironmentName: -dev.msftnbu.com
  19. jobs:
  20. - job: CatalogApiDeployment
  21. displayName: 'Catalog API Deployment'
  22. variables:
  23. - template: ../azure-devops-templates/variables.yml
  24. pool:
  25. vmImage: 'windows-latest'
  26. steps:
  27. - task: AzureKeyVault@1
  28. displayName: 'Azure Key Vault: openshift-demo-vault'
  29. inputs:
  30. azureSubscription: 'Azure OpenShift Demo'
  31. KeyVaultName: 'openshift-demo-vault'
  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/catalogapi-deploy-template.yml
  40. -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName)
  41. -p PIC_BASE_URL=$(PicBaseUrl)
  42. -p RABBITMQ_HOSTNAME=$(RabbitMqHostname)
  43. -p CATALOG_PUBLIC_HOSTNAME=$(CatalogPublicHostName)
  44. | oc apply -f-'
  45. failOnStderr: true
  46. displayName: 'Ensure Catalog API OpenShift DeploymentConfig and Service'