-
-
Notifications
You must be signed in to change notification settings - Fork 320
/
azure-pipelines.yml
219 lines (193 loc) · 8.09 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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
# Azure Pipelines CI config
# trigger: none
trigger:
branches:
include:
- master
# - releases/*
batch: true
paths:
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/file-matching-patterns
# include: # file paths which must match to trigger a build
# - docs/*
exclude: # file paths which will not trigger a build
- CHANGES*
- CONTRIBUTING*
- LICENSE*
- Makefile
- README*
- Shake.hs
- bin/*
- cabal-install.sh
- cabal.project
- checks/*
- dev.hs
- doc/*
- examples/*
- hledger-system.mk
- hledger-install/LICENSE*
- hledger-install/README*
- hledger-lib/CHANGES*
- hledger-lib/LICENSE*
- hledger-lib/README*
- hledger-ui/CHANGES*
- hledger-ui/LICENSE*
- hledger-ui/README*
- hledger-web/CHANGES*
- hledger-web/LICENSE*
- hledger-web/README*
- hledger-web/static/*
- hledger-web/templates/*
- hledger/CHANGES*
- hledger/LICENSE*
- hledger/README*
- hledger/bench/*
- hledger/embeddedfiles/*
- shell-completion/*
- site/*
- tools/*
# pr: none
# variables:
# imageName: 'simonmichael:$(build.buildId)'
strategy:
matrix:
windows:
imageName: 'vs2017-win2016'
# mac:
# imageName: 'macos-10.13'
# linux:
# imageName: 'ubuntu-16.04'
pool:
vmImage: $(imageName)
steps:
- script: curl -skL -ostack.zip http://www.stackage.org/stack/windows-x86_64
# displayName: 'download stack'
- script: 7z x stack.zip stack.exe
# displayName: 'unzip stack'
- script: stack --version
# displayName: 'stack --version'
- script: stack build --copy-bins --local-bin-path=.
# displayName: 'stack build'
- script: 7z a -tzip hledger.zip hledger.exe hledger-web.exe
# displayName: 'zip executables'
- task: PublishPipelineArtifact@0
inputs:
artifactName: 'hledger.zip' #$(imageName)
targetPath: 'hledger.zip'
# - script: docker build -f Dockerfile -t $(imageName) .
# displayName: 'docker build'
# hledger-install won't run on ms windows agent:
# Sorry, this installer does not support your operating system: MINGW64_NT-10.0.
# 2019-02-02T20:34:47.0085295Z See http://docs.haskellstack.org/en/stable/install_and_upgrade/
#
# - script: bash hledger-install/hledger-install.sh
# displayName: 'hledger-install.sh'
#
# - bash: hledger-install/hledger-install.sh
# displayName: 'hledger-install.sh'
# # workingDirectory: #
# # failOnStderr: #
# # env: # mapping of environment variables to add
# reference
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema
# https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#trigger
# Scheduled builds are not yet supported in YAML syntax. After you create your YAML build pipeline, you can use the designer to specify a scheduled trigger.
# Someone must view a page in your organization regularly for CI and scheduled builds to run.
# The YAML file in my branch is different than the YAML file in my master branch, which one is used?
# When you have configured a CI trigger or a PR trigger, the YAML file that is in the branch being pushed is used.
# For CI triggers, the YAML file that is in the branch you are pushing is evaluated to see if a CI build should be run.
# For PR triggers, the YAML file that is in the source branch of the PR is evaluated to see if a PR build should be run.
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#pr-trigger
# A pull request trigger specifies what branches will cause a pull request build to run.
# If left unspecified, pull requests to every branch will trigger a build.
# Note that pr is valid for GitHub, not any other Git provider.
# pr: none
# pr:
# #autoCancel: boolean # indicates whether additional pushes to a PR should cancel in-progress runs for the same PR. Defaults to true
# branches:
# include:
# - master
# - releases/*
# paths:
# include:
# - docs/*
# exclude:
# - docs/README.md
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?tabs=schema#job
# You can skip the job syntax if you need only a single job with the standard options.
# matrix and parallel are mutually-exclusive strategies for duplicating a job.
# The matrix strategy enables a job to be dispatched multiple times, with different variable sets.
# matrix: { string1: { string2: string3 } }
# For each string1 in the matrix, a copy of the job will be generated.
# string1 is the copy's name and will be appended to the name of the job.
# For each string2, a variable called string2 with the value string3 will be available to the job.
# The parallel strategy specifies how many duplicates of the job should run.
# This is useful for slicing up a large test matrix. The VS Test task understands how to divide the test load across the number of jobs scheduled.
# parallel: number
# The maxParallel tag restricts the amount of parallelism in both. It defaults to unlimited if not specified.
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema?view=azure-devops&tabs=schema#pool
# pool:
# name: string # name of the pool to run this job in
# demands: string | [ string ] ## see below
# vmImage: string # name of the vm image you want to use, only valid in the Microsoft-hosted pool
# https://docs.microsoft.com/en-us/azure/devops/pipelines/yaml-schema#script
# - script: string # contents of the script to run
# displayName: string # friendly name displayed in the UI
# name: string # identifier for this step (A-Z, a-z, 0-9, and underscore)
# workingDirectory: string # initial working directory for the step
# failOnStderr: boolean # if the script writes to stderr, should that be treated as the step failing?
# condition: string
# continueOnError: boolean # 'true' if future steps should run even if this step fails; defaults to 'false'
# enabled: boolean # whether or not to run this step; defaults to 'true'
# timeoutInMinutes: number
# env: { string: string } # list of environment variables to add
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/phases#artifact-download
# # test and upload my code as an artifact named WebSite
# jobs:
# - job: Build
# pool:
# vmImage: 'ubuntu-16.04'
# steps:
# - script: npm test
# - task: PublishBuildArtifacts@1
# inputs:
# pathtoPublish: '$(System.DefaultWorkingDirectory)'
# artifactName: WebSite
# # download the artifact and deploy it only if the build job succeeded
# - job: Deploy
# pool:
# vmImage: 'ubuntu-16.04'
# steps:
# - checkout: none #skip checking out the default repository resource
# - task: DownloadBuildArtifacts@0
# displayName: 'Download Build Artifacts'
# inputs:
# artifactName: WebSite
# downloadPath: $(System.DefaultWorkingDirectory)
#
# dependsOn: Build
# condition: succeeded()
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks
# https://docs.microsoft.com/en-us/azure/devops/pipelines/artifacts/pipeline-artifacts
# - task: PublishPipelineArtifact@0
# inputs:
# artifactName: 'artifactName'
# targetPath: 'src/MyWebApp/bin/Release/netcoreapp2.0/linux-x64/publish'
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/bash
# - bash: # script path or inline
# workingDirectory: #
# displayName: #
# failOnStderr: #
# env: # mapping of environment variables to add
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/command-line
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/copy-files
# https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/curl-upload-files
# Docker image
# Build a Docker image to deploy, run, or push to a container registry.
# Add steps that use Docker Compose, tag images, push to a registry, run an image, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
# - script: |
# docker login -u $(dockerId) -p $(dockerPw)
# docker push $(dockerId)/$(imageName)