theforeman / theforeman/puppet-puppet

git post-receive template should use archive, not clone

Open
#367 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
Puppet
Stars
97
Forks
243
Avg merge
8h 17m
Merged PRs (30d)
1

Description

Currently, the post-receive template uses git clone to populate environments. Using git archive would greatly reduce the space used, as it's close to svn export. Using my checkout of this repo:

joseph.yaworski@jyaworski-mbpr ~/github/puppet-puppet (git)-[master] % du -hs .
8.8M    .
joseph.yaworski@jyaworski-mbpr ~/github/puppet-puppet (git)-[master] % git archive --format tar --prefix export/ HEAD | tar -x
joseph.yaworski@jyaworski-mbpr ~/github/puppet-puppet (git)-[master] % du -sh export 
464K    export

Are there concerns using archive rather than clone?

Edit:
To check out a specific branch to a specific dir:

git archive --format tar --prefix branchname/ branchname: | tar -x -C /etc/puppet/environments

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the post-receive template in the repository and reviewing how it currently populates environments with git clone. Compare that behavior with the git archive examples in the issue, including branch and destination handling; done means the template uses the agreed approach and preserves the expected environment contents.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, shell
Domain
devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.