You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My git repo for module install is called gitlab.com.some.thing and because of that when running bolt module install the url is malformed when gitlab.rb is envoked, producing something like gitlab.com/gitlab.com.example.domain. This is obviously wrong and causes a resolving error.
Expected Behavior
When presented with an url that includes gitlab.com as part of the domain name, I would like gitlab.rb to handle the domain ensuring the produced result remains gitlab.com.example.domain.
Steps to Reproduce
Steps to reproduce the behavior:
Initiate a bolt project
Add a custom module to your bolt-project.yaml file, ensure git: is set to gitlab.com.some.thing/team/project.git (for example).
I have a temporary work-around that bypasses this issue, but I'm statically defining the target gitlab url (in a few places), which is clearly wrong. I'm no coder though so not submitting an MR, just for notes.
In this file /opt/puppetlabs/bolt/lib/ruby/gems/2.7.0/gems/bolt-3.30.0/lib/bolt/module_installer/specs/id/gitlab.rb I changed these lines:
26 private_class_method def self.parse_repo(git)
27 domain = 'gitlab.com.some.thing'
28
29 if git.start_with?("git@#{domain}:")
30 git.split("git@#{domain}:").last.split('.git').first
31 elsif git.start_with?("https://#{domain}")
32 git.split("https://#{domain}/").last.split('.git').first
33 end
34 end
Describe the Bug
My git repo for module install is called
gitlab.com.some.thing
and because of that when runningbolt module install
the url is malformed whengitlab.rb
is envoked, producing something likegitlab.com/gitlab.com.example.domain
. This is obviously wrong and causes a resolving error.Expected Behavior
When presented with an url that includes gitlab.com as part of the domain name, I would like
gitlab.rb
to handle the domain ensuring the produced result remainsgitlab.com.example.domain
.Steps to Reproduce
Steps to reproduce the behavior:
bolt-project.yaml
file, ensuregit:
is set togitlab.com.some.thing/team/project.git
(for example).bolt module install
Environment
Additional Context
I have a temporary work-around that bypasses this issue, but I'm statically defining the target gitlab url (in a few places), which is clearly wrong. I'm no coder though so not submitting an MR, just for notes.
In this file
/opt/puppetlabs/bolt/lib/ruby/gems/2.7.0/gems/bolt-3.30.0/lib/bolt/module_installer/specs/id/gitlab.rb
I changed these lines:The text was updated successfully, but these errors were encountered: