Add job to install ODL via ansible-opendaylight 25/51325/4
authorAkshita Jha <zenith158@gmail.com>
Tue, 7 Mar 2017 11:33:25 +0000 (17:03 +0530)
committerDaniel Farrell <dfarrell@redhat.com>
Tue, 7 Mar 2017 18:03:10 +0000 (13:03 -0500)
Signed-off-by: Akshita Jha <zenith158@gmail.com>
Change-Id: I95d5b4dc4b943d86f451771e9553a155435253d7
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
jjb/packaging/include-raw-test-ansible-deb.sh [new file with mode: 0644]
jjb/packaging/include-raw-test-ansible-rpm.sh [new file with mode: 0644]
jjb/packaging/packaging.yaml

diff --git a/jjb/packaging/include-raw-test-ansible-deb.sh b/jjb/packaging/include-raw-test-ansible-deb.sh
new file mode 100644 (file)
index 0000000..8f08eb5
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# Options:
+#   -x: Echo commands
+#   -e: Fail on errors
+#   -o pipefail: Fail on errors in scripts this calls, give stacktrace
+set -ex -o pipefail
+
+# Install required packages
+virtualenv deb_build
+source deb_build/bin/activate
+pip install --upgrade pip
+
+# Install latest ansible
+sudo apt-add-repository ppa:ansible/ansible
+sudo apt-get update
+sudo apt-get install -y ansible
+
+git clone https://github.com/dfarrell07/ansible-opendaylight.git
+cd ansible-opendaylight
+sudo ansible-galaxy install -r requirements.yml
+sudo ansible-playbook -i "localhost," -c local examples/deb_repo_install_playbook.yml
+
+# Add more tests
\ No newline at end of file
diff --git a/jjb/packaging/include-raw-test-ansible-rpm.sh b/jjb/packaging/include-raw-test-ansible-rpm.sh
new file mode 100644 (file)
index 0000000..48f0e11
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Options:
+#   -x: Echo commands
+#   -e: Fail on errors
+#   -o pipefail: Fail on errors in scripts this calls, give stacktrace
+set -ex -o pipefail
+
+# Install required packages
+virtualenv rpm_build
+source rpm_build/bin/activate
+pip install --upgrade pip
+sudo yum install -y ansible
+
+git clone https://github.com/dfarrell07/ansible-opendaylight.git
+cd ansible-opendaylight
+sudo ansible-galaxy install -r requirements.yml
+sudo ansible-playbook -i "localhost," -c local examples/odl_6_testing_playbook.yml
+
+# Add more tests
\ No newline at end of file
index 3c60376b13c40f1b20fd3d0de12e6056c426eea3..417c59238688f5fd3f3b0ba5666abf758c9ec1cc 100644 (file)
@@ -10,6 +10,8 @@
       - 'packaging-build-deb-{stream}'
       - 'packaging-test-rpm-{stream}'
       - 'packaging-test-puppet-{stream}'
+      - 'packaging-test-ansible-rpm-{stream}'
+      - 'packaging-test-ansible-deb-{stream}'
 
     project: 'integration/packaging'
 
       - archive-artifacts:
           artifacts: '**'
 
+- job-template:
+    name: 'packaging-test-ansible-rpm-{stream}'
+
+    node: centos7-java-builder-2c-4g
+
+    project-type: freestyle
+
+    properties:
+      - opendaylight-infra-properties:
+          build-days-to-keep: 7
+
+    parameters:
+      - opendaylight-infra-parameters:
+          project: '{project}'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
+
+    scm:
+      - integration-gerrit-scm:
+          basedir: 'packaging'
+          refspec: '$GERRIT_REFSPEC'
+          branch: 'master'
+
+    wrappers:
+      - opendaylight-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    builders:
+      - shell: !include-raw: include-raw-test-ansible-rpm.sh
+
+    triggers:
+      - timed: '@daily'
+
+
 - job-template:
     name: 'packaging-build-deb-{stream}'
 
     publishers:
       - archive-artifacts:
           artifacts: 'packaging/deb/opendaylight/*.deb'
+
+
+- job-template:
+    name: 'packaging-test-ansible-deb-{stream}'
+
+    node: ubuntu-trusty-mininet-2c-2g
+
+    project-type: freestyle
+
+    properties:
+      - opendaylight-infra-properties:
+          build-days-to-keep: 7
+
+    parameters:
+      - opendaylight-infra-parameters:
+          project: '{project}'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
+
+    scm:
+      - integration-gerrit-scm:
+          basedir: 'packaging'
+          refspec: '$GERRIT_REFSPEC'
+          branch: 'master'
+
+    wrappers:
+      - opendaylight-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    builders:
+      - shell: !include-raw: include-raw-test-ansible-deb.sh
+
+    triggers:
+      - timed: '@daily'