Merge "Remove unncessary null->none RPM repo Beaker logic"
[integration/packaging/puppet-opendaylight.git] / Rakefile
1 require 'puppetlabs_spec_helper/rake_tasks'
2 require 'puppet-lint/tasks/puppet-lint'
3 require 'puppet-syntax/tasks/puppet-syntax'
4
5 PuppetLint.configuration.relative = true
6 PuppetLint.configuration.send("disable_80chars")
7 PuppetLint.configuration.log_format = "%{path}:%{line}:%{check}:%{KIND}:%{message}"
8 PuppetLint.configuration.fail_on_warnings = true
9
10 # Forsake support for Puppet 2.6.2 for the benefit of cleaner code.
11 # http://puppet-lint.com/checks/class_parameter_defaults/
12 PuppetLint.configuration.send('disable_class_parameter_defaults')
13 # http://puppet-lint.com/checks/class_inherits_from_params_class/
14 PuppetLint.configuration.send('disable_class_inherits_from_params_class')
15
16 exclude_paths = [
17   "bundle/**/*",
18   "pkg/**/*",
19   "vendor/**/*",
20   "spec/**/*",
21 ]
22 PuppetLint.configuration.ignore_paths = exclude_paths
23 PuppetSyntax.exclude_paths = exclude_paths
24
25 # Linting
26
27 task :metadata_lint do
28   sh "metadata-json-lint metadata.json"
29 end
30
31 # CentOS VMs
32
33 desc "Beaker tests against CentOS 7 VM with latest Carbon testing RPM"
34 task :cent_6test_vm do
35   sh "RS_SET=centos-7 RPM_REPO='opendaylight-6-testing' bundle exec rake beaker"
36 end
37
38 # CentOS Containers
39
40 desc "Beaker tests against CentOS 7 container with latest Carbon testing RPM"
41 task :cent_6test_dock do
42   sh "RS_SET=centos-7-docker RPM_REPO='opendaylight-6-testing' bundle exec rake beaker"
43 end
44
45 # Ubuntu VMs
46
47 desc "Beaker tests against Ubuntu 16.04 Container with Boron release Deb"
48 task :ubuntu_6test_vm do
49   sh "RS_SET=ubuntu-16 DEB_REPO='ppa:odl-team/carbon' bundle exec rake beaker"
50 end
51
52 # Ubuntu Containers
53
54 desc "Beaker tests against Ubuntu 16.04 Container with Boron release Deb"
55 task :ubuntu_6test_dock do
56   sh "RS_SET=ubuntu-16-docker DEB_REPO='ppa:odl-team/carbon' bundle exec rake beaker"
57 end
58
59 # Multi-test helpers
60
61 desc "Run syntax, lint, and spec tests."
62 task :test => [
63   :syntax,
64   :lint,
65   :metadata_lint,
66   :spec,
67 ]
68
69 desc "Quick and important tests"
70 task :sanity=> [
71   :test,
72   :cent_6test_dock,
73 ]
74
75 desc "All tests, use VMs for Beaker tests"
76 task :acceptance_vm => [
77   :test,
78   :ubuntu_6test_vm,
79   :cent_6test_vm,
80 ]
81
82 desc "All tests, use containers for Beaker tests"
83 task :acceptance_dock => [
84   :test,
85   :ubuntu_6test_dock,
86   :cent_6test_dock,
87 ]