-
Notifications
You must be signed in to change notification settings - Fork 21
/
azure-pipelines.yml
130 lines (114 loc) · 3.58 KB
/
azure-pipelines.yml
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
trigger:
branches:
include:
- master
pr:
- master
variables:
acr: ytnetworks.azurecr.io
${{ if eq(variables['Build.SourceBranchName'], 'master') }}:
env: prod
${{ if ne( variables['Build.SourceBranchName'], 'master') }}:
env: stage
stages:
- stage: RecfluenceContainer
jobs:
- job: RecfluenceContainer
pool:
vmImage: ubuntu-latest
steps:
- script: |
echo GitVersion
dotnet tool restore
dotnet dotnet-gitversion /output buildserver /nofetch
failOnStderr: true
workingDirectory: ./App
- task: Docker@2
displayName: YtCli Docker Build
inputs:
command: build
containerRegistry: ytnetworks
repository: recfluence
tags: |
$(GitVersion.SemVer)
latest
arguments: --build-arg SEMVER=$(GitVersion.SemVer) --build-arg ASSEMBLY_SEMVER=$(GitVersion.AssemblySemVer)
buildContext: ./App
- task: Docker@2
displayName: YtCli Docker Push
inputs:
command: push
containerRegistry: ytnetworks
repository: recfluence
tags: |
$(GitVersion.SemVer)
latest
- stage: Dataform
dependsOn: []
jobs:
- job: DataformContainer
pool:
vmImage: ubuntu-latest
steps:
- task: Docker@2
displayName: Dataform Docker Build & Push
inputs:
command: buildAndPush
containerRegistry: ytnetworks
repository: dataform
tags: latest
buildContext: Dataform
Dockerfile: Dataform/Dockerfile
- stage: UserScrape
dependsOn: []
jobs:
- job: UserScrapeContainer
pool:
vmImage: ubuntu-latest
steps:
- task: Docker@2
displayName: UserScrape Docker Build & Push
inputs:
command: buildAndPush
containerRegistry: ytnetworks
repository: userscrape
tags: latest
buildContext: UserScrape
Dockerfile: UserScrape/Dockerfile
- stage: DataScripts
dependsOn: []
jobs:
- job: DataScriptsContainer
pool:
vmImage: ubuntu-latest
steps:
- task: Docker@2
displayName: DataScripts Docker Build & Push
inputs:
command: buildAndPush
containerRegistry: ytnetworks
repository: datascripts
tags: latest
buildContext: DataScripts
Dockerfile: DataScripts/Dockerfile
- stage: YtFunction
dependsOn: []
jobs:
- job: YtFunction
pool:
vmImage: ubuntu-latest
steps:
- script: |
echo GitVersion
dotnet tool restore
dotnet dotnet-gitversion /output buildserver /nofetch
failOnStderr: true
workingDirectory: ./App
- script: dotnet publish -c Release --output $(Build.ArtifactStagingDirectory)/YtFunctions /p:Version='$(GitVersion.AssemblySemVer)' /p:InformationalVersion='$(GitVersion.SemVer)'
workingDirectory: ./App/YtFunctions
displayName: Publish YtFunctions
- task: PublishBuildArtifacts@1
displayName: Pubish YtFunctions Artifact
inputs:
pathtoPublish: $(Build.ArtifactStagingDirectory)/YtFunctions
artifactName: YtFunctions