Anatoly Litovsky has uploaded a new change for review.

Change subject: Adding a container based testenv job
......................................................................

Adding a container based testenv job

Change-Id: Ifc2a0cc2dc61d7aba2888a11ea57ea8d0d8f3504
Signed-off-by: Tolik Litovsky <tlito...@redhat.com>
---
A jobs/confs/shell-scripts/system_tests_common_container.sh
R jobs/confs/shell-scripts/system_tests_common_std.sh
D jobs/confs/yaml/builders/system_tests.yaml
A jobs/confs/yaml/builders/system_tests_builders.yaml
M jobs/confs/yaml/jobs/ovirt/system-tests.yaml
R jobs/confs/yaml/templates/system_tests_templates.yaml
6 files changed, 86 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/jenkins refs/changes/33/41833/1

diff --git a/jobs/confs/shell-scripts/system_tests_common_container.sh 
b/jobs/confs/shell-scripts/system_tests_common_container.sh
new file mode 100644
index 0000000..64ac3fe
--- /dev/null
+++ b/jobs/confs/shell-scripts/system_tests_common_container.sh
@@ -0,0 +1,70 @@
+#!/bin/bash -xe
+echo "shell-scripts/system_tests_common.sh"
+
+# Run system tests on ovirt-engine/vdsm
+# PARAMETERS
+#
+# distro
+#     Distro to test the deployment on
+#
+# version
+#     Branch currently building
+#
+# project
+#     Project currently building
+#
+DISTRO="{distro}"
+PROJECT="{project}"
+VERSION="{version}"
+
+ENGINE_DIST="${{DISTRO}}"
+VDSM_DIST="${{DISTRO}}"
+
+OVIRT_CONTRIB="/usr/share/ovirttestenv/"
+ENGINE_DIR="${{WORKSPACE:?}}/ovirt-engine"
+VDSM_DIR="${{WORKSPACE?}}/vdsm"
+VIRT_CONFIG="${{OVIRT_CONTRIB}}/config/virt/centos7.json"
+REPOSYNC_YUM_CONFIG="${{OVIRT_CONTRIB}}/config/repos/ovirt-master-snapshot-external.repo"
+
+PREFIX="${{WORKSPACE:?}}/jenkins-deployment-${{BUILD_NUMBER:?}}"
+
+chmod g+x "${{WORKSPACE?}}"
+
+# Create $PREFIX for current run
+testenvcli init \
+    "${{PREFIX?}}" \
+    "${{VIRT_CONFIG?}}"
+
+echo '[INIT_OK] Initialized successfully, need cleanup later'
+
+# Build RPMs
+cd "${{PREFIX?}}"
+testenvcli ovirt reposetup \
+    --reposync-yum-config="${{REPOSYNC_YUM_CONFIG?}}" \
+    --engine-dir="${{ENGINE_DIR?}}" \
+    --vdsm-dir="${{VDSM_DIR?}}"
+
+# Start VMs
+testenvcli start
+
+# Install RPMs
+testenvcli ovirt deploy
+
+testenvcli ovirt engine-setup \
+    
--config="${{OVIRT_CONTRIB?}}/config/answer-files/${{DISTRO}}_${{VERSION}}.conf"
+
+cat > engine-patch.sh << /EOF
+su - postgres -c  "psql -d engine -c \
+\"INSERT INTO vdc_options (option_value , option_name) VALUES( E'atomic 
install centos7-vdsmi:latest > /dev/null 2>&1 ;systemctl start 
vdsmc.service;docker exec --interactive=true vdsmc 
\'/container/ovirt-deploy.sh\';','BootstrapCommand');\""
+systemctl restart ovirt-engine
+EOF
+
+sshpass -p "123456" ssh root@192.168.200.2 'bash -s' < engine-patch.sh
+
+# Start testing
+testenvcli ovirt runtest \
+    "${{OVIRT_CONTRIB?}}/test_scenarios/bootstrap.py"
+testenvcli ovirt runtest \
+    "${{OVIRT_CONTRIB?}}/test_scenarios/create_clean_snapshot.py"
+testenvcli ovirt runtest \
+    "${{OVIRT_CONTRIB?}}/test_scenarios/basic_sanity.py"
diff --git a/jobs/confs/shell-scripts/system_tests_common.sh 
b/jobs/confs/shell-scripts/system_tests_common_std.sh
similarity index 100%
rename from jobs/confs/shell-scripts/system_tests_common.sh
rename to jobs/confs/shell-scripts/system_tests_common_std.sh
diff --git a/jobs/confs/yaml/builders/system_tests.yaml 
b/jobs/confs/yaml/builders/system_tests.yaml
deleted file mode 100644
index 60cfe12..0000000
--- a/jobs/confs/yaml/builders/system_tests.yaml
+++ /dev/null
@@ -1,4 +0,0 @@
-- builder:
-    name: system-tests
-    builders:
-      - shell: !include-raw shell-scripts/system_tests_common.sh
diff --git a/jobs/confs/yaml/builders/system_tests_builders.yaml 
b/jobs/confs/yaml/builders/system_tests_builders.yaml
new file mode 100644
index 0000000..11fe618
--- /dev/null
+++ b/jobs/confs/yaml/builders/system_tests_builders.yaml
@@ -0,0 +1,9 @@
+- builder:
+    name: system-tests-std
+    builders:
+      - shell: !include-raw shell-scripts/system_tests_common_std.sh
+
+- builder:
+    name: system-tests-container
+    builders:
+      - shell: !include-raw shell-scripts/system_tests_common_container.sh
diff --git a/jobs/confs/yaml/jobs/ovirt/system-tests.yaml 
b/jobs/confs/yaml/jobs/ovirt/system-tests.yaml
index fed8a14..44ce09a 100644
--- a/jobs/confs/yaml/jobs/ovirt/system-tests.yaml
+++ b/jobs/confs/yaml/jobs/ovirt/system-tests.yaml
@@ -11,16 +11,20 @@
       arch: x86_64
       email-to: dkuzn...@redhat.com bazu...@redhat.com
       jobs:
-        - '{project}_{version}_system-tests-{distro}-{arch}_{trigger}'
+        - 
'{project}_{deployment}_{version}_system-tests-{distro}-{arch}_{trigger}'
 
 - project:
     name: ovirt-engine-system-tests
     project: ovirt-engine
     other-project: vdsm
+    deployment : std
     <<: *system-tests-common
 
 - project:
     name: vdsm-system-tests
     project: vdsm
+    deployment:
+      - std
+      - container
     other-project: ovirt-engine
     <<: *system-tests-common
diff --git a/jobs/confs/yaml/templates/system_tests.yaml 
b/jobs/confs/yaml/templates/system_tests_templates.yaml
similarity index 90%
rename from jobs/confs/yaml/templates/system_tests.yaml
rename to jobs/confs/yaml/templates/system_tests_templates.yaml
index acb8980..417811a 100644
--- a/jobs/confs/yaml/templates/system_tests.yaml
+++ b/jobs/confs/yaml/templates/system_tests_templates.yaml
@@ -1,5 +1,5 @@
 - job-template:
-    name: '{project}_{version}_system-tests-{distro}-{arch}_{trigger}'
+    name: 
'{project}_{deployment}_{version}_system-tests-{distro}-{arch}_{trigger}'
     node: '{node-filter}'
     parameters:
       - gerrit-params:
@@ -14,7 +14,7 @@
       - '{other-project}':
           branch: '{other-branch}'
     builders:
-      - system-tests:
+      - system-tests-{deployment}:
           project: '{project}'
           version: '{version}'
           distro: '{distro}'


-- 
To view, visit https://gerrit.ovirt.org/41833
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc2a0cc2dc61d7aba2888a11ea57ea8d0d8f3504
Gerrit-PatchSet: 1
Gerrit-Project: jenkins
Gerrit-Branch: master
Gerrit-Owner: Anatoly Litovsky <tlito...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to