Merge "Update to ODL Neon RPM pipelines"
[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 task :metadata_lint do
21   sh "metadata-json-lint metadata.json"
22 end
23
24 # CentOS latest VM
25 desc "Beaker tests against CentOS 7 VM with latest Neon RPM from ODL Nexus CD repo"
26 task :cent_devel_vm do
27   sh "RS_SET=centos-7 RPM_REPO='https://nexus.opendaylight.org/content/repositories/opendaylight-neon-epel-7-$basearch-devel' bundle exec rake beaker"
28 end
29
30 # CentOS latest container
31 desc "Beaker tests against CentOS 7 container with latest Neon RPM from ODL Nexus CD repo"
32 task :cent_devel_dock do
33   sh "RS_SET=centos-7-docker RPM_REPO='https://nexus.opendaylight.org/content/repositories/opendaylight-neon-epel-7-$basearch-devel' bundle exec rake beaker"
34 end
35
36 # CentOS latest release/SR VM
37 #desc "Beaker tests against CentOS 7 VM with latest Neon release/SR RPM from CentOS CBS repo"
38 #task :cent_rel_vm do
39 #  sh "RS_SET=centos-7 RPM_REPO='http://cbs.centos.org/repos/nfv7-opendaylight-10-release/$basearch/os/' bundle exec rake beaker"
40 #end
41
42 # CentOS latest release/SR container
43 # Uncomment once there's a Neon release
44 #desc "Beaker tests against CentOS 7 container with latest Neon release/SR RPM from CentOS CBS repo"
45 #task :cent_rel_dock do
46 #  sh "RS_SET=centos-7-docker RPM_REPO='http://cbs.centos.org/repos/nfv7-opendaylight-10-release/$basearch/os/' bundle exec rake beaker"
47 #end
48
49 # Multi-test helpers
50
51 desc "Run syntax, lint, and spec tests."
52 task :test => [
53   :syntax,
54   :lint,
55   :metadata_lint,
56   :spec,
57 ]
58
59 desc "Quick and important tests"
60 task :sanity=> [
61   :test,
62   :cent_devel_dock,
63 ]
64
65 desc "All tests, use VMs for Beaker tests"
66 task :acceptance_vm => [
67   :test,
68   :cent_devel_vm,
69 # Uncomment once there's a Neon release
70 #  :cent_rel_vm,
71 ]
72
73 desc "All tests, use containers for Beaker tests"
74 task :acceptance_dock => [
75   :test,
76   :cent_devel_dock,
77 # Uncomment once there's a Neon release
78 #  :cent_rel_dock,
79 ]