diff options
author | Matt Wrock <matt@mattwrock.com> | 2016-06-01 12:39:47 -0700 |
---|---|---|
committer | Matt Wrock <matt@mattwrock.com> | 2016-06-01 12:39:47 -0700 |
commit | 8a972515a1df569aaf044f7db73b5d4bd86d4e9d (patch) | |
tree | 080a09d7e2bcafebd9f1b55509ead83abb52d981 | |
parent | fe86dd1a371ec3aaaa9b2aff9910602070d5eeac (diff) | |
download | chef-install_bundler.tar.gz |
adding ci tasks that will install the correct versioni of bundlerinstall_bundler
-rw-r--r-- | Rakefile | 1 | ||||
-rw-r--r-- | tasks/bundle.rb | 10 | ||||
-rw-r--r-- | tasks/ci.rb | 41 |
3 files changed, 52 insertions, 0 deletions
@@ -28,6 +28,7 @@ require_relative "tasks/maintainers" require_relative "tasks/cbgb" require_relative "tasks/dependencies" require_relative "tasks/changelog" +require_relative "tasks/ci" ChefConfig::PackageTask.new(File.expand_path("..", __FILE__), "Chef") do |package| package.component_paths = ["chef-config"] diff --git a/tasks/bundle.rb b/tasks/bundle.rb index 059b926f14..8e48bedbfc 100644 --- a/tasks/bundle.rb +++ b/tasks/bundle.rb @@ -76,6 +76,16 @@ namespace :bundle do end end end + + desc "Installs the version of bundler specified in omnibus_overrides.rb" + task :install_bundler do + extend BundleUtil + puts "" + puts "-------------------------------------------------------------------" + puts "Installing bundler version #{desired_bundler_version} if not present ..." + puts "-------------------------------------------------------------------" + Gem.install("bundler", desired_bundler_version) + end end desc "Run bundle with arbitrary args against the given platform; e.g. rake bundle[show]. No platform to run against the main bundle; bundle[show,windows] to run the windows one; bundle[show,*] to run against all non-default platforms." diff --git a/tasks/ci.rb b/tasks/ci.rb new file mode 100644 index 0000000000..11d3330ea3 --- /dev/null +++ b/tasks/ci.rb @@ -0,0 +1,41 @@ +# +# Copyright:: Copyright (c) 2016 Chef Software Inc. +# License:: Apache License, Version 2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require "chef-config/package_task" +require_relative "bundle" +require_relative "version" +require_relative "dependencies" + +desc "Tasks intended to be called by ci automation" +namespace :ci do + desc "Calls Bump and includes an install of the version of bundler specified in omnibus_overrides" + task :version_bump => %w{version:bump_patch version:update bundle:install_bundler bundle:install} + + desc "Show the current version." + task :version_show => %w{version:show} + + desc "Update all dependencies and includes an update to bundler." + task :dependencies => %w{ + dependencies:update_stable_channel_gems + dependencies:update_gemfile_lock + dependencies:update_omnibus_overrides + bundle:install_bundler + dependencies:update_omnibus_gemfile_lock + dependencies:update_acceptance_gemfile_lock + bundle:outdated + } +end |