From patchwork Tue Mar 1 09:47:05 2022 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: 547252 Delivered-To: patch@linaro.org Received: by 2002:ac0:9f50:0:0:0:0:0 with SMTP id l16csp3530732imf; Tue, 1 Mar 2022 02:11:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMzCWKSz/S3WqdjVbcWUn+eL25aFZWbAM3a4BwgwxbVQk+WeBu6TdU3BDM196oL/D2TzUW X-Received: by 2002:ac8:7d44:0:b0:2de:4d14:b6b9 with SMTP id h4-20020ac87d44000000b002de4d14b6b9mr19242018qtb.505.1646129488564; Tue, 01 Mar 2022 02:11:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646129488; cv=none; d=google.com; s=arc-20160816; b=OpfDkWK0Nnec/qtGjPNp9xh2L7Nh7+njlW4dDRQfP2TNBjoIdbJp5gcUC2ue76yMc9 ikriFejQfJoldq5GNdZULujfZijt3pnJ62zfHecBLdqIJ4z/Mji5kqk4PqF3gBUoP4/c eBCvW4NaF7pGffyU6QMBWgFCy7VzhZ2duLudvE0PPtvTLtfCwLrFUxsrGa5BHvJ4Tb0l Mf1Ihkq9w2NnozONZCxJE8WGxM+57KH4XJz1q24DlRNnHSBFssmmuAuyT9+w9dvxqzBg IzAT6dg/p01gi1YTpeDuaXP4E4sXc+94VAdWwkXKDFM4HcyPEcvHaubS6CcPvOIozzMM IPtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=U+pwlSv+lJBvgdk+JsvrYqjIIdPS4lqzyuJCqNRB8Uk=; b=yAE4krUerhCozcwsati3E8+5SeUOeah/e2JtQpnaePZs9iB28KzMwBVZkHu8zDob1f //DOHb46woZOAQc1ejj6tJG4Ykue0XGwPE/QEJQFluc2f+q/4gceMZWuOKqfR0LSjQsJ A3eSeSTFknKYl5QveW5+lqgGlgbOLXNAYIokufas6FF2xn9mPvwjGb/E8Ri9NcRoFstN WKSkTTO0jObgnnwGmnvxCzVt5fESVetTLXWj3DZX55Hpnxj6i8N4T04epZ3bn4XoSyGL IB+iSfM2CwhgmarL67M9M7RUJQ9uloV5WON+8X6KD6NOw5N1FduF/e3evmLVb2u4aHoA tmIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b="bCNye4m/"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id e18-20020a056214151200b004350116d9d9si425241qvy.173.2022.03.01.02.11.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 01 Mar 2022 02:11:28 -0800 (PST) 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=fail header.i=@linaro.org header.s=google header.b="bCNye4m/"; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:60252 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nOzTc-0008By-5y for patch@linaro.org; Tue, 01 Mar 2022 05:11:28 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46316) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nOz6S-0003Mk-4i for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:32 -0500 Received: from [2a00:1450:4864:20::335] (port=39445 helo=mail-wm1-x335.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nOz6Q-00078F-Fj for qemu-devel@nongnu.org; Tue, 01 Mar 2022 04:47:31 -0500 Received: by mail-wm1-x335.google.com with SMTP id o18-20020a05600c4fd200b003826701f847so312130wmq.4 for ; Tue, 01 Mar 2022 01:47:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=U+pwlSv+lJBvgdk+JsvrYqjIIdPS4lqzyuJCqNRB8Uk=; b=bCNye4m/b5wOylExBFjli7+5FRVOCgiTIiNFmis1P7jlbd8px4C5GaA3nVefUFcZPl 9GFCCIy5j2o3T5hbwdrYpM5JqrI7mn+/S90an451LyfRbW0puzdOoa9QIJm4NdA40u9/ yC4j6SXqdIFHRVumElJO+krCFtpbHu0GUdestDdYLv8R1213HMw+gKTxbHQmvkp4RyvR okFBPvUFCZ/IATHYxUkiDE63IszS/hTvpsQyWioFRf8kQtVscfgoiAVqgNrWg2h/VisN tRJvT+SqTq6PhTDtrOVQDswZe6+pnIBp3SRAvM1KOO44G95z8+AskYPRr9e222dlHZxF C+yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U+pwlSv+lJBvgdk+JsvrYqjIIdPS4lqzyuJCqNRB8Uk=; b=Flth6yEO7Uhy9GtNtQVDVSaEPyuB2QLyyDmGO4RkeJl1AUa1lUg7NYdjwt3z5n9dre +L5htyqWl0yjXw5fyRX8vAqac8RZtBAwcowWMLiwasIzjBrr8Z4J24OmLoSRlabLGYCA WouPqMgJMHk2Q/28HZJAMQF17290CuKnuZvLjRx4/0oQGcZXls5Gyr6dYLj4869/U6rL alIHbWghUVc9oEMNVKih63xYYLUoEFijqBUFbG8sC9SimAA7DhO2Og9EeSqjMgpHu0Sq R+bYJNqGd9fLiXgTVUx4cNIXXxoErQwqA6MsGWpPOx//m6xKHndVq1OmR3MRI9JTIN2W D4hg== X-Gm-Message-State: AOAM531RqFujqcwRrz0cRG3m+qeoyoTW6UP29+WHGc1ctNxbRIeI0CzF 4k8L0y4ZI43NKEtkojaJ/q0dyw== X-Received: by 2002:a05:600c:47d1:b0:381:1c01:2aa7 with SMTP id l17-20020a05600c47d100b003811c012aa7mr16360383wmo.189.1646128047858; Tue, 01 Mar 2022 01:47:27 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id w6-20020adfee46000000b001e4bf01bdfbsm13305807wro.46.2022.03.01.01.47.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 01:47:22 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 18D251FFC0; Tue, 1 Mar 2022 09:47:16 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 08/18] scripts/ci: allow for a secondary runner Date: Tue, 1 Mar 2022 09:47:05 +0000 Message-Id: <20220301094715.550871-9-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220301094715.550871-1-alex.bennee@linaro.org> References: <20220301094715.550871-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335 (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Thomas Huth , Beraldo Leal , Richard Henderson , qemu-devel@nongnu.org, Wainer dos Santos Moschetta , =?utf-8?q?Philippe_Mathi?= =?utf-8?q?eu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Some HW can run multiple architecture profiles so we can install a secondary runner to build and run tests for those profiles. This allows setting up secondary service. Signed-off-by: Alex Bennée Acked-by: Richard Henderson Message-Id: <20220225172021.3493923-9-alex.bennee@linaro.org> diff --git a/scripts/ci/setup/gitlab-runner.yml b/scripts/ci/setup/gitlab-runner.yml index 1127db516f..33128be85d 100644 --- a/scripts/ci/setup/gitlab-runner.yml +++ b/scripts/ci/setup/gitlab-runner.yml @@ -69,3 +69,41 @@ name: gitlab-runner state: started enabled: yes + + - name: Download secondary gitlab-runner + get_url: + dest: /usr/local/bin/gitlab-runner-arm + url: "https://s3.amazonaws.com/gitlab-runner-downloads/v{{ gitlab_runner_version }}/binaries/gitlab-runner-{{ gitlab_runner_os }}-arm" + owner: gitlab-runner + group: gitlab-runner + mode: u=rwx,g=rwx,o=rx + when: + - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['architecture'] == 'aarch64' + - ansible_facts['distribution_version'] == '20.04' + + - name: Register secondary gitlab-runner + command: "/usr/local/bin/gitlab-runner-arm register --non-interactive --url {{ gitlab_runner_server_url }} --registration-token {{ gitlab_runner_registration_token }} --executor shell --tag-list aarch32,{{ ansible_facts[\"distribution\"]|lower }}_{{ ansible_facts[\"distribution_version\"] }} --description '{{ ansible_facts[\"distribution\"] }} {{ ansible_facts[\"distribution_version\"] }} {{ ansible_facts[\"architecture\"] }} ({{ ansible_facts[\"os_family\"] }})'" + when: + - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['architecture'] == 'aarch64' + - ansible_facts['distribution_version'] == '20.04' + + - name: Install the secondary gitlab-runner service using its own functionality + command: /usr/local/bin/gitlab-runner-arm install --user gitlab-runner --working-directory /home/gitlab-runner/arm -n gitlab-runner-arm + register: gitlab_runner_install_service_result + failed_when: "gitlab_runner_install_service_result.rc != 0 and \"already exists\" not in gitlab_runner_install_service_result.stderr" + when: + - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['architecture'] == 'aarch64' + - ansible_facts['distribution_version'] == '20.04' + + - name: Enable the secondary gitlab-runner service + service: + name: gitlab-runner-arm + state: started + enabled: yes + when: + - ansible_facts['distribution'] == 'Ubuntu' + - ansible_facts['architecture'] == 'aarch64' + - ansible_facts['distribution_version'] == '20.04'