(BOLT-1589) Support installing any git-based module#3115
Conversation
e690e74 to
269235d
Compare
|
Not calculating a SHA means the Puppetfile no longer refers to a specific version of the module, correct? In the case where the ref is a branch, that is. |
|
@nicklewis Correct. I can add that back in, just a bit more work to get it working for GitLab & cloned sources. |
f8fd164 to
8b5c9b6
Compare
e3e95cb to
efdd65b
Compare
|
Blocked by glennsarti/puppetfile-resolver#38 |
donoghuc
left a comment
There was a problem hiding this comment.
Thanks for the "in person" walkthrough on this. Looks good, and we have some thoughts for improving this moving forward.
This updates Bolt to support installing git-based modules from any source. Now, Bolt will attempt to download metadata directly from GitHub or GitLab for public repositories and fall back to cloning the git repo's metadata if that fails. This also updates the spec resolver to no longer calculate a SHA based on the ref provided in project configuration. Previously, Bolt would calculate a SHA and write it to the Puppetfile to pin the module to a specific commit when modules are installed. However, doing this is difficult and time-consuming with the move to supporting any git-based module. !feature * **Support installing any git-based module** ([puppetlabs#3109](puppetlabs#3109)) Bolt now supports installing any git-based module. Previously, Bolt only supported installing and resolving dependencies for modules hosted in a public GitHub repository. Now, Bolt will check both GitHub and GitLab before falling back to cloning a module's metadata using the `git` executable. This allows users to install modules from private repositories, or from locations other than GitHub.
This updates documentation for installing git modules to no longer say only public GitHub repositories are supported.
This fixes a bug where the proxy configured in `module-install.proxy` was not being set when retrieving metadata for git-based modules. Previously, the proxy was only configured when resolving and installing modules. !bug * **Configure proxy when retrieving metadata for git-based modules** Bolt now configures a proxy when `module-install.proxy` is set and it retrieves metadata for git-based modules. Previously, Bolt was only configuring a proxy when it resolved and installed modules.
efdd65b to
e1c804d
Compare
donoghuc
left a comment
There was a problem hiding this comment.
Couple of minor suggestions, but overall this looks good!
This updates the `GitSpec` class to resolve the SHA for a git module's ref.
e1c804d to
61fed70
Compare
|
@donoghuc Updated with suggestions. |
donoghuc
left a comment
There was a problem hiding this comment.
Looks great! How do we want to handle bumping the puppetfile resolver dep in the runtime? https://github.com/puppetlabs/puppet-runtime/blob/master/configs/components/rubygem-puppetfile-resolver.rb
I think it may be simplest to bump it in the runtime and then once that promotes merge this.
|
@donoghuc Here's the PR to bump puppetfile-resolver (and other gem components): puppetlabs/puppet-runtime#561 |
This updates Bolt to support installing git-based modules from any
source. Now, Bolt will attempt to download metadata directly from GitHub
or GitLab for public repositories and fall back to cloning the git
repo's metadata if that fails.
This also updates the spec resolver to no longer calculate a SHA based
on the ref provided in project configuration. Previously, Bolt would
calculate a SHA and write it to the Puppetfile to pin the module to a
specific commit when modules are installed. However, doing this is
difficult and time-consuming with the move to supporting any git-based
module.
!feature
Support installing any git-based module
(#3109)
Bolt now supports installing any git-based module. Previously, Bolt
only supported installing and resolving dependencies for modules
hosted in a public GitHub repository. Now, Bolt will check both GitHub
and GitLab before falling back to cloning a module's metadata using
the
gitexecutable. This allows users to install modules fromprivate repositories, or from locations other than GitHub.
This fixes a bug where the proxy configured in
module-install.proxywas not being set when retrieving metadata for git-based modules.
Previously, the proxy was only configured when resolving and
installing modules.
!bug
Configure proxy when retrieving metadata for git-based modules
Bolt now configures a proxy when
module-install.proxyis set and itretrieves metadata for git-based modules. Previously, Bolt was only
configuring a proxy when it resolved and installed modules.