From eb19c755a7ffc800ac6b28354ad80776e187c2dd Mon Sep 17 00:00:00 2001 From: Evan Ahlberg Date: Tue, 7 Feb 2023 12:51:56 -0500 Subject: add esoteric platforms to validate adhoc/release pipelines (#13546) * run pre-command on all verify pipelines * update pre-command to pull aws credentials on both chef and chef canary * update pre-command pipeline names * add esoteric builds * add build_timestamp environment variable * update sha on omnibus plugin * skip transitive depenceny licensing for chef-foundation * use chef-foundation * remove notarize * add solaris tests * add aix tests * add all esoteric platforms * Adding in changes to run publish of omnibus packages to Artifactory, as well as related gems for Linux/Windows * set lib path in chef omnibus * move lib dirs to software * Adding in if statement around artifactory api key, as its not needed for macOS (only Artifactory password needed) * Log every macho? * Fixing regex check * Extend the bin dirs and lib dirs. * remove mac osx 10 * Remove lib dirs. * Update the version of omnibus-buildkite-plugin. * Fixing unbound variable error on filter; Fixing notarize macOS so it doesn't run when macOS is filtered out of build * Adding in changes to retry/timeout on esoteric builds; Adding in dependency check on macOS Notarize * add build record step on validate/release pipeline * fix comparison for pipeline slug * Adding in code to promote the packages when runnong validate/release * remove comments and fix omnibus branch * Fixing potential issue with BUILDKITE_BUILD_CREATOR_TEAMS being unset * get role attached to ec2 server instead of hardcoding * Update omnibus bundle with license_scout * Dynamically determine the version of ruby. * replace . with _ in notraize step * Move lib_dirs logic to chef-foundation * remove skip_transitive_depenency_licensing and add comments to build/test arrays * increase timeout on esoteric to 120 mins * fix mac osx depends on and update pipeline name to regex * align omnibus plugin version to 0.2.83 * add check for centos6 in omnibus-test.sh * add comments for empty array check --------- Signed-off-by: Evan Ahlberg Signed-off-by: Jesse Prieur Signed-off-by: Gregory Schofield Co-authored-by: Jesse Prieur Co-authored-by: Gregory Schofield --- omnibus/config/projects/chef.rb | 26 +------------------------- omnibus/config/software/chef-local-source.rb | 12 ++++++++++++ omnibus/omnibus-test.sh | 15 +++++++++++++-- 3 files changed, 26 insertions(+), 27 deletions(-) (limited to 'omnibus') diff --git a/omnibus/config/projects/chef.rb b/omnibus/config/projects/chef.rb index 10f7f25b15..27e420e92a 100644 --- a/omnibus/config/projects/chef.rb +++ b/omnibus/config/projects/chef.rb @@ -41,34 +41,10 @@ end override :chef, version: "local_source" -# Load dynamically updated overrides -overrides_path = File.expand_path("../../../../omnibus_overrides.rb", current_file) -instance_eval(IO.read(overrides_path), overrides_path) - -dependency "preparation" -# dependency "chef-local-source" - -dependency "chef" - -# -# addons which require omnibus software defns (not direct deps of chef itself - RFC-063) -# -dependency "nokogiri" # (nokogiri cannot go in the Gemfile, see wall of text in the software defn) - -# FIXME?: might make sense to move dependencies below into the omnibus-software chef -# definition or into a chef-complete definition added to omnibus-software. -dependency "gem-permissions" +dependency "chef-local-source" dependency "shebang-cleanup" -dependency "version-manifest" -dependency "openssl-customization" - -# devkit needs to come dead last these days so we do not use it to compile any gems -dependency "ruby-msys2-devkit" if windows? - -dependency "ruby-cleanup" # further gem cleanup other projects might not yet want to use - dependency "more-ruby-cleanup" package :rpm do diff --git a/omnibus/config/software/chef-local-source.rb b/omnibus/config/software/chef-local-source.rb index 528354422d..49a2bfda59 100644 --- a/omnibus/config/software/chef-local-source.rb +++ b/omnibus/config/software/chef-local-source.rb @@ -25,6 +25,8 @@ license_file "LICENSE" # So that Open4/deep_merge/diff-lcs disclaimers are present in Omnibus LICENSES tree. license_file "NOTICE" +skip_transitive_dependency_licensing false + # For the specific super-special version "local_source", build the source from # the local git checkout. This is what you'd want to occur by default if you # just ran omnibus build locally. @@ -47,6 +49,16 @@ if version != "local_source" source git: "https://github.com/chef/chef.git" end +# In order to pass notarization we need to sign any binaries and libraries included in the package. +# This makes sure we include and bins and libs that are brought in by gems. +ruby_version = "3.1.2" +ruby_version = ruby_version.split(".")[0..1].join(".") +ruby_mmv = "#{ruby_version}.0" +ruby_dir = "#{install_dir}/embedded/lib/ruby/#{ruby_mmv}" +gem_dir = "#{install_dir}/embedded/lib/ruby/gems/#{ruby_mmv}" +bin_dirs bin_dirs.concat ["#{gem_dir}/gems/*/bin/**"] +lib_dirs ["#{ruby_dir}/**", "#{gem_dir}/extensions/**", "#{gem_dir}/bundler/gems/extensions/**", "#{gem_dir}/bundler/gems/*", "#{gem_dir}/bundler/gems/*/lib/**", "#{gem_dir}/gems/*", "#{gem_dir}/gems/*/lib/**", "#{gem_dir}/gems/*/ext/**"] + dependency "chef-foundation" relative_path "chef" diff --git a/omnibus/omnibus-test.sh b/omnibus/omnibus-test.sh index 9bdaa7cdc5..83c64ff2a6 100755 --- a/omnibus/omnibus-test.sh +++ b/omnibus/omnibus-test.sh @@ -120,5 +120,16 @@ export CHEF_LICENSE=accept-no-persist cd "$chef_gem" -sudo -E bundle install --jobs=3 --retry=3 -sudo -E bundle exec rspec --profile -f progress \ No newline at end of file +# only add -E if not on centos 6 +sudo_path="$(command -v sudo)" +# cspell:disable-next-line +rhel_sudo="/opt/rh/devtoolset-7/root/usr/bin/sudo" +sudo_args="" +if [[ "$sudo_path" != "$rhel_sudo" ]]; then + echo "HERE" + sudo -E bundle install --jobs=3 --retry=3 + sudo -E bundle exec rspec --profile -f progress +else + sudo bundle install --jobs=3 --retry=3 + sudo bundle exec rspec --profile -f progress +fi -- cgit v1.2.1