From db3b5370ecdf65f7789350df7851908915c22871 Mon Sep 17 00:00:00 2001 From: Guilherme Gallo Date: Mon, 26 Jun 2023 00:19:31 -0300 Subject: [PATCH] ci/lava: Add LAVA SSH client container - To keep things organized, create a base hidden jobs for alpine images, as we have 2 now - This image will have an SSH client ran by LAVA dispatchers (x86_64-only) who will serve as a bypass channel of output and dmesg and an alternative for UART. Signed-off-by: Guilherme Gallo Part-of: --- .../alpine/x86_64_lava_ssh_client.sh | 29 +++++++++++++++++++ .gitlab-ci/container/gitlab-ci.yml | 15 +++++++++- .gitlab-ci/image-tags.yml | 1 + .gitlab-ci/lava/lava-gitlab-ci.yml | 4 +++ 4 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci/container/alpine/x86_64_lava_ssh_client.sh diff --git a/.gitlab-ci/container/alpine/x86_64_lava_ssh_client.sh b/.gitlab-ci/container/alpine/x86_64_lava_ssh_client.sh new file mode 100644 index 00000000000..5561a563f33 --- /dev/null +++ b/.gitlab-ci/container/alpine/x86_64_lava_ssh_client.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +# This is a ci-templates build script to generate a container for LAVA SSH client. + +# shellcheck disable=SC1091 +set -e +set -o xtrace + +EPHEMERAL=( +) + +# We only need these very basic packages to run the tests. +DEPS=( + openssh-client # for ssh + iputils # for ping + bash + curl +) + + +apk add "${DEPS[@]}" "${EPHEMERAL[@]}" + +. .gitlab-ci/container/container_pre_build.sh + +############### Uninstall the build software + +apk del "${EPHEMERAL[@]}" + +. .gitlab-ci/container/container_post_build.sh diff --git a/.gitlab-ci/container/gitlab-ci.yml b/.gitlab-ci/container/gitlab-ci.yml index 217ebd0cac8..afb10c1e153 100644 --- a/.gitlab-ci/container/gitlab-ci.yml +++ b/.gitlab-ci/container/gitlab-ci.yml @@ -276,12 +276,18 @@ debian/arm64_build: # Alpine based x86_64 build image -alpine/x86_64_build: +.alpine/x86_64_build-base: extends: - .fdo.container-build@alpine - .container variables: FDO_DISTRIBUTION_VERSION: "3.18" + +# Alpine based x86_64 build image +alpine/x86_64_build: + extends: + - .alpine/x86_64_build-base + variables: MESA_IMAGE_TAG: &alpine-x86_64_build ${ALPINE_X86_64_BUILD_TAG} .use-alpine/x86_64_build: @@ -293,6 +299,13 @@ alpine/x86_64_build: needs: - alpine/x86_64_build +# Alpine based x86_64 image for LAVA SSH dockerized client +alpine/x86_64_lava_ssh_client: + extends: + - .alpine/x86_64_build-base + variables: + MESA_IMAGE_TAG: &alpine-x86_64_lava_ssh_client ${ALPINE_X86_64_LAVA_SSH_TAG} + # Fedora based x86_64 build image fedora/x86_64_build: extends: diff --git a/.gitlab-ci/image-tags.yml b/.gitlab-ci/image-tags.yml index b1f440e4314..1daf31bea91 100644 --- a/.gitlab-ci/image-tags.yml +++ b/.gitlab-ci/image-tags.yml @@ -19,6 +19,7 @@ variables: DEBIAN_X86_64_TEST_VK_TAG: "2023-07-02-apitrace-lto" ALPINE_X86_64_BUILD_TAG: "2023-05-01-3.18-bump-1" + ALPINE_X86_64_LAVA_SSH_TAG: "2023-06-26-first-version" FEDORA_X86_64_BUILD_TAG: "2023-05-05-ccache-on" KERNEL_ROOTFS_TAG: "2023-07-05-angle" diff --git a/.gitlab-ci/lava/lava-gitlab-ci.yml b/.gitlab-ci/lava/lava-gitlab-ci.yml index c9442a5d15f..e641933eac9 100755 --- a/.gitlab-ci/lava/lava-gitlab-ci.yml +++ b/.gitlab-ci/lava/lava-gitlab-ci.yml @@ -1,3 +1,7 @@ +variables: + LAVA_SSH_CLIENT_IMAGE: "${CI_REGISTRY_IMAGE}/alpine/x86_64_lava_ssh_client:${ALPINE_X86_64_LAVA_SSH_TAG}--${MESA_TEMPLATES_COMMIT}" + + .lava-test: # Cancel job if a newer commit is pushed to the same branch interruptible: true