Details
-
New Feature
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
Description
Customer runs into a problem where they're using the private API of an older version of r10k in their Puppetfile like this:
We use the puppet_environment variable to set the default branch. For example:
|
|
puppet_environment = File.basename(@librarian.basedir)
|
default_branch = case puppet_environment
|
when/^feature_/
|
'development'
|
else
|
puppet_environment.split('_').first
|
end
|
|
Then for our repos we use the default_branch parameter
|
:default_branch => default_branch
|
It's been suggested that we add an environment or environment_name to get this functionality back ("So it looks like they want the "basedir" so they can get the name of the current environment so they can have a particular default_branch when doing feature branches. I think it would be a valid workflow (feature branch specifics are hard because you want them one way in the PR, but different when they're merged). I'd be happy to add an environment or environment_name getter to the DSL if other's are okay with it." - Justin Stoller)
Outcomes
- Add back the basedir getter
- Add a deprecation warning for using basedir
- Add an environment getter
- Open a ticket for removing basedir in 4.0.0
- Update docs in the r10k repo
Attachments
Issue Links
- relates to
-
RK-383 Remove deprecated Puppetfile basedir method
-
- Resolved
-