From d01776cd829d024e1c753c9f469a91947e4e970e Mon Sep 17 00:00:00 2001 From: Daniel Farrell Date: Wed, 26 Apr 2017 14:37:00 -0400 Subject: [PATCH] Add JJB project, tests for puppet-opendaylight 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 --- jjb/packaging/include-raw-test-puppet.sh | 12 +-- jjb/packaging/packaging.yaml | 36 --------- jjb/packaging/puppet.yaml | 97 ++++++++++++++++++++++++ 3 files changed, 101 insertions(+), 44 deletions(-) create mode 100644 jjb/packaging/puppet.yaml diff --git a/jjb/packaging/include-raw-test-puppet.sh b/jjb/packaging/include-raw-test-puppet.sh index cb015679b..cd063e2e6 100644 --- a/jjb/packaging/include-raw-test-puppet.sh +++ b/jjb/packaging/include-raw-test-puppet.sh @@ -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" diff --git a/jjb/packaging/packaging.yaml b/jjb/packaging/packaging.yaml index 612c728db..5fd18ef80 100644 --- a/jjb/packaging/packaging.yaml +++ b/jjb/packaging/packaging.yaml @@ -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}' @@ -20,41 +19,6 @@ - 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 index 000000000..53b59d33a --- /dev/null +++ b/jjb/packaging/puppet.yaml @@ -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' -- 2.36.6