diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index f8827c19..2a3062a9 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index e7d15298..bea9a742 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/lib/vanagon/engine/base.rb b/lib/vanagon/engine/base.rb index df2939fe..528e3e6b 100644 --- a/lib/vanagon/engine/base.rb +++ b/lib/vanagon/engine/base.rb @@ -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 diff --git a/lib/vanagon/platform.rb b/lib/vanagon/platform.rb index 8c704036..d4ff15e6 100644 --- a/lib/vanagon/platform.rb +++ b/lib/vanagon/platform.rb @@ -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 @@ -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 diff --git a/lib/vanagon/platform/defaults/sles-11-x86_64.rb b/lib/vanagon/platform/defaults/sles-11-x86_64.rb new file mode 100644 index 00000000..f1fefb94 --- /dev/null +++ b/lib/vanagon/platform/defaults/sles-11-x86_64.rb @@ -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