Add option to configure karaf logging
[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 exclude_paths = [
11   "bundle/**/*",
12   "pkg/**/*",
13   "vendor/**/*",
14   "spec/**/*",
15 ]
16 PuppetLint.configuration.ignore_paths = exclude_paths
17 PuppetSyntax.exclude_paths = exclude_paths
18
19 # Linting
20
21 task :metadata_lint do
22   sh "metadata-json-lint metadata.json"
23 end
24
25 # CentOS Nexus VM
26 desc "Beaker tests against CentOS 7 VM with latest Oxygen testing RPM from ODL Nexus repo"
27 task :cent_8test_nexus_vm do
28   sh "RS_SET=centos-7 RPM_REPO='https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-$basearch-devel' bundle exec rake beaker"
29 end
30
31 # CentOS Nexus Container
32 desc "Beaker tests against CentOS 7 container with latest Oxygen testing RPM from ODL Nexus repo"
33 task :cent_8test_nexus_dock do
34   sh "RS_SET=centos-7-docker RPM_REPO='https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-$basearch-devel' bundle exec rake beaker"
35 end
36
37 # CentOS CBS VM
38 desc "Beaker tests against CentOS 7 VM with latest Oxygen testing RPM from CentOS CBS repo"
39 task :cent_8test_cbs_vm do
40   sh "RS_SET=centos-7 RPM_REPO='http://cbs.centos.org/repos/nfv7-opendaylight-8-testing/$basearch/os/' bundle exec rake beaker"
41 end
42
43 # CentOS CBS Container
44 desc "Beaker tests against CentOS 7 container with latest Oxygen testing RPM from CentOS CBS repo"
45 task :cent_8test_cbs_dock do
46   sh "RS_SET=centos-7-docker RPM_REPO='http://cbs.centos.org/repos/nfv7-opendaylight-8-testing/$basearch/os/' bundle exec rake beaker"
47 end
48
49 # Ubuntu VMs
50 desc "Beaker tests against Ubuntu 16.04 Container with Boron release Deb"
51 task :ubuntu_6test_vm do
52   sh "RS_SET=ubuntu-16 DEB_REPO='ppa:odl-team/carbon' bundle exec rake beaker"
53 end
54
55 # Ubuntu Containers
56 desc "Beaker tests against Ubuntu 16.04 Container with Boron release Deb"
57 task :ubuntu_6test_dock do
58   sh "RS_SET=ubuntu-16-docker DEB_REPO='ppa:odl-team/carbon' bundle exec rake beaker"
59 end
60
61 # Multi-test helpers
62
63 desc "Run syntax, lint, and spec tests."
64 task :test => [
65   :syntax,
66   :lint,
67   :metadata_lint,
68   :spec,
69 ]
70
71 desc "Quick and important tests"
72 task :sanity=> [
73   :test,
74   :cent_8test_nexus_dock,
75 ]
76
77 desc "All tests, use VMs for Beaker tests"
78 task :acceptance_vm => [
79   :test,
80   :ubuntu_6test_vm,
81   :cent_8test_cbs_vm,
82   :cent_8test_nexus_vm,
83 ]
84
85 desc "All tests, use containers for Beaker tests"
86 task :acceptance_dock => [
87   :test,
88   :ubuntu_6test_dock,
89   :cent_8test_cbs_dock,
90   :cent_8test_nexus_dock,
91 ]