Run builds on single-build agents (#37702)

This is an effort to reduce cache errors when multiple agents try to build the yarn cache at the same time
https://github.com/grafana/deployment_tools/issues/13329
This commit is contained in:
Julien Duchesne
2021-08-10 09:16:09 +03:00
committed by GitHub
parent 33aeee60ff
commit 7e63118ea9
2 changed files with 49 additions and 7 deletions
+15 -6
View File
@@ -17,20 +17,28 @@ def pipeline(
):
if platform != 'windows':
platform_conf = {
'os': 'linux',
'arch': 'amd64',
'platform': {
'os': 'linux',
'arch': 'amd64'
},
# A shared cache is used on the host
# To avoid issues with parallel builds, we run this repo on single build agents
'node': {
'type': 'no-parallel'
}
}
else:
platform_conf = {
'os': 'windows',
'arch': 'amd64',
'version': '1809',
'platform': {
'os': 'windows',
'arch': 'amd64',
'version': '1809',
}
}
pipeline = {
'kind': 'pipeline',
'type': 'docker',
'platform': platform_conf,
'name': name,
'trigger': trigger,
'services': services,
@@ -39,6 +47,7 @@ def pipeline(
) + steps,
'depends_on': depends_on,
}
pipeline.update(platform_conf)
if edition in ('enterprise', 'enterprise2'):
pipeline['image_pull_secrets'] = [pull_secret]