summaryrefslogtreecommitdiffstats
path: root/jjb/functest
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2023-10-19 15:25:30 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2023-10-19 15:25:30 +0200
commit04c885789dec29ed8963b9ae4db021e2f4fc89e4 (patch)
treed943edf22320456b4fec2eda4cfad904ae8c6a9e /jjb/functest
parentcacb31efaa38e8b7da293c65096ea8fae516ac51 (diff)
Build Xtesting Virtual Machines
Change-Id: Ia7fa9819be1e23cdd5c2502fe3de758de235353d Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
Diffstat (limited to 'jjb/functest')
-rw-r--r--jjb/functest/xtesting-ci-vm.yaml41
1 files 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.*$