Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: dieterdemeyer/puppet-oracleprereq
base: 9a599c1ed0
...
head fork: dieterdemeyer/puppet-oracleprereq
compare: 2d6391111f
Checking mergeability… Don't worry, you can still create the pull request.
  • 8 commits
  • 7 files changed
  • 0 commit comments
  • 4 contributors
View
46 manifests/init.pp
@@ -12,49 +12,19 @@
#
# [Remember: No empty lines between comments and class definition]
class oracleprereq {
+include oracleprereq::params
- $glibc = $::architecture ? {
- i386 => $::operatingsystemrelease ? {
- /^5.*$/ => ['glibc-devel.i386','glibc-headers'],
- /^6.*$/ => ['glibc-devel.i686','glibc-headers'],
- },
- x86_64 => $::operatingsystemrelease ? {
- /^5.*$/ => ['glibc-devel.i386','glibc-devel.x86_64','glibc-headers'],
- /^6.*$/ => ['glibc-devel.i686','glibc-devel.x86_64','glibc-headers'],
- },
- }
- $libpackages = ['libaio',
- 'libaio-devel',
- 'numactl-devel',
- 'elfutils-libelf-devel',
- 'unixODBC',
- 'unixODBC-devel',
- 'xorg-x11-xauth']
- $buildpackages = ['make',
- 'cpp',
- 'libstdc++-devel',
- 'gcc',
- 'gcc-c++',
- 'compat-libstdc++-33',
- 'compat-db']
- $systemtools = ['ksh',
- 'bind-utils',
- 'smartmontools',
- 'ftp',
- 'libgomp',
- 'unzip',
- 'sysstat']
- package { [$libpackages,$glibc,$buildpackages,$systemtools]:
+ package { [$oracleprereq::params::libpackages,$oracleprereq::params::glibc,$oracleprereq::params::buildpackages,$oracleprereq::params::systemtools]:
ensure => present,
}
- if $::architecture == 'x86_64' {
- package { ["oracleasm-${::kernelrelease}",'oracleasmlib','oracleasm-support']:
- ensure => present,
+ # There is no oracleasm package for rhel6
+ if $::operatingsystemrelease =~ /^5.*$/ {
+ if $::architecture == 'x86_64' {
+ package { ["oracleasm-${::kernelrelease}",'oracleasmlib','oracleasm-support']:
+ ensure => present,
+ }
}
}
- package { 'device-mapper-multipath':
- ensure => present,
- }
augeas { 'sysctl.conf':
context => '/files/etc/sysctl.conf',
View
36 manifests/params.pp
@@ -0,0 +1,36 @@
+class oracleprereq::params {
+
+ $glibc = $::architecture ? {
+ i386 => $::operatingsystemrelease ? {
+ /^5.*$/ => ['glibc-devel.i386','glibc-headers'],
+ /^6.*$/ => ['glibc-devel.i686','glibc-headers'],
+ },
+ x86_64 => $::operatingsystemrelease ? {
+ /^5.*$/ => ['glibc-devel.i386','glibc-devel.x86_64','glibc-headers'],
+ /^6.*$/ => ['glibc-devel.i686','glibc-devel.x86_64','glibc-headers'],
+ },
+ }
+
+ $libpackages = ['libaio',
+ 'libaio-devel',
+ 'numactl-devel',
+ 'elfutils-libelf-devel',
+ 'unixODBC',
+ 'unixODBC-devel',
+ 'xorg-x11-xauth']
+ $buildpackages = ['make',
+ 'cpp',
+ 'libstdc++-devel',
+ 'gcc',
+ 'gcc-c++',
+ 'compat-libstdc++-33',
+ 'compat-db']
+ $systemtools = ['ksh',
+ 'bind-utils',
+ 'smartmontools',
+ 'ftp',
+ 'libgomp',
+ 'unzip',
+ 'sysstat',
+ 'device-mapper-multipath']
+}
View
1  tasks/rake/.puppet-lintrc
@@ -1 +0,0 @@
---no-80chars-check
View
5 tasks/rake/jenkins.rake
@@ -1,5 +1,8 @@
require File.expand_path('../../env', __FILE__)
+$:.unshift(File.join(File.dirname(__FILE__), 'lib'))
+require 'version_helper'
+
namespace "jenkins" do
begin
require 'ci/reporter/rake/rspec'
@@ -33,6 +36,7 @@ namespace "jenkins" do
module_name = ENV['JOB_NAME']
git_commit = ENV['GIT_COMMIT']
+ semver_version = VersionHelper.new.semver_version
if !git_commit.nil? and !git_commit.empty?
puts "Saving #{module_name}.yaml file"
@@ -40,6 +44,7 @@ namespace "jenkins" do
open("#{dist_dir}/#{module_name}.yaml", "w") { |file|
file.puts "module_name: #{module_name}"
file.puts "git_commit: #{git_commit}"
+ file.puts "semver_version: #{semver_version}"
}
end
end
View
12 tasks/rake/lib/packaging/base_packager.rb
@@ -4,17 +4,18 @@
require 'pp'
$:.unshift(File.join(File.dirname(__FILE__), '..'))
-require 'modulefile_reader'
+require 'version_helper'
class BasePackager
def initialize(package_type)
self.validate_environment
-
+
+ version_helper = VersionHelper.new
+
@basedirectory = ENV['WORKSPACE']
- @package_version = ModulefileReader.new.version
- @semver_version = @package_version + "+build." + ENV['BUILD_NUMBER'] + "." + ENV['GIT_COMMIT'][0,10]
- @release = "1"
+ @semver_version = version_helper.semver_version
+ @release = "1"
@package_type = package_type
case package_type
@@ -38,6 +39,7 @@ def validate_environment()
end
def build(module_name)
+ ENV["#{ENV['JOB_NAME']}_semver_version"] = @semver_version
package_name = "cegeka-puppet-#{module_name}"
destination_file = "#{package_name}#{@first_delimiter}#{@semver_version}-#{@release}#{@second_delimiter}#{@architecture}.#{@package_type}"
destination_folder = "#{@basedirectory}/#{module_name}/#{RESULTS}/dist"
View
27 tasks/rake/lib/version_helper.rb
@@ -0,0 +1,27 @@
+require File.expand_path('../../../env', __FILE__)
+
+class VersionHelper
+
+ def initialize()
+ filename = File.join(MODULE_ROOT_DIR, 'Modulefile')
+ @module_file = File.read(filename)
+ end
+
+ def semver_version
+ if ENV['GIT_COMMIT'].nil?
+ ENV['GIT_COMMIT'] = "54b0c58c7ce9f2a8b551351102ee0938"[0,10]
+ end
+
+ return package_version + "+build." + ENV['BUILD_NUMBER'] + "." + ENV['GIT_COMMIT'][0,10]
+ end
+
+ private
+ def package_version
+ @module_file.each_line do |line|
+ if line.match(/version/)
+ return line.split(' ')[1].gsub("'", "")
+ end
+ end
+ end
+
+end
View
5 tasks/rake/style.rake
@@ -13,11 +13,8 @@ task :style do
success = true
linter = PuppetLint.new
-
- if ENV['report'] == 'ci'
- linter.configuration.log_format =
+ linter.configuration.log_format =
'%{path}:%{linenumber}:%{check}:%{KIND}:%{message}'
- end
lintrc = "#{MODULE_ROOT_DIR}/.puppet-lintrc"
if File.file?(lintrc)

No commit comments for this range

Something went wrong with that request. Please try again.