aboutsummaryrefslogtreecommitdiff
path: root/scripts/ci
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/ci')
-rw-r--r--scripts/ci/gitlab-ci-section29
-rw-r--r--scripts/ci/setup/gitlab-runner.yml39
-rw-r--r--scripts/ci/setup/ubuntu/build-environment.yml2
-rw-r--r--scripts/ci/setup/ubuntu/ubuntu-2204-aarch64.yaml4
-rw-r--r--scripts/ci/setup/ubuntu/ubuntu-2204-s390x.yaml4
5 files changed, 67 insertions, 11 deletions
diff --git a/scripts/ci/gitlab-ci-section b/scripts/ci/gitlab-ci-section
new file mode 100644
index 0000000..9bbe804
--- /dev/null
+++ b/scripts/ci/gitlab-ci-section
@@ -0,0 +1,29 @@
+# Copyright (c) 2024 Linaro Ltd
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+# gitlab-ci-section: This is a shell script fragment which defines
+# functions section_start and section_end which will emit marker lines
+# that GitLab will interpret as the beginning or end of a "collapsible
+# section" in a CI job log. See
+# https://docs.gitlab.com/ee/ci/yaml/script.html#expand-and-collapse-job-log-sections
+#
+# This is intended to be sourced in the before_script section of
+# a CI config; the section_start and section_end functions will
+# then be available for use in the before_script and script sections.
+
+# Section names are [-_.A-Za-z0-9] and the section_start pairs with
+# a section_end with the same section name.
+# The description can be any printable text without newlines; this is
+# what will appear in the log.
+
+# Usage:
+# section_start section_name "Description of the section"
+section_start () {
+ printf "section_start:%s:%s\r\e[0K%s\n" "$(date +%s)" "$1" "$2"
+}
+
+# Usage:
+# section_end section_name
+section_end () {
+ printf "section_end:%s:%s\r\e[0K\n" "$(date +%s)" "$1"
+}
diff --git a/scripts/ci/setup/gitlab-runner.yml b/scripts/ci/setup/gitlab-runner.yml
index 7bdafab..57e7fae 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\"] }})'"
diff --git a/scripts/ci/setup/ubuntu/build-environment.yml b/scripts/ci/setup/ubuntu/build-environment.yml
index edf1900..56b5160 100644
--- a/scripts/ci/setup/ubuntu/build-environment.yml
+++ b/scripts/ci/setup/ubuntu/build-environment.yml
@@ -39,7 +39,6 @@
when:
- ansible_facts['distribution'] == 'Ubuntu'
- ansible_facts['distribution_version'] == '22.04'
- - ansible_facts['architecture'] == 'aarch64' or ansible_facts['architecture'] == 'x86_64'
- name: Install packages for QEMU on Ubuntu 22.04
package:
@@ -47,7 +46,6 @@
when:
- ansible_facts['distribution'] == 'Ubuntu'
- ansible_facts['distribution_version'] == '22.04'
- - ansible_facts['architecture'] == 'aarch64' or ansible_facts['architecture'] == 'x86_64'
- name: Install armhf cross-compile packages to build QEMU on AArch64 Ubuntu 22.04
package:
diff --git a/scripts/ci/setup/ubuntu/ubuntu-2204-aarch64.yaml b/scripts/ci/setup/ubuntu/ubuntu-2204-aarch64.yaml
index fd5489c..f11e980 100644
--- a/scripts/ci/setup/ubuntu/ubuntu-2204-aarch64.yaml
+++ b/scripts/ci/setup/ubuntu/ubuntu-2204-aarch64.yaml
@@ -35,6 +35,7 @@ packages:
- libcacard-dev
- libcap-ng-dev
- libcapstone-dev
+ - libcbor-dev
- libcmocka-dev
- libcurl4-gnutls-dev
- libdaxctl-dev
@@ -49,6 +50,7 @@ packages:
- libglusterfs-dev
- libgnutls28-dev
- libgtk-3-dev
+ - libgtk-vnc-2.0-dev
- libibverbs-dev
- libiscsi-dev
- libjemalloc-dev
@@ -112,6 +114,7 @@ packages:
- python3-venv
- python3-yaml
- rpm2cpio
+ - rustc-1.77
- sed
- socat
- sparse
@@ -120,6 +123,7 @@ packages:
- tar
- tesseract-ocr
- tesseract-ocr-eng
+ - vulkan-tools
- xorriso
- zlib1g-dev
- zstd
diff --git a/scripts/ci/setup/ubuntu/ubuntu-2204-s390x.yaml b/scripts/ci/setup/ubuntu/ubuntu-2204-s390x.yaml
index afa0450..6559cb2 100644
--- a/scripts/ci/setup/ubuntu/ubuntu-2204-s390x.yaml
+++ b/scripts/ci/setup/ubuntu/ubuntu-2204-s390x.yaml
@@ -35,6 +35,7 @@ packages:
- libcacard-dev
- libcap-ng-dev
- libcapstone-dev
+ - libcbor-dev
- libcmocka-dev
- libcurl4-gnutls-dev
- libdaxctl-dev
@@ -49,6 +50,7 @@ packages:
- libglusterfs-dev
- libgnutls28-dev
- libgtk-3-dev
+ - libgtk-vnc-2.0-dev
- libibverbs-dev
- libiscsi-dev
- libjemalloc-dev
@@ -110,6 +112,7 @@ packages:
- python3-venv
- python3-yaml
- rpm2cpio
+ - rustc-1.77
- sed
- socat
- sparse
@@ -118,6 +121,7 @@ packages:
- tar
- tesseract-ocr
- tesseract-ocr-eng
+ - vulkan-tools
- xorriso
- zlib1g-dev
- zstd