This repository has been archived by the owner on Jul 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 170
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 28, 2016 18:29
a341e33
to
4d47c01
Compare
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 28, 2016 18:31
4d47c01
to
8dd84e3
Compare
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 28, 2016 18:32
8dd84e3
to
ca43b2f
Compare
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 28, 2016 19:26
ca43b2f
to
52bbd3b
Compare
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 28, 2016 19:36
52bbd3b
to
f5704c1
Compare
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 28, 2016 19:49
f5704c1
to
b4ce98d
Compare
# coding: utf-8 | ||
lib = File.expand_path('../lib', __FILE__) | ||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) | ||
require 'chef-dk-gemset/version' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make this just chef-dk/version and nuke the whole lib structure under here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's all gone :)
Perhaps we don't need the gemset gem and can just include the dependencies right in chef-dk. That feels more straight forward to me. |
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 28, 2016 22:57
b4ce98d
to
a771711
Compare
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 28, 2016 23:05
a771711
to
4c04284
Compare
@mwrock done! Made it a lot simpler, thanks :) |
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 28, 2016 23:31
4c04284
to
2ff6e86
Compare
👍 after appbundler merge and removing temporary branch |
|
||
To build the chef-dk, we use the omnibus system. Go to the [omnibus README](omnibus/README.md) to find out how to build! | ||
|
||
To update the chef-dk's dependencies, run `rake depenedencies`. This will update the `Gemfile.lock` and `Gemfile.windows.lock` and show you any outdated dependencies (some outdated dependencies are to be expected; just scan them for anything that looks particularly bad). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typeo: depenedencies
👍 |
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 29, 2016 01:47
2ff6e86
to
56e8243
Compare
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 29, 2016 01:58
56e8243
to
6544fcc
Compare
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
March 29, 2016 19:15
6544fcc
to
a1035b4
Compare
1. Delete lockfiles before running bundle update 2. Use Bundler.with_clean_env to avoid loading the wrong bundler when running bundle commands
- Move version constants to the top at `version_policy.rb` - Add newlines between sections of build to make it easier to read - Rename `rake dependencies:update_conservative` to `dependencies:update[conservative]` Include version_policy.rb in gem
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
April 7, 2016 22:43
c897e04
to
8a11ee6
Compare
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
April 7, 2016 23:52
8a11ee6
to
4221da0
Compare
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
April 8, 2016 03:07
74d1456
to
8dc5d1c
Compare
jkeiser
force-pushed
the
jk/chef-dk-gemset
branch
from
April 8, 2016 03:54
65f4411
to
975b665
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements several things:
Gemfile
andGemfile.lock
at the top of the repository.rake dependencies
allows you to update that lock file safely.Gemfile.lock
as well asGemfile.windows.lock
.Gemfile.windows.lock
includes the versions of gems inGemfile.lock
via a bit of code inGemfile
that reads inGemfile.lock
and adds explicit pins if you are doing a bundle lock for windows.bin/bundle-platform
to setGem.platforms
before solving, allowing us to compute an OS-agnostic lock inGemfile.lock
and a Windows-specific one inGemfile.windows.lock
.acceptance/Gemfile.lock
andomnibus/Gemfile.lock
as well to pin test and build tooling.bundle outdated
at the end and yells loudly if any gems are not at their latest version. Exceptions can be made for this via theALLOWED_OUTDATED_GEMS
constant intasks/bundle_util.rb
. This is what protects us from, for example, downgradingchef
because the solver noticed a conflict with a constraint fromtest-kitchen
.config/software/chef-dk-gem-<gemname>.rb
. This allows long-running gem installs to be cached and speed up the build overall. For example,chef-dk-gem-dep-selector-libgecode
will:dep-selector-libgecode
in the top-levelGemfile.lock
gem install dep-selector-libgecode -v <version> --ignore-dependencies
with proper build setup (--ignore-dependencies
is to ensure we only get versions that are in our lockfile and not just whatever dep-selector-libgecode wants).config/files/chef-dk-gem/build-chef-dk-gem/gem-install-software-def.rb
is what implements the above things.config/software/chef-dk.rb
. There are many gems installed in this step, and they are installed withbundle install --without development no_<os> --jobs=4 --retries=4 --frozen
.git
orpath
(i.e.gem 'chef', github: 'chef/chef'
) and runsrake install
from each one to genuinely install the gem. Then removes thegit
-installed gems.bundle lock
s theGemfile
s in theberkshelf
,test-kitchen
,chef
andchef-dk
gems.config/files/chef-dk/build-chef-dk.rb
.bundle check
withwithout development test changelog maintenance guard
to ensure that any runtime dependencies in the bundle are in the chef-dk and weren't missed by the fact that we're no longerbundle install
ing theirGemfile
.chef verify
is later run from these directories, they do abundle install
which installs any dev dependencies required for the tests onto the test instance./opt/chef-dk/Gemfile.lock
contains a lockfile that serves as a full manifest for installed gems.Smaller things about this patch:
ruby-shadow
as a gem dependency group inGemfile
--it is in theno_aix
andno_windows
groups.chef
software definition inline (there weren't many--powershell and such).