diff --git a/build/aro/readme.md b/build/aro/readme.md index 5397e5635..ca2a66101 100644 --- a/build/aro/readme.md +++ b/build/aro/readme.md @@ -1,4 +1,4 @@ -# OpenShift on ARO build definitions +# Azure Red Hat OpenShift (ARO) build definitions This folder contains the Azure DevOps build definitions in YAML format targeting container builds in OpenShift on ARO. Each folder contains one `azure-pipelines.yml` that contains the build definition for one microservice. The container images are built inside of the OpenShift cluster from the latest release of the RHEL .NET Core base image. diff --git a/deploy/aro/basket-api/azure-pipelines.yml b/deploy/aro/basket-api/azure-pipelines.yml index 16276cbf0..78d43d216 100644 --- a/deploy/aro/basket-api/azure-pipelines.yml +++ b/deploy/aro/basket-api/azure-pipelines.yml @@ -16,7 +16,6 @@ stages: OpenShiftProject: development SourceImageRegistryProjectName: development EnvironmentName: dev - IdentityPublicHostName: identity$(EnvironmentName) jobs: - job: BasketApiDeployment displayName: 'Basket API Deployment' diff --git a/deploy/aro/locations-api/azure-pipelines.yml b/deploy/aro/locations-api/azure-pipelines.yml index 31dc074d6..e724a14f5 100644 --- a/deploy/aro/locations-api/azure-pipelines.yml +++ b/deploy/aro/locations-api/azure-pipelines.yml @@ -7,7 +7,7 @@ trigger: - dev paths: include: - - deploy/aro/basket-api/* + - deploy/aro/locations-api/* - deploy/aro/openshift-templates/* stages: - stage: development @@ -15,8 +15,6 @@ stages: variables: OpenShiftProject: development SourceImageRegistryProjectName: development - EnvironmentName: dev - IdentityPublicHostName: identity$(EnvironmentName) jobs: - job: LocationsApiDeployment displayName: 'Locations API Deployment' diff --git a/deploy/aro/marketing-api/azure-pipelines.yml b/deploy/aro/marketing-api/azure-pipelines.yml index d70443bb0..acb739865 100644 --- a/deploy/aro/marketing-api/azure-pipelines.yml +++ b/deploy/aro/marketing-api/azure-pipelines.yml @@ -15,7 +15,6 @@ stages: variables: OpenShiftProject: development SourceImageRegistryProjectName: development - EnvironmentName: dev jobs: - job: MarketingApiDeployment displayName: 'Marketing API Deployment' diff --git a/deploy/aro/ordering-api/azure-pipelines.yml b/deploy/aro/ordering-api/azure-pipelines.yml index b81aa5040..b5384bc26 100644 --- a/deploy/aro/ordering-api/azure-pipelines.yml +++ b/deploy/aro/ordering-api/azure-pipelines.yml @@ -15,7 +15,6 @@ stages: variables: OpenShiftProject: development SourceImageRegistryProjectName: development - EnvironmentName: dev jobs: - job: OrderingApiDeployment displayName: 'Ordering API Deployment' diff --git a/deploy/aro/payment-api/azure-pipelines.yml b/deploy/aro/payment-api/azure-pipelines.yml index 0c22216dc..8a83cbed1 100644 --- a/deploy/aro/payment-api/azure-pipelines.yml +++ b/deploy/aro/payment-api/azure-pipelines.yml @@ -15,7 +15,6 @@ stages: variables: OpenShiftProject: development SourceImageRegistryProjectName: development - EnvironmentName: dev jobs: - job: PaymentApiDeployment displayName: 'Payment API Deployment' diff --git a/deploy/aro/webhooks-api/azure-pipelines.yml b/deploy/aro/webhooks-api/azure-pipelines.yml new file mode 100644 index 000000000..46e33ba80 --- /dev/null +++ b/deploy/aro/webhooks-api/azure-pipelines.yml @@ -0,0 +1,35 @@ +variables: + OpenShiftServiceConnection: 'OpenShift on ARO' +trigger: + branches: + include: + - master + - dev + paths: + include: + - deploy/aro/webhooks-api/* + - deploy/aro/openshift-templates/* +stages: + - stage: development + displayName: Development + variables: + OpenShiftProject: development + SourceImageRegistryProjectName: development + jobs: + - job: WebhooksApiDeployment + displayName: 'Webhooks API Deployment' + variables: + - template: ../azure-devops-templates/variables.yml + pool: + vmImage: 'windows-latest' + steps: + - task: redhat.openshift-vsts.oc-setup-task.oc-setup@2 + displayName: 'Setup Openshift CLI' + inputs: + openshiftService: $(OpenShiftServiceConnection) + - script: 'oc project $(OpenShiftProject)' + failOnStderr: true + displayName: 'Set OpenShift Project Context' + - script: 'oc process -f ./deploy/aro/openshift-templates/webhooksapi-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-' + failOnStderr: true + displayName: 'Ensure Webhooks API OpenShift DeploymentConfig and Service' \ No newline at end of file