From patchwork Fri Sep 6 15:38:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 825994 Delivered-To: patch@linaro.org Received: by 2002:adf:a345:0:b0:367:895a:4699 with SMTP id d5csp868498wrb; Fri, 6 Sep 2024 08:38:45 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXbwiciZo0XzxX9288RdmXZ+/tX9dvYllfmuH/EsJtLqQWoxxSyuL1XM7Hg85LKxLwWeYRZGQ==@linaro.org X-Google-Smtp-Source: AGHT+IHhYEOE2ijkJKXnB9qGPt18AhbOHDRQi8sKpBXMAPqU0OFU9gmW84teaqkN0/gjAQVNEPgw X-Received: by 2002:a05:6102:5492:b0:49b:a93d:3b9 with SMTP id ada2fe7eead31-49bde22a424mr3487498137.23.1725637125738; Fri, 06 Sep 2024 08:38:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1725637125; cv=none; d=google.com; s=arc-20240605; b=JzozLqGHCGrXLcB940r/XrCs7q3kR5ZU+q8e9gLqIeu1w6SU0ZGWbEi6kBVuy7EIZo Ts/iyK/HK1M2qf9bGXpv8W5T7WVuGdC4gTsKINRzR8skjyFgOljs08++52rJ4JwHa8Ne G7l8JHsrrn3eKG/Ud8C/NMCdSqXbyIFVEKNDT252WPJlpaa5/9ZaD0RRnvXb9AbRkjPm 4vMzrbeajxHDXLdtmHAVFv8g5rSFUHZwulgluKJ5Kgzhc2ofTzfqrydNJ7k4oEMEFlsN o9JEwrhe482m8XiatAd7IfITT+XUerO0kKX5B1+P31rWCb7cQG9rShL8lvTMIEQ8LY29 54XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=aapQk1vd/skAQcOUzQTtovi1QafMjbKZgpmgK7D3jz4=; fh=jUpKE2xnxMsyN0/pv376xeAx2+NoX7ZpLKTmYHVHrxk=; b=AgfJoLc9dgQAkSb07notxQXinHv7nVl9PFaA1P1ATb7Zz65f6yqFTrx9bk23nqt1IS oeFP6BOWKjMjbIM9OGziwvQsi+n6REwndj6plxXuRU65gGod+/OflkD7UUQNZ6Zc6gbF kxsks9L+Y2fmYELCRGMPRxxX5owCMADtzQWqyt87tScHm+b9Fg8yIdR3nsCOq6gsNfNh TXQ5hAFHqjGOHfnn6Ifa+eixilrtjhiRC3kZkl/kWctkE+dUUaq7OS7nomB4QbW++XSb VnxwVXwxvLpsXQ3BBLcTNdxzs9C7bSJXFsQb9HCeWcGUil0Vej9wHos1YjQlqtnXhYys yDqA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="x/EIy125"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id ada2fe7eead31-49bdbeaed99si724436137.194.2024.09.06.08.38.45 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 06 Sep 2024 08:38:45 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="x/EIy125"; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smb2P-00019u-LF; Fri, 06 Sep 2024 11:38:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smb2N-00018o-Bs for qemu-devel@nongnu.org; Fri, 06 Sep 2024 11:38:15 -0400 Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smb2L-0006gd-Jn for qemu-devel@nongnu.org; Fri, 06 Sep 2024 11:38:15 -0400 Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5c25554ec1eso2385236a12.1 for ; Fri, 06 Sep 2024 08:38:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1725637091; x=1726241891; darn=nongnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=aapQk1vd/skAQcOUzQTtovi1QafMjbKZgpmgK7D3jz4=; b=x/EIy125UbLfymACwGAE+Bcjl8HrLUmgaYvysjDMpst7UHjMQtkjQEV/ofk5Ts+j1x DSvY9N2OwaMZzHg/LRLozbd5eT1xt1c6CUrGB05YWA0FvMwIhV9+/x3jzs9Azq+it+58 2UkpZdTwZ+keRwYREPPBDYMJngINjvs3DpQEuyAQ1zRAIXDfZ+g+r1gcMSel2OJ2LPwt JFV/kWUsU0iMAggukllE4MWDQSzJiWPKVLGZ4qA3RegmrZfFqS5iuZi9g0FKtJ/L/VZw niuzIKQln0oKH5FNmulNNJS8DU6+A7sn1HA41Qmb1ul86N9pk8zF2uL0qMV0PmDbw6v9 b4Zg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1725637091; x=1726241891; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aapQk1vd/skAQcOUzQTtovi1QafMjbKZgpmgK7D3jz4=; b=RdmUWLHkJAhlVXAx/0DA54l6A8Rpi/Ds5VDMMFasQoLXjYGC76CQKpWvcB+NHWmAZs 4ITSKwU3VN4AOgo1zBvIhZcJiXajbj2Pa0dVwA438VDXuRttkrQljfTSi1JPScL0Sbw8 LxNTkAxvOIFRuCXJJIG+KrciG3ik5rtDz9/UqyJu5L5SLAzQS8579EHbhSb/RMzASyAj LyxLjuanUxxT9/o3t/y46N5/fgjpvZiVqwZiPg3vW0dOTRy1+Ygxf/uyr5oxZO70wxxo Xa5i4P5kXXjerbgsqB1npCJ3306y11hWdyjT7alM7I4WrRhkkdTmEWX4fAqCgrIz942w R7Wg== X-Gm-Message-State: AOJu0YwFQKkBI98pi0pOTTW8erOELRyYeVWaA/aZja9Rt59KCdAsmBq1 MvUK8+K2CcVCdpa17zlOIYSuqbXKix0TU0TLhedFPxc8ZtLlNu+aySj8K5rh9Ww= X-Received: by 2002:a17:907:c1f:b0:a8d:1284:6de5 with SMTP id a640c23a62f3a-a8d12846edcmr21118166b.14.1725637089951; Fri, 06 Sep 2024 08:38:09 -0700 (PDT) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a8a7b888be4sm190301866b.63.2024.09.06.08.38.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Sep 2024 08:38:08 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id EB54D5F754; Fri, 6 Sep 2024 16:38:07 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , =?utf-8?q?Philipp?= =?utf-8?q?e_Mathieu-Daud=C3=A9?= , Thomas Huth , Wainer dos Santos Moschetta , Beraldo Leal Subject: [RFC PATCH] scripts/ci: update the gitlab-runner playbook Date: Fri, 6 Sep 2024 16:38:03 +0100 Message-Id: <20240906153803.1765483-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=alex.bennee@linaro.org; helo=mail-ed1-x52e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org The upstream install instructions: https://docs.gitlab.com/runner/install/linux-repository.html Now refer to repositories and a setup script. Modernise the playbook to use the preferred delivery method. Signed-off-by: Alex Bennée --- scripts/ci/setup/gitlab-runner.yml | 39 +++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/scripts/ci/setup/gitlab-runner.yml b/scripts/ci/setup/gitlab-runner.yml index 7bdafab511..57e7faebf1 100644 --- a/scripts/ci/setup/gitlab-runner.yml +++ b/scripts/ci/setup/gitlab-runner.yml @@ -49,30 +49,51 @@ - debug: msg: gitlab-runner arch is {{ gitlab_runner_arch }} - - name: Download the matching gitlab-runner (DEB) + # Debian/Ubuntu setup + - name: Get gitlab-runner repo setup script (DEB) get_url: dest: "/root/" - url: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/deb/gitlab-runner_{{ gitlab_runner_arch }}.deb" + url: "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh" + mode: 0755 when: - ansible_facts['distribution'] == 'Ubuntu' - - name: Download the matching gitlab-runner (RPM) + - name: Run gitlab-runner repo setup script (DEB) + shell: "/root/script.deb.sh" + when: + - ansible_facts['distribution'] == 'Ubuntu' + + - name: Install gitlab-runner (DEB) + ansible.builtin.apt: + name: gitlab-runner + update_cache: yes + state: present + when: + - ansible_facts['distribution'] == 'Ubuntu' + + # RPM setup + - name: Get gitlab-runner repo setup script (RPM) get_url: dest: "/root/" - url: "https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_{{ gitlab_runner_arch }}.rpm" + url: "https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.rpm.sh" + mode: 0755 when: - ansible_facts['distribution'] == 'CentOS' - - name: Install gitlab-runner via package manager (DEB) - apt: deb="/root/gitlab-runner_{{ gitlab_runner_arch }}.deb" + - name: Run gitlab-runner repo setup script (RPM) + shell: "/root/script.rpm.sh" when: - - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['distribution'] == 'CentOS' - - name: Install gitlab-runner via package manager (RPM) - yum: name="/root/gitlab-runner_{{ gitlab_runner_arch }}.rpm" + - name: Install gitlab-runner (RPM) + yum: + name: gitlab-runner + update_cache: yes + state: present when: - ansible_facts['distribution'] == 'CentOS' + # Register Runners - name: Register the gitlab-runner command: "/usr/bin/gitlab-runner register --non-interactive --url {{ gitlab_runner_server_url }} --registration-token {{ gitlab_runner_registration_token }} --executor shell --tag-list {{ ansible_facts[\"architecture\"] }},{{ ansible_facts[\"distribution\"]|lower }}_{{ ansible_facts[\"distribution_version\"] }} --description '{{ ansible_facts[\"distribution\"] }} {{ ansible_facts[\"distribution_version\"] }} {{ ansible_facts[\"architecture\"] }} ({{ ansible_facts[\"os_family\"] }})'"