From 146b965ecaee5a6825bf6c450613385c18e48563 Mon Sep 17 00:00:00 2001 From: Tim McCarthy Date: Sun, 16 Feb 2020 15:00:53 -0500 Subject: [PATCH] Added triggers; changed folder structure --- deploy/aro/basket-api/azure-pipelines.yml | 9 +++++++++ deploy/aro/infrastructure/azure-pipelines.yml | 13 +++++++++++-- .../rabbitmq-image-deploy-template.yml | 0 .../secrets-deploy-template.yml | 0 4 files changed, 20 insertions(+), 2 deletions(-) rename deploy/aro/openshift-templates/{ => infrastructure}/rabbitmq-image-deploy-template.yml (100%) rename deploy/aro/openshift-templates/{ => infrastructure}/secrets-deploy-template.yml (100%) diff --git a/deploy/aro/basket-api/azure-pipelines.yml b/deploy/aro/basket-api/azure-pipelines.yml index 286a1d645..8fe2bb030 100644 --- a/deploy/aro/basket-api/azure-pipelines.yml +++ b/deploy/aro/basket-api/azure-pipelines.yml @@ -2,6 +2,15 @@ variables: AppName: basketapi OpenShiftServiceConnection: 'OpenShift on ARO' SourceImageRegistryProjectName: 'development' +trigger: + branches: + include: + - master + - dev + paths: + include: + - deploy/aro/basket-api/* + - deploy/aro/openshift-templates/* resources: pipelines: - pipeline: BasketApiBuild diff --git a/deploy/aro/infrastructure/azure-pipelines.yml b/deploy/aro/infrastructure/azure-pipelines.yml index 2433ddc34..c185123f8 100644 --- a/deploy/aro/infrastructure/azure-pipelines.yml +++ b/deploy/aro/infrastructure/azure-pipelines.yml @@ -1,5 +1,14 @@ variables: OpenShiftServiceConnection: 'OpenShift on ARO' +trigger: + branches: + include: + - master + - dev + paths: + include: + - deploy/aro/infrastructure/* + - deploy/aro/openshift-templates/infrastructure/* stages: - stage: development displayName: Development @@ -31,9 +40,9 @@ stages: - script: 'oc project $(OpenShiftProject)' failOnStderr: true displayName: 'Set OpenShift Project Context' - - script: 'oc process -f ./deploy/aro/openshift-templates/secrets-deploy-template.yml -p IDENTITY_DB_CONNECTION_SECRET=$(IdentityDbConnection) -p MARKETING_DB_CONNECTION_SECRET=$(MarketingDbConnection) -p ORDERING_DB_CONNECTION_SECRET=$(OrderingDbConnection) -p SQL_PASSWORD_SECRET=$(SqlPassword) -p WEBHOOKS_DB_CONNECTION_SECRET=$(WebhooksDbConnection) | oc apply -f-' + - script: 'oc process -f ./deploy/aro/openshift-templates/infrastructure/secrets-deploy-template.yml -p IDENTITY_DB_CONNECTION_SECRET=$(IdentityDbConnection) -p MARKETING_DB_CONNECTION_SECRET=$(MarketingDbConnection) -p ORDERING_DB_CONNECTION_SECRET=$(OrderingDbConnection) -p SQL_PASSWORD_SECRET=$(SqlPassword) -p WEBHOOKS_DB_CONNECTION_SECRET=$(WebhooksDbConnection) | oc apply -f-' failOnStderr: true displayName: 'Secrets Deployment' - - script: 'oc process -f ./deploy/aro/openshift-templates/rabbitmq-image-deploy-template.yml -p APPLICATION_NAME=$(AppName) -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-' + - script: 'oc process -f ./deploy/aro/openshift-templates/infrastructure/rabbitmq-image-deploy-template.yml -p APPLICATION_NAME=$(AppName) -p IMAGE_REGISTRY_PROJECT_NAME=$(SourceImageRegistryProjectName) | oc apply -f-' failOnStderr: true displayName: 'RabbitMQ Deployment' \ No newline at end of file diff --git a/deploy/aro/openshift-templates/rabbitmq-image-deploy-template.yml b/deploy/aro/openshift-templates/infrastructure/rabbitmq-image-deploy-template.yml similarity index 100% rename from deploy/aro/openshift-templates/rabbitmq-image-deploy-template.yml rename to deploy/aro/openshift-templates/infrastructure/rabbitmq-image-deploy-template.yml diff --git a/deploy/aro/openshift-templates/secrets-deploy-template.yml b/deploy/aro/openshift-templates/infrastructure/secrets-deploy-template.yml similarity index 100% rename from deploy/aro/openshift-templates/secrets-deploy-template.yml rename to deploy/aro/openshift-templates/infrastructure/secrets-deploy-template.yml