Browse Source

Switched to JSON file

pull/1259/head
Tim McCarthy 5 years ago
parent
commit
248349248f
2 changed files with 44 additions and 6 deletions
  1. +18
    -6
      deploy/aro/catalog-api/azure-pipelines.yml
  2. +26
    -0
      deploy/aro/catalog-api/catalog-public-route.json

+ 18
- 6
deploy/aro/catalog-api/azure-pipelines.yml View File

@ -33,10 +33,22 @@ stages:
displayName: 'Replace tokens in catalog-public-route' displayName: 'Replace tokens in catalog-public-route'
inputs: inputs:
sourcePath: ./deploy/aro/catalog-api sourcePath: ./deploy/aro/catalog-api
filePattern: catalog-public-route.yml
- task: CopyFiles@2
filePattern: catalog-public-route.json
- task: redhat.openshift-vsts.oc-setup-task.oc-setup@2
displayName: 'Setup Openshift CLI'
inputs: inputs:
contents: deploy/aro/catalog-api/**
targetFolder: $(Build.ArtifactStagingDirectory)
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
openshiftService: $(OpenShiftServiceConnection)
- script: 'oc project $(OpenShiftProject)'
failOnStderr: true
displayName: 'Set OpenShift Project Context'
- script: 'oc process -f ./deploy/aro/openshift-templates/catalogapi-deploy-template.yml
-p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName)
-p PIC_BASE_URL=$(PicBaseUrl)
-p RABBITMQ_HOSTNAME=$(RabbitMqHostname)
-p CATALOG_PUBLIC_HOSTNAME=$(CatalogPublicHostName)
| oc apply -f-'
failOnStderr: true
displayName: 'Ensure Catalog API OpenShift DeploymentConfig and Service'
- script: 'oc apply -f ./deploy/aro/catalog-api/catalog-public-route.json'
failOnStderr: true
displayName: 'Ensure Catalog API Route'

+ 26
- 0
deploy/aro/catalog-api/catalog-public-route.json View File

@ -0,0 +1,26 @@
{
"apiVersion": "v1",
"kind": "Route",
"metadata": {
"labels": {
"app": "catalogapi"
},
"name": "catalog-public-route"
},
"spec": {
"host": "__CatalogPublicHostName__",
"port": {
"targetPort": "8080-tcp"
},
"to": {
"kind": "Service",
"name": "catalogapi"
},
"tls": {
"termination": "edge",
"key": "__PrivateKey2__",
"certificate": "__Certificate2__",
"caCertificate": "__CaCertificate2__"
}
}
}

Loading…
Cancel
Save