summaryrefslogtreecommitdiff
path: root/ybd/config/ybd.conf
blob: 9b13936ba33438868b39ed7030eebfe681b3f6c9 (plain)
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
219
220
221
222
223
224
225
226
227
228
229
# Copyright (C) 2015-2016 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program.  If not, see <http://www.gnu.org/licenses/>.
#
# =*= License: GPL-2 =*=

# YBD is designed to be run from the command line and/or as part of an
# automated pipeline. all configuration is taken from conf files and/or
# environment variables, in the following order of precedence:
#
#    YBD_* environment variables         # if found
#    ./ybd.conf                          # if found
#    $path/to/ybd.py/ybd.conf            # if found
#    $path/to/ybd.py/ybd/config/ybd.conf # default, as provided in the ybd repo
#
# this means you can set custom config via env vars, or the definitions
# top-level directory, or the ybd top-level directory, without having to modify
# the supplied default ybd.conf file.

# NOTE: it is best to create your own ybd.conf file, so you can merge
# new/latest ybd using git with no possibility of a conflict, and your custom
# settings will continue to take precedence.
#
# To set config via environment variables, each must be prefixed with ```YBD_```
# and using ```_``` instead of ```-```. ybd will strip the YBD_ prefix and
# convert ```_``` to ```-```

# These are shortnames for commonly used online git resources - you can alias
# them to use local mirrors
aliases:
  'baserock:': 'git://git.baserock.org/baserock/'
  'freedesktop:': 'git://anongit.freedesktop.org/'
  'github:': 'git://github.com/'
  'gnome:': 'git://git.gnome.org/'
  'upstream:': 'git://git.baserock.org/delta/'

# The artifact algorithm can evolve over time - artifact-version ensures we
# don't accidentally use artifacts from an old/new version in a new/old build.
# You could put a custom value here (eg: FOO1) to ensure your builds can never
# be confused with anyone else's
# Summary of previous artifact-versions:
# Missing: (up to c8af09cbb) the cache_key did not include artifact-version
#                          (now equivalent to setting artifact-version: 0)
# 1: (from 3f9fe8bb onwards) cache_key now includes artifact-version
# 2: (from e36be257 onwards) meta files now include cache-key
# 3: (supported from 934fd7e8be2b4) only include applicable build-system
#    (enabled from 16.17 onwards)
# 4: (after d33e0c8a9) include definitions repo: & ref: in meta for non-chunks
# 5: (after 6c464db0ce) 'path' field no longer includes '.morph'
# 6: (after 50eb61f7e and 588e7c7) stratum deps are retained, and we fixed a
#    bug where ybd had been skipping errors in the middle of code blocks,
# 7: (after e7be39bf) see https://gitlab.com/baserock/ybd/issues/249
#    we need to include max-jobs in the cache-key
# 8: (after c59d65cf) support added for git-lfs
# 9: (after 035c988e) fixed get_tree() to use sha if it exists, before ref
# 10: (after 2bdd743) Add 'rpm-metadata' in cache-key
# 11: (after bd721e8) Fix potentially incorrect checkout of ref instead of sha
# 12: (after b1eefba and 33a3553) build-depends file renames don't cause
#     cache-key changes and cache_key now includes prefix
artifact-version: 12

# path to be used in default chroots for builds
base-path: ['/usr/bin', '/bin', '/usr/sbin', '/sbin']

# historically we have not been great at ensuring definitions don't contain
# wrong names etc. ybd can react to this via the check-definitions parameter.
# possible values are 'ignore', 'warn', 'exit'
check-definitions: 'warn'

# If two components both offer a version of one file in the target system
# then the behaviour may be different depending on which version is installed
# last. ybd can react to this via the check-overlaps parameter.
# possible values are 'ignore', 'warn', 'exit'
check-overlaps: 'warn'

# cleanup failed builds. Note: if this is set to False, tmpdir will fill up
cleanup: True

# where to look for definitions defaults if none found in definitions
defaults: 'config/defaults.conf'

# Splitting is our name for installing a subset of files from an artifact.
# By default we just install everything, to optimise on build speed.
# default-splits: ['-minimal', '-runtime', '-devel'] would give the same set
# of files, but installation takes longer
# If you want runtime systems only, add the following to your ybd.conf
# default-splits: ['-minimal', '-runtime']
default-splits: []

# You can override any of the directories that ybd uses
# 'base' specifies ybd's top level working directory - by default the other
# directories are found under it, but you can set them to full paths, e.g.
# base: /src and artifacts: /nfsmount/artifacts
directories:
  # where ybd saves/finds built artifacts
  'artifacts':

  # top-level default for ybd workings if other directories are not specified
  # all the other directories are under base, unless specified as full path
  'base': ybd

  # where ccache results are saved
  'ccache_dir':

  # working directory for deployments
  'deployment':

  # where local copies of git repos are saved
  'gits':
  'jobs':

  # where sandboxes and other tmp directories are created
  'tmp':

  # where aboriginal workers will work (in future)
  'workers':

# Number of instances to run in parallel on many-core systems
# Testing suggests that parallelizing an individual build only makes sense
# up to about 8-10 cores, so after that running more instances is better.
# if instances is not specified, YBD will choose for itself
# instances:

# Where to look for schema if none found in definitions
json-schema: './schema/json-schema.json'

# Password for uploading artifacts to kbas. NOTE: kbas code expressly rejects
# 'insecure' as a password so this *must* be changed to get it to work
kbas-password: 'insecure'

# by default we only upload 'chunk' artifacts to kbas - alternatively set to
# some/all of ['chunk', 'stratum', 'system']
kbas-upload: ['chunk']

# Where to look for artifacts already built by other instances of YBD
kbas-url: 'http://artifacts1.baserock.org:8000/'

# log-timings (previously this was log-elapsed)
# - 'elapsed' (default) show time since the start of the run
# - 'normal' to show wallclock timestamps
# - 'omit' no timestamps - makes it easier to diff one log with another
log-timings: 'elapsed'

# Set log-verbose: True to get extra log info for debugging ybd... runs slower
log-verbose: False

# Max-jobs controls the maximum number of threads for build-steps.
# so for example `make -j` is set to max-jobs. if max-jobs is not specified,
# ybd will default it to number-of-cores, up to a moximum of 10
# max-jobs:

# YBD can output a manifest containining {name, cache_key, repo, ref, sha, md5}
# The options are
# - 'False': no manifest
# - 'True': create manifest at ./<target>.manifest
# - or path/to/manifest/filename. if filename does not end with .text,
#   output will be json
manifest: False

# YBD will automagically cull artifacts to ensure there is enough space to run.
# if you don't want any artifacts to be culled, set this to zero.
min-gigabytes: 10

# Possible modes are
# - parse-only (stops after dumping parsed definitions)
# - keys-only (stops after cache-keys have been calculated)
# - no-build (runs all the way through, but creates empty artifacts)
# - normal (parses definitions into cache-keys, builds artifacts, may deploy)
mode: normal

no-ccache: False
no-distcc: True

# if release-note is specified, ybd will create a list of changes
# since the `release-since` ref or the last tag in the current checkout
# release-note: './release-note.txt'

# release-since can be any ref in the definitions history
# if release-since is not specified, ybd will default to use the last tag.
# release-since: HEAD~1

# release-cmd can be used to configure the git output for the release note
# release-cmd: ['git', 'log', '--pretty=oneline', '-n', '2']

# Some modes of ybd (eg build-only, keys-only) output a result to a file
result-file: './ybd.result'

schemas:
  chunk: './schemas/chunk.json-schema'
  stratum: './schemas/stratum.json-schema'
  system: './schemas/system.json-schema'
  cluster: './schemas/cluster.json-schema'
  defaults: './schemas/defaults.json-schema'
schema-validation: False
serve-artifacts: True

# Trove can deliver tarballs of gits, which are faster downloads to start with
tar-url: 'http://git.baserock.org/tarballs'

# Normally the host will have /tmp as a writeable tmp directory, and this is
# needed by ybd during sandboxing. If your host needs the tmp to be somewhere
# else, set TMPDIR
# TMPDIR: /tmp

# Normally ybd builds at whatever version is set in the 'sha:' field
# If we set 'track-branches:', then ybd will attempt to build 'ref:'
# track-branches: [path/to/foo-chunk, path/to/bar-chunk, path/to/bip-chunk]
# track-branches: True

# Trove has an api to describe a tree for a commit
tree-server: 'http://git.baserock.org:8080/1.0/sha1s?'

# With generate-rpms enabled, when ybd builds a system that contains rpm, it
# can produce rpms and store them in the "deployment" subdirectory.
#
# If set to True, all possible rpms will be built. If set to a list,
# e.g. [ chunk-one, chunk-two ], then rpms will only be generated for
# the specified chunks.
generate-rpms: False