From 04c885789dec29ed8963b9ae4db021e2f4fc89e4 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Thu, 19 Oct 2023 15:25:30 +0200 Subject: Build Xtesting Virtual Machines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ia7fa9819be1e23cdd5c2502fe3de758de235353d Signed-off-by: Cédric Ollivier --- jjb/functest/xtesting-ci-vm.yaml | 41 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 38 insertions(+), 3 deletions(-) diff --git a/jjb/functest/xtesting-ci-vm.yaml b/jjb/functest/xtesting-ci-vm.yaml index 9bfc60482..aab2ebb58 100644 --- a/jjb/functest/xtesting-ci-vm.yaml +++ b/jjb/functest/xtesting-ci-vm.yaml @@ -19,7 +19,6 @@ name: xtesting-ci-vm-builder builders: - shell: | - find curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee \ /etc/apt/sources.list.d/google-cloud-sdk.list @@ -38,6 +37,30 @@ disk-image-create --image-size 20 -o xtestingci-4.1.0.qcow2 debian vm devuser openssh-server xtestingci gsutil cp xtestingci-4.1.0.qcow2 gs://artifacts.opnfv.org/xtestingci/xtestingci-4.1.0.qcow2 + +- builder: + name: xtesting-vm-builder + builders: + - shell: | + curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - + echo "deb https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee \ + /etc/apt/sources.list.d/google-cloud-sdk.list + sudo apt-get -o DPkg::Lock::Timeout=300 update && \ + DEBIAN_FRONTEND=noninteractive sudo apt-get \ + -o DPkg::Lock::Timeout=300 install python3-diskimage-builder -y + git clone https://github.com/collivier/ansible-role-xtesting.git + export ELEMENTS_PATH=$(pwd)/elements:$(pwd)/ansible-role-xtesting/elements + export DIB_DEBIAN_COMPONENTS=main,contrib,non-free + export DIB_DEV_USER_SHELL=/bin/bash + export DIB_OPENSSH_SERVER_HARDENING=0 + export DIB_DEV_USER_PASSWORD=xtesting + export DIB_DEV_USER_PWDLESS_SUDO=yes + export DIB_CLOUD_INIT_ALLOW_SSH_PWAUTH=Yes + export DIB_RELEASE=bookworm + export DIB_DEV_USER_USERNAME=xtesting + disk-image-create --image-size 20 -o xtesting-latest.qcow2 debian vm devuser openssh-server xtesting + gsutil cp xtesting-latest.qcow2 gs://artifacts.opnfv.org/xtesting/xtesting-latest.qcow2 + - trigger: name: xtesting-ci-vm-trigger triggers: @@ -54,7 +77,6 @@ name: 'xtesting-ci-vm' scm: - xtesting-ci-vm-scm - - xtesting-vm-scm triggers: - xtesting-ci-vm-trigger parameters: @@ -62,10 +84,23 @@ builders: - xtesting-ci-vm-builder +- job-template: + name: 'xtesting-vm' + scm: + - xtesting-vm-scm + triggers: + - xtesting-ci-vm-trigger + parameters: + - xtesting-ci-vm-parameter + builders: + - xtesting-vm-builder + + - project: name: 'xtesting-ci-vm' jobs: - 'xtesting-ci-vm' + - 'xtesting-vm' - view: name: xtesting-ci-vm @@ -77,4 +112,4 @@ - last-success - last-failure - last-duration - regex: ^xtesting-ci-vm.*$ + regex: ^xtesting-.*-vm.*$ -- cgit 1.2.3-korg