development-pipeline.yml 2.33 KB
Newer Older
Daniel Scholl's avatar
Daniel Scholl committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#  Copyright © Microsoft Corporation
#
#  Licensed under the Apache License, Version 2.0 (the "License");
#  you may not use this file except in compliance with the License.
#  You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#  Unless required by applicable law or agreed to in writing, software
#  distributed under the License is distributed on an "AS IS" BASIS,
#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#  See the License for the specific language governing permissions and
#  limitations under the License.


trigger:
  batch: true
  branches:
    include:
      - master
  paths:
    exclude:
      - /**/*.md
      - .gitignore
      - /docs

Daniel Scholl's avatar
Daniel Scholl committed
27

Daniel Scholl's avatar
Daniel Scholl committed
28
29
30
31
32
33
34
35
resources:
  repositories:
  - repository: FluxRepo
    type: git
    name: k8-gitops-manifests
  - repository: TemplateRepo
    type: git
    name: gitlab-infra-provisioning
Daniel Scholl's avatar
Daniel Scholl committed
36

Daniel Scholl's avatar
Daniel Scholl committed
37

Daniel Scholl's avatar
Daniel Scholl committed
38
variables:
Daniel Scholl's avatar
Daniel Scholl committed
39
  - group: 'Azure - Common'
Daniel Scholl's avatar
Daniel Scholl committed
40

Daniel Scholl's avatar
Daniel Scholl committed
41
  - name: serviceName
Daniel Scholl's avatar
Daniel Scholl committed
42
    value: "partition"
Daniel Scholl's avatar
Daniel Scholl committed
43
  - name: chartPath
44
    value: "devops/azure/chart"
Daniel Scholl's avatar
Daniel Scholl committed
45
  - name: valuesFile
46
    value: "devops/azure/chart/helm-config.yaml"
Daniel Scholl's avatar
Daniel Scholl committed
47
48
  - name: 'MANIFEST_REPO'
    value: $[ resources.repositories['FluxRepo'].name ]
Daniel Scholl's avatar
Daniel Scholl committed
49

Daniel Scholl's avatar
Daniel Scholl committed
50

Daniel Scholl's avatar
Daniel Scholl committed
51
stages:
52

Daniel Scholl's avatar
Daniel Scholl committed
53
  - template: /devops/build-stage.yml@TemplateRepo
Daniel Scholl's avatar
Daniel Scholl committed
54
55
56
    parameters:
      mavenGoal: 'package'
      mavenPublishJUnitResults: true
Daniel Scholl's avatar
Daniel Scholl committed
57
58
      serviceCoreMavenOptions: '-P partition-core'
      mavenOptions: '-P partition-azure'
Daniel Scholl's avatar
Daniel Scholl committed
59
60
      copyFileContents: |
        pom.xml
Daniel Scholl's avatar
Daniel Scholl committed
61
62
63
        provider/partition-azure/maven/settings.xml
        provider/partition-azure/pom.xml
        provider/partition-azure/target/*-spring-boot.jar
Daniel Scholl's avatar
Daniel Scholl committed
64
65
66
67
      copyFileContentsToFlatten: ''
      mavenSettingsFile: './maven/settings.xml'
      serviceBase: ${{ variables.serviceName }}
      testingRootFolder: 'testing'
68
      chartPath: ${{ variables.chartPath }}
69

Daniel Scholl's avatar
Daniel Scholl committed
70
  - template: /devops/deploy-stages.yml@TemplateRepo
Daniel Scholl's avatar
Daniel Scholl committed
71
72
    parameters:
      serviceName: ${{ variables.serviceName }}
73
74
      chartPath: ${{ variables.chartPath }}
      valuesFile: ${{ variables.valuesFile }}
Daniel Scholl's avatar
Daniel Scholl committed
75
      testCoreMavenPomFile: 'testing/partition-test-core/pom.xml'
Daniel Scholl's avatar
Daniel Scholl committed
76
      testCoreMavenOptions: '--settings $(System.DefaultWorkingDirectory)/drop/deploy/testing/maven/settings.xml'
Daniel Scholl's avatar
Daniel Scholl committed
77
      skipDeploy: ${{ variables.SKIP_DEPLOY }}
Daniel Scholl's avatar
Daniel Scholl committed
78
      skipTest: ${{ variables.SKIP_TESTS }}
Daniel Scholl's avatar
Daniel Scholl committed
79
80
      providers:
        -  name: Azure
Daniel Scholl's avatar
Daniel Scholl committed
81
           environments: ['dev']