Skip to content

Commit

Permalink
(vanagon-238) Add SLES11 x86_64
Browse files Browse the repository at this point in the history
  • Loading branch information
amitkarsale committed Jan 17, 2024
1 parent ca35011 commit 68a90da
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
ruby-version: '2.7'
- name: Build and test with Rake
run: |
gem install bundler
gem install bundler -v 2.4.22
bundle install --jobs 4 --retry 3
bundle exec rake
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ This project adheres to [Semantic Versioning](https://semver.org).
This changelog adheres to [Keep a CHANGELOG](https://keepachangelog.com).

## [Unreleased]
### Added
- (VANAGON-238) Add SLES11 (Intel) platform definition to vanagon

## [0.44.0] - 2023-11-30
### Added
Expand Down
2 changes: 1 addition & 1 deletion lib/vanagon/engine/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def retrieve_built_artifact(artifacts_to_fetch, no_packaging)
def validate_platform
missing_attrs = []
@required_attributes.each do |attr|
if !@platform.instance_variables.include?("@#{attr}".to_sym) || @platform.instance_variable_get("@#{attr}".to_sym).nil?
if !@platform.instance_variables.include?(:"@#{attr}") || @platform.instance_variable_get(:"@#{attr}").nil?
missing_attrs << attr
end
end
Expand Down
4 changes: 2 additions & 2 deletions lib/vanagon/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def is_windows?
#
# @return [true, false] true if it is a linux variety, false otherwise
def is_linux?
return (!is_windows? && !is_unix?)
return !is_windows? && !is_unix?
end

# Utility matcher to determine if the platform is a cross-compiled variety
Expand All @@ -490,7 +490,7 @@ def is_cross_compiled?
#
# @return [true, false] true if it is a cross-compiled Linux variety, false otherwise
def is_cross_compiled_linux?
return (is_cross_compiled? && is_linux?)
return is_cross_compiled? && is_linux?
end

# Pass in a packaging override. This needs to be implemented for each
Expand Down
11 changes: 11 additions & 0 deletions lib/vanagon/platform/defaults/sles-11-x86_64.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
platform "sles-11-x86_64" do |plat|
plat.servicedir "/usr/lib/systemd/system"
plat.defaultdir "/etc/sysconfig"
plat.servicetype "systemd"

plat.add_build_repository "http://pl-build-tools.delivery.puppetlabs.net/yum/pl-build-tools-release-#{plat.get_os_name}-#{plat.get_os_version}.noarch.rpm"
packages = %w(aaa_base autoconf automake rsync gcc make rpm-build)
plat.provision_with "zypper -n --no-gpg-checks install -y #{packages.join(' ')}"
plat.install_build_dependencies_with "zypper -n --no-gpg-checks install -y"
plat.vmpooler_template "sles-11-x86_64"
end

0 comments on commit 68a90da

Please sign in to comment.