Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Install Puppet Content Template from git repository #136

Closed
sanfrancrisko opened this issue Jun 17, 2021 · 2 comments
Closed

Install Puppet Content Template from git repository #136

sanfrancrisko opened this issue Jun 17, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@sanfrancrisko
Copy link

sanfrancrisko commented Jun 17, 2021

This ticket implements a method to download a PCT from the Github repo it is stored at and install it to the template cache path.

  • Requires git to be available on PATH
  • Assumes cloning from HEAD
  • Ensure any required directory structure in place before cloning to disk
  • Ensure that git clones in "clean mode" - i.e. no hidden .git files or metadata
  • Use baker-round for testing

User Experience

  • pct install --git-uri https://github.com/someone/some-template.git
    • Installs the template from the repository to the default template directory
  • pct install --git-uri https://github.com/someone/some-template.git --templatepath ./foo
    • Installs the template from the repository to the foo folder
  • Has to work in CI and interactive

Out of Scope

These features are out of scope for this ticket:

  • Install from private repository / repository requiring authentication
  • Validation of whether the downloaded thing is a fully functional/valid PCT
  • Support for anything but default branches
  • Support for only installing a subset of templates in a repo
@ahmet2mir
Copy link

ahmet2mir commented Jun 28, 2021

Hello,

Maybe consider https://github.com/hashicorp/go-getter ?

And use as

pct new --template-url git::ssh://git@github.com/puppetlabs/baker-round.git -l

from code is simple as

err := getter.Get(dest, templateUrl)

go getter manage probably all kind of source

(or this is not what the issue desribe ^^)

@jpogran jpogran added the enhancement New feature or request label Jul 1, 2021
@jpogran
Copy link
Contributor

jpogran commented Jul 1, 2021

Thanks for the points @ahmet2mir ! That is good to know. Yes, this is the kind of workflow we're aiming for with that, but have not gotten to how the commandline will be implemented yet.

@michaeltlombardi michaeltlombardi changed the title Install from Github repo Install Puppet Content Template from git repository Aug 19, 2021
petergmurphy pushed a commit to petergmurphy/pdkgo that referenced this issue Sep 27, 2021
This flag allows for the installation of templates directly from a public remote repository.
petergmurphy pushed a commit to petergmurphy/pdkgo that referenced this issue Sep 28, 2021
Implemented functions that allow for the cloning of templates from a remote repository using a git URI. 

Modified existing code in the `executeInstall` method so that it checks if the `--git-uri` flag is being used. The appropriate function for template installation will be called based on this check.

`preExecute` function changed to provide the correct template installation path for the `--git-uri` flag.
petergmurphy pushed a commit to petergmurphy/pdkgo that referenced this issue Sep 28, 2021
petergmurphy pushed a commit to petergmurphy/pdkgo that referenced this issue Sep 28, 2021
This flag allows for the installation of templates directly from a public remote repository.
petergmurphy pushed a commit to petergmurphy/pdkgo that referenced this issue Sep 28, 2021
Implemented functions that allow for the cloning of templates from a remote repository using a git URI. 

Modified existing code in the `executeInstall` method so that it checks if the `--git-uri` flag is being used. The appropriate function for template installation will be called based on this check.

`preExecute` function changed to provide the correct template installation path for the `--git-uri` flag.
petergmurphy pushed a commit to petergmurphy/pdkgo that referenced this issue Sep 28, 2021
Implemented functions that allow for the cloning of templates from a remote repository using a git URI. 

Modified existing code in the `executeInstall` method so that it checks if the `--git-uri` flag is being used. The appropriate function for template installation will be called based on this check.

`preExecute` function changed to provide the correct template installation path for the `--git-uri` flag.
petergmurphy pushed a commit to petergmurphy/pdkgo that referenced this issue Oct 7, 2021
Added `--git-uri` flag that takes a string variable as its argument.

Modified existing code in the `executeInstall` method so that it checks if the `--git-uri` flag is being used. The appropriate function for template installation will be called based on this check.

`preExecute` function changed to provide the correct template installation path for the `--git-uri` flag.

Implemented functions that allow for the cloning of templates from a remote repository using a git URI.

Added unit and acceptance tests where relevant.
petergmurphy pushed a commit to petergmurphy/pdkgo that referenced this issue Oct 8, 2021
Added `--git-uri` flag that takes a string variable as its argument.

Modified existing code in the `executeInstall` method so that it checks if the `--git-uri` flag is being used. The appropriate function for template installation will be called based on this check.

`preExecute` function changed to provide the correct template installation path for the `--git-uri` flag.

Implemented functions that allow for the cloning of templates from a remote repository using a git URI.

Added unit and acceptance tests where relevant.
petergmurphy pushed a commit to petergmurphy/pdkgo that referenced this issue Oct 8, 2021
Added `--git-uri` flag that takes a string variable as its argument.

Modified existing code in the `executeInstall` method so that it checks if the `--git-uri` flag is being used. The appropriate function for template installation will be called based on this check.

`preExecute` function changed to provide the correct template installation path for the `--git-uri` flag.

Implemented functions that allow for the cloning of templates from a remote repository using a git URI.

Added unit and acceptance tests where relevant.
petergmurphy pushed a commit that referenced this issue Oct 12, 2021
Added `--git-uri` flag that takes a string variable as its argument.

Modified existing code in the `executeInstall` method so that it checks if the `--git-uri` flag is being used. The appropriate function for template installation will be called based on this check.

`preExecute` function changed to provide the correct template installation path for the `--git-uri` flag.

Implemented functions that allow for the cloning of templates from a remote repository using a git URI.

Added unit and acceptance tests where relevant.

Added appropriate documentation to `CHANGELOG.md` and `README.md`.
petergmurphy pushed a commit that referenced this issue Oct 12, 2021
Added `--git-uri` flag that takes a string variable as its argument.

Modified existing code in the `executeInstall` method so that it checks if the `--git-uri` flag is being used. The appropriate function for template installation will be called based on this check.

`preExecute` function changed to provide the correct template installation path for the `--git-uri` flag.

Implemented functions that allow for the cloning of templates from a remote repository using a git URI.

Added unit and acceptance tests where relevant.

Added appropriate documentation to `CHANGELOG.md` and `README.md`.
petergmurphy pushed a commit that referenced this issue Oct 12, 2021
Added `--git-uri` flag that takes a string variable as its argument.

Modified existing code in the `executeInstall` method so that it checks if the `--git-uri` flag is being used. The appropriate function for template installation will be called based on this check.

`preExecute` function changed to provide the correct template installation path for the `--git-uri` flag.

Implemented functions that allow for the cloning of templates from a remote repository using a git URI.

Added unit and acceptance tests where relevant.

Added appropriate documentation to `CHANGELOG.md` and `README.md`.
petergmurphy pushed a commit that referenced this issue Oct 12, 2021
Added `--git-uri` flag that takes a string variable as its argument.

Modified existing code in the `executeInstall` method so that it checks if the `--git-uri` flag is being used. The appropriate function for template installation will be called based on this check.

`preExecute` function changed to provide the correct template installation path for the `--git-uri` flag.

Implemented functions that allow for the cloning of templates from a remote repository using a git URI.

Added unit and acceptance tests where relevant.

Added appropriate documentation to `CHANGELOG.md` and `README.md`.
petergmurphy pushed a commit that referenced this issue Oct 13, 2021
Added `--git-uri` flag that takes a string variable as its argument.

Modified existing code in the `executeInstall` method so that it checks if the `--git-uri` flag is being used. The appropriate function for template installation will be called based on this check.

`preExecute` function changed to provide the correct template installation path for the `--git-uri` flag.

Implemented functions that allow for the cloning of templates from a remote repository using a git URI.

Added unit and acceptance tests where relevant.

Added appropriate documentation to `CHANGELOG.md` and `README.md`.
sanfrancrisko pushed a commit that referenced this issue Oct 13, 2021
…from_git_repo

(GH-136) Install template from git repo
@da-ar da-ar closed this as completed Oct 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants