(maint) Add docker specifics to git testing #81
Merged
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.
Unfortunately there isn't a ticket for this work.
However, there are two things that are happening as a part of this
commit.
First, we don't want to try to download or unpack the runtime tarball.
If we're using docker to run the tests, the user should be pulling an
image that already has all the stuff that runtime provides. Hopefully
they're using a relatively new image that corresponds to whatever branch
they're working on. This is a big assumption, but it allows us to remove
the requirement that this be run on infrastructure that is only internal
to puppet.
Next, we allow dependencies to be installed from a directory that has
been bind mounted into the docker container. This will let us run tests
against a code base that we can be modifying as we go. We don't have to
figure out how to sync any changes up to the server that tests are
running on. They're just there! There are also some pretty big
assumptions with this, but again, it's worth the risk IMO.
I detailed some of this in comments in the code, but I'll add it here
too.
The hosts file should look something like this:
This means that the hosts file that beaker-hostgenerator currently
creates for you is insufficient. You can still generate one using
beaker-hostgenerator, but you will likely want to go in and update it.
bundle exec beaker-hostgenerator -tdocker debian8-64m-debian8-64a > hosts.yaml