diff --git a/devops/service-pipeline-ci.yml b/devops/service-pipeline-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..d1b6b22569f632a83d14c3e65f1ed7fd0e2e5ff6 --- /dev/null +++ b/devops/service-pipeline-ci.yml @@ -0,0 +1,56 @@ +##################### +# README: Defines a template that's triggered when either a PR is created or updated. The intent for this +# template is to release the latest service artifact to only the dev integration environment to +# validate the integration tests have passed. You'd typically add this pipeline to your master branch policy. +##################### + +trigger: none + +pr: + autoCancel: false + branches: + include: + - '*' + exclude: + - master + paths: + exclude: + - /**/*.md + - .gitignore + - images/ + +variables: + - group: 'Azure Common Secrets' + - group: 'Azure - Common' + + - name: serviceName + value: 'indexer' + - name: AGENT_POOL + value: 'dps-build' + +resources: + repositories: + - repository: infrastructure-templates + type: git + name: open-data-ecosystem/infrastructure-templates + +stages: +- template: devops/service-pipelines/build-stage.yml@infrastructure-templates + parameters: + copyFileContents: | + pom.xml + provider/${{ variables.serviceName }}-azure/maven/settings.xml + provider/${{ variables.serviceName }}-azure/pom.xml + provider/${{ variables.serviceName }}-azure/target/*-spring-boot.jar + copyFileContentsToFlatten: '' + serviceCoreMavenOptions: '--settings ./indexer-core/maven/settings.xml -DVSTS_FEED_TOKEN=$(VSTS_FEED_TOKEN) -U' + mavenOptions: '--settings ./provider/${{ variables.serviceName }}-azure/maven/settings.xml -DVSTS_FEED_TOKEN=$(VSTS_FEED_TOKEN) -U -P indexer-azure' + mavenGoal: 'package' + serviceBase: ${{ variables.serviceName }} + testingRootFolder: 'testing' + - template: devops/service-pipelines/deploy-stages.yml@infrastructure-templates + parameters: + serviceName: ${{ variables.serviceName }} + providers: + - name: Azure + environments: ['devint'] diff --git a/devops/service-pipeline-release.yml b/devops/service-pipeline-release.yml new file mode 100644 index 0000000000000000000000000000000000000000..19ddafa0bf15386047b5564c5ddda1ff9ded3b82 --- /dev/null +++ b/devops/service-pipeline-release.yml @@ -0,0 +1,55 @@ +##################### +# README: Defines a template that's triggered when a PR is merged into master. The intent for this +# template is to release the latest service artifact to all provider environments. +##################### + +trigger: none + +pr: + autoCancel: false + branches: + include: + - '*' + exclude: + - master + paths: + exclude: + - /**/*.md + - .gitignore + - images/ + +variables: + - group: 'Azure Common Secrets Prod' + - group: 'Azure - Common Prod' + + - name: serviceName + value: 'indexer' + - name: AGENT_POOL + value: 'dps-build' + +resources: + repositories: + - repository: infrastructure-templates + type: git + name: open-data-ecosystem/infrastructure-templates + +stages: +- template: devops/service-pipelines/build-stage.yml@infrastructure-templates + parameters: + copyFileContents: | + pom.xml + provider/${{ variables.serviceName }}-azure/maven/settings.xml + provider/${{ variables.serviceName }}-azure/pom.xml + provider/${{ variables.serviceName }}-azure/target/*-spring-boot.jar + copyFileContentsToFlatten: '' + serviceCoreMavenOptions: '--settings ./indexer-core/maven/settings.xml -DVSTS_FEED_TOKEN=$(VSTS_FEED_TOKEN) -U' + mavenOptions: '--settings ./provider/${{ variables.serviceName }}-azure/maven/settings.xml -DVSTS_FEED_TOKEN=$(VSTS_FEED_TOKEN) -U -P indexer-azure' + mavenGoal: 'package' + serviceBase: ${{ variables.serviceName }} + testingRootFolder: 'testing' + - template: devops/service-pipelines/deploy-stages.yml@infrastructure-templates + parameters: + serviceName: ${{ variables.serviceName }} + providers: + - name: Azure + environments: ['prod'] diff --git a/devops/service-pipeline.yml b/devops/service-pipeline.yml deleted file mode 100644 index 32636f7e9fd38520c7d28c4875da9766e81ffed8..0000000000000000000000000000000000000000 --- a/devops/service-pipeline.yml +++ /dev/null @@ -1,33 +0,0 @@ -trigger: - batch: true - branches: - include: - - master - paths: - exclude: - - /**/*.md - - .gitignore - - images/ - -pr: - branches: - include: - - '*' - paths: - exclude: - - /**/*.md - - .gitignore - - images/ - -resources: - repositories: - - repository: infrastructure-templates - type: git - name: open-data-ecosystem/infrastructure-templates - -variables: -- group: 'Azure Common Secrets' -- group: 'Azure - Common' - -stages: -- template: devops/service-pipelines/service-pipeline-stages.yml@infrastructure-templates