Anatoly Litovsky has uploaded a new change for review.

Change subject: Adding ovirt node and ovirt node iso projects
......................................................................

Adding ovirt node and ovirt node iso projects

fc20 based should work.
el7 build will most like ly failed.
The build uses master branch , other branches will follow


Change-Id: If543fe28f200e8254d4d96fa6789db3ced44f2b1
Signed-off-by: Tolik Litovsky <tlito...@redhat.com>
---
A jobs/confs/shell-scripts/build-local-ovirt-node.sh
A jobs/confs/yaml/builders/ovirt-node-builders.yaml
A jobs/confs/yaml/jobs/ovirt-node/rhevh_projects.yaml
A jobs/confs/yaml/scms/ovirt-node-job.yaml
A jobs/confs/yaml/scms/ovirt-node-scms.yaml
A jobs/confs/yaml/templates/ovirt-node-job-templates.yaml
6 files changed, 182 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/jenkins refs/changes/58/36058/1

diff --git a/jobs/confs/shell-scripts/build-local-ovirt-node.sh 
b/jobs/confs/shell-scripts/build-local-ovirt-node.sh
new file mode 100755
index 0000000..d06db14
--- /dev/null
+++ b/jobs/confs/shell-scripts/build-local-ovirt-node.sh
@@ -0,0 +1,95 @@
+#!/bin/bash
+
+# the die on error function
+function die {
+       echo "$1"
+       exit 1
+}
+
+#sets the env variables required for the rest
+function set_env {
+
+       distro=$1
+       cache=$PWD/build
+
+       export OVIRT_NODE_BASE=$PWD
+       export OVIRT_CACHE_DIR=$cache/$distro
+       export OVIRT_LOCAL_REPO=file://${OVIRT_CACHE_DIR}/ovirt
+}
+
+# builds the iso
+#parameters
+#      1 : parameter to indicate the extra ks file to run
+function build_iso {
+
+       cd $OVIRT_NODE_BASE/ovirt-node-iso
+
+               ./autogen.sh --with-recipe=../ovirt-node/recipe ${EXTRA_RECIPE}
+
+       if  ! make iso publish ; then
+               die "ISO build failed"
+       fi
+
+       if ! cp ovirt-node-image.ks $OVIRT_CACHE_DIR/ ; then
+               die "can't find source kick start , you should never reach here"
+       fi
+
+       cd ..
+}
+
+#builds the node
+function build_node {
+
+       cd $OVIRT_NODE_BASE/ovirt-node
+
+       ./autogen.sh --with-image-minimizer
+
+       if ! make publish ; then
+               die "Node building failed"
+       fi
+
+       cd ..
+}
+
+#the prereqs
+function check_pre {
+
+
+       if [ ! -d $OVIRT_NODE_BASE/ovirt-node ] ; then
+               die "No node base found"
+       fi
+
+       if [ ! -d $OVIRT_NODE_BASE/ovirt-node-iso ] ; then
+               die "No node-ISO base found"
+       fi
+}
+
+function clean {
+       cd $OVIRT_NODE_BASE/ovirt-node
+       make distclean
+       cd ..
+       cd $OVIRT_NODE_BASE/ovirt-node-iso
+       make clean
+       cd ..
+}
+
+do_build_iso=true
+do_build_node=true
+do_clean=true
+distro="local"
+set_env $distro
+check_pre
+
+if [ "$do_clean" = true ] ; then
+       clean
+fi
+
+if [ "$do_build_node" = true ] ; then
+       build_node
+fi
+
+if [ "$do_build_iso" = true ] ; then
+       build_iso $distro
+fi
+
+
diff --git a/jobs/confs/yaml/builders/ovirt-node-builders.yaml 
b/jobs/confs/yaml/builders/ovirt-node-builders.yaml
new file mode 100644
index 0000000..4959e1a
--- /dev/null
+++ b/jobs/confs/yaml/builders/ovirt-node-builders.yaml
@@ -0,0 +1,8 @@
+##############################################################################
+###   Builder Definitions
+##############################################################################
+- builder:
+    name: build_ovirt_iso
+    builders :
+        - shell:
+            !include-raw shell-scripts/build-local-ovirt-node.sh
diff --git a/jobs/confs/yaml/jobs/ovirt-node/rhevh_projects.yaml 
b/jobs/confs/yaml/jobs/ovirt-node/rhevh_projects.yaml
new file mode 100644
index 0000000..7a29a0f
--- /dev/null
+++ b/jobs/confs/yaml/jobs/ovirt-node/rhevh_projects.yaml
@@ -0,0 +1,13 @@
+##############################################################################
+###   Projects
+##############################################################################
+- project:
+    name: 'ovirt-node'
+    project-type: freestyle
+    base_distro :
+        - el7
+        - fc20
+    version :
+        - master
+    jobs:
+      - 'ovirt-node_{version}_builder_{base_distro}':
diff --git a/jobs/confs/yaml/scms/ovirt-node-job.yaml 
b/jobs/confs/yaml/scms/ovirt-node-job.yaml
new file mode 100644
index 0000000..7a29a0f
--- /dev/null
+++ b/jobs/confs/yaml/scms/ovirt-node-job.yaml
@@ -0,0 +1,13 @@
+##############################################################################
+###   Projects
+##############################################################################
+- project:
+    name: 'ovirt-node'
+    project-type: freestyle
+    base_distro :
+        - el7
+        - fc20
+    version :
+        - master
+    jobs:
+      - 'ovirt-node_{version}_builder_{base_distro}':
diff --git a/jobs/confs/yaml/scms/ovirt-node-scms.yaml 
b/jobs/confs/yaml/scms/ovirt-node-scms.yaml
new file mode 100644
index 0000000..c95980c
--- /dev/null
+++ b/jobs/confs/yaml/scms/ovirt-node-scms.yaml
@@ -0,0 +1,23 @@
+##############################################################################
+###   SCM Definitions
+##############################################################################
+- scm:
+    name: ovirt-node
+    scm:
+        - git:
+            url: http://gerrit.ovirt.org/p/ovirt-node.git
+            branches:
+              - origin/master
+            scm-name: node
+            wipe-workspace: true
+            basedir : "ovirt-node"
+- scm:
+    name: ovirt-node-iso
+    scm:
+        - git:
+            url: http://gerrit.ovirt.org/p/ovirt-node-iso.git
+            branches:
+              - origin/master
+            scm-name: node-iso
+            wipe-workspace: true
+            basedir : "ovirt-node-iso"
\ No newline at end of file
diff --git a/jobs/confs/yaml/templates/ovirt-node-job-templates.yaml 
b/jobs/confs/yaml/templates/ovirt-node-job-templates.yaml
new file mode 100644
index 0000000..db439fb
--- /dev/null
+++ b/jobs/confs/yaml/templates/ovirt-node-job-templates.yaml
@@ -0,0 +1,30 @@
+##############################################################################
+###   Job Templates
+##############################################################################
+- job-template:
+    name: 'ovirt-node_{version}_builder_{base_distro}'
+    node : '{base_distro}'
+    project-type: freestyle
+    concurent: false
+    display-name: 'ovirt-node {version} builder {base_distro}'
+    builders :
+          - build_ovirt_iso
+    scm :
+          - ovirt-node
+          - ovirt-node-iso
+    triggers :
+          - gerrit:
+              trigger-on-change-merged-event : true
+              server-name : 'gerrit.ovirt.org'
+              successful-message : '{version} image ready'
+              projects:
+                - project-compare-type : 'PLAIN'
+                  project-pattern : 'ovirt-node'
+                  branch-compare-type: 'PLAIN'
+                  branch-pattern: '{version}'
+                - project-compare-type : 'PLAIN'
+                  project-pattern : 'ovirt-node-iso'
+                  branch-compare-type: 'PLAIN'
+                  branch-pattern: '{version}'
+
+


-- 
To view, visit http://gerrit.ovirt.org/36058
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If543fe28f200e8254d4d96fa6789db3ced44f2b1
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