From fc4978fdee4839b210800fdfc6421bb69576289a Mon Sep 17 00:00:00 2001 From: Dimitris Sotirakis Date: Wed, 6 Oct 2021 12:46:26 +0300 Subject: [PATCH] Run builds on single-build agents (#40046) --- .drone.yml | 35 ++++++++++++++++++++++++++++++++++- scripts/lib.star | 20 +++++++++++++++----- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index 1f592f2899a..d046386a1e6 100644 --- a/.drone.yml +++ b/.drone.yml @@ -227,6 +227,9 @@ services: MYSQL_ROOT_PASSWORD: rootpass MYSQL_USER: grafana +node: + type: no-parallel + trigger: event: - pull_request @@ -550,6 +553,9 @@ services: MYSQL_ROOT_PASSWORD: rootpass MYSQL_USER: grafana +node: + type: no-parallel + trigger: branch: - main @@ -650,6 +656,9 @@ steps: depends_on: - initialize +node: + type: no-parallel + trigger: branch: - main @@ -986,6 +995,9 @@ services: MYSQL_ROOT_PASSWORD: rootpass MYSQL_USER: grafana +node: + type: no-parallel + trigger: ref: - refs/tags/v* @@ -1450,6 +1462,9 @@ services: image_pull_secrets: - dockerconfigjson +node: + type: no-parallel + trigger: ref: - refs/tags/v* @@ -1590,6 +1605,9 @@ steps: depends_on: - initialize +node: + type: no-parallel + trigger: ref: - refs/tags/v* @@ -1915,6 +1933,9 @@ services: MYSQL_ROOT_PASSWORD: rootpass MYSQL_USER: grafana +node: + type: no-parallel + trigger: event: - custom @@ -2373,6 +2394,9 @@ services: image_pull_secrets: - dockerconfigjson +node: + type: no-parallel + trigger: event: - custom @@ -2513,6 +2537,9 @@ steps: depends_on: - initialize +node: + type: no-parallel + trigger: event: - custom @@ -2813,6 +2840,9 @@ services: MYSQL_ROOT_PASSWORD: rootpass MYSQL_USER: grafana +node: + type: no-parallel + trigger: ref: - refs/heads/v[0-9]* @@ -3270,6 +3300,9 @@ services: image_pull_secrets: - dockerconfigjson +node: + type: no-parallel + trigger: ref: - refs/heads/v[0-9]* @@ -3441,6 +3474,6 @@ get: --- kind: signature -hmac: 344cd4f6925147cee6a32670a128e7633afb6f0df83e61f0464a03deaac7ec55 +hmac: 879a81aca1cb7a901b878e031ce0894fc756f97e4ca2ec89cde757b4878d0fd2 ... diff --git a/scripts/lib.star b/scripts/lib.star index e7b27d7b782..9404e940c8f 100644 --- a/scripts/lib.star +++ b/scripts/lib.star @@ -17,14 +17,23 @@ 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 = { @@ -39,6 +48,7 @@ def pipeline( ) + steps, 'depends_on': depends_on, } + pipeline.update(platform_conf) if edition in ('enterprise', 'enterprise2'): pipeline['image_pull_secrets'] = [pull_secret]