Add JJB project, tests for puppet-opendaylight 16/56116/4
authorDaniel Farrell <dfarrell@redhat.com>
Wed, 26 Apr 2017 18:37:00 +0000 (14:37 -0400)
committerDaniel Farrell <dfarrell@redhat.com>
Wed, 26 Apr 2017 22:28:44 +0000 (18:28 -0400)
Add tox verify job, sanity job and acceptance test job.

Tox job does basic Coala linting. Sanity job does quick rspec tests and
a single Beaker test for main OS (CentOS) and latest-ODL. Acceptance
test does Beaker tests for all supported OSs and ODL versions.

Run tox and sanity tests on each change. Run acceptance tests daily.

Change-Id: I9223411c0a17170c02a5a8bf83cb3ab75dd089b5
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
jjb/packaging/include-raw-test-puppet.sh
jjb/packaging/packaging.yaml
jjb/packaging/puppet.yaml [new file with mode: 0644]

index cb015679bb539f54699ed6963cbb1ce00e2ac30c..cd063e2e620eded47156d88967b08960dcfee7ee 100644 (file)
@@ -9,12 +9,8 @@ set -ex -o pipefail
 # Adapted from puppet-opendaylight/Vagrantfile
 # https://github.com/dfarrell07/puppet-opendaylight/blob/master/Vagrantfile
 
-# Update Int/Pack's puppet-opendaylight submodule to latest master
-pushd "$WORKSPACE/packaging"
-git submodule init
-git submodule update --remote
-
 # Install system-wide dependencies
+# TODO: Are all of these still needed?
 sudo yum install -y ruby-devel gcc-c++ zlib-devel patch redhat-rpm-config make rubygems
 
 # Install RVM to help build recent version of Ruby
@@ -35,9 +31,9 @@ ruby --version
 # Install gems dependencies of puppet-opendaylight via Bundler
 gem install bundler
 echo export PATH="\\$PATH:/usr/local/bin" >> "$HOME/.bashrc"
-pushd "$WORKSPACE/packaging/puppet/puppet-opendaylight"
+pushd "$WORKSPACE/puppet"
 bundle install
 bundle update
 
-# Quick+important tests: Linting, rspec and Beaker on CentOS container tests
-bundle exec rake sanity
+# Execute set of tests passed as param from job
+bundle exec rake "$TEST_SUITE"
index 612c728dba95904fb1be16c9cd6523ef9fa5a4b0..5fd18ef80a7dce77944fb833d5b8014ec07ff928 100644 (file)
@@ -10,7 +10,6 @@
       - 'packaging-build-deb-{stream}'
       - 'packaging-test-rpm-{stream}'
       - 'packaging-test-deb-{stream}'
-      - 'packaging-test-puppet-{stream}'
       - 'packaging-test-ansible-rpm-{stream}'
       - 'packaging-test-ansible-deb-{stream}'
 
       - master:
           branch: 'master'
 
-- job-template:
-    name: 'packaging-test-puppet-{stream}'
-
-    node: centos7-docker-2c-4g
-
-    project-type: freestyle
-
-    properties:
-      - opendaylight-infra-properties:
-          build-days-to-keep: 7
-
-    parameters:
-      - opendaylight-infra-parameters:
-          os-cloud: '{os-cloud}'
-          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-puppet.sh
-
-    triggers:
-      - timed: '@daily'
-
 - job-template:
     name: 'packaging-build-rpm-{stream}'
 
diff --git a/jjb/packaging/puppet.yaml b/jjb/packaging/puppet.yaml
new file mode 100644 (file)
index 0000000..53b59d3
--- /dev/null
@@ -0,0 +1,97 @@
+---
+- project:
+    name: puppet
+    project-name: puppet
+
+    jobs:
+      - '{project-name}-verify-tox-{stream}'
+      - 'puppet-test-sanity-{stream}'
+      - 'puppet-test-full-{stream}'
+
+    project: 'integration/packaging/puppet-opendaylight'
+
+    stream:
+      - master:
+          branch: 'master'
+
+- job-template:
+    name: 'puppet-test-sanity-{stream}'
+
+    node: centos7-docker-2c-4g
+
+    project-type: freestyle
+
+    properties:
+      - opendaylight-infra-properties:
+          build-days-to-keep: 7
+
+    parameters:
+      - opendaylight-infra-parameters:
+          os-cloud: '{os-cloud}'
+          project: '{project}'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
+      - string:
+          name: TEST_SUITE
+          default: 'sanity'
+          description: 'Set of tests to execute, Rakefile task'
+
+    scm:
+      - integration-gerrit-scm:
+          basedir: '{project-name}'
+          refspec: '$GERRIT_REFSPEC'
+          branch: '{branch}'
+
+    wrappers:
+      - opendaylight-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    builders:
+      - shell: !include-raw: include-raw-test-puppet.sh
+
+    triggers:
+      - gerrit-trigger-patch-submitted:
+          server: '{server-name}'
+          project: '{project}'
+          branch: '{branch}'
+          files: '**'
+
+- job-template:
+    name: 'puppet-test-full-{stream}'
+
+    node: centos7-docker-2c-4g
+
+    project-type: freestyle
+
+    properties:
+      - opendaylight-infra-properties:
+          build-days-to-keep: 7
+
+    parameters:
+      - opendaylight-infra-parameters:
+          os-cloud: '{os-cloud}'
+          project: '{project}'
+          branch: '{branch}'
+          refspec: 'refs/heads/{branch}'
+          artifacts: '{archive-artifacts}'
+      - string:
+          name: TEST_SUITE
+          default: 'acceptance_dock'
+          description: 'Set of tests to execute, Rakefile task'
+
+    scm:
+      - integration-gerrit-scm:
+          basedir: '{project-name}'
+          refspec: '$GERRIT_REFSPEC'
+          branch: '{branch}'
+
+    wrappers:
+      - opendaylight-infra-wrappers:
+          build-timeout: '{build-timeout}'
+
+    builders:
+      - shell: !include-raw: include-raw-test-puppet.sh
+
+    triggers:
+      - timed: '@daily'