pack icon indicating copy to clipboard operation
pack copied to clipboard

Provide `buildpack create` command

Open AidanDelaney opened this issue 2 years ago • 7 comments

Implement RFC 212 to provide a more general mechanism to provide project scaffolding for new buildpacks.

Summary

Uses https://github.com/AidanDelaney/scafall to implement RFC 212.

Defaults to bash subpath of https://github.com/AidanDelaney/cnb-buildpack-templates to provide the default template.

Open Questions

  1. Do we want to move scafall to the buildpacks org?
  2. Do we want to move cnb-buildpack-templates to the buildpacks org (and maybe rename to cnb-templates)?

Documentation

  • Should this change be documented?
    • [x] Yes, see #___
    • [ ] No

Related

Resolves #___

AidanDelaney avatar Oct 24 '22 09:10 AidanDelaney

Depends on https://github.com/buildpacks/scafall/pull/2 will undraft when that (and some subsequent changes) land.

AidanDelaney avatar Nov 28 '22 06:11 AidanDelaney

This draft can be driven using

go run cmd/pack/main.go buildpack create -t [email protected]:AidanDelaney/cnb-templates.git

We don't yet have a https://github.com/buildpacks/templates repo that contains a template (awaiting https://github.com/buildpacks/templates/pull/1). A bare mkdir foo && cd foo && go run ../cmd/pack/main.go buildpack create correctly populates the directory with a LICENCE file that is contained in https://github.com/buildpacks/templates.

AidanDelaney avatar Mar 01 '23 07:03 AidanDelaney

@AidanDelaney what's the status of this one?

natalieparellano avatar Aug 18 '23 16:08 natalieparellano

@AidanDelaney I think we are good with this one, right? the dependencies:

  • https://github.com/buildpacks-community/scafall/pull/2
  • https://github.com/buildpacks/templates/pull/1 were already merged

Can you rebase to the latest? there is a problem with the Windows Acceptance Test (LCOW) but I am trying to solve that

jjbustamante avatar Dec 13 '23 15:12 jjbustamante

Codecov Report

Attention: Patch coverage is 50.00000% with 34 lines in your changes are missing coverage. Please review.

Project coverage is 79.53%. Comparing base (2df4445) to head (c61741a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1534      +/-   ##
==========================================
+ Coverage   78.96%   79.53%   +0.57%     
==========================================
  Files         176      178       +2     
  Lines       13246    13314      +68     
==========================================
+ Hits        10459    10588     +129     
+ Misses       2119     2053      -66     
- Partials      668      673       +5     
Flag Coverage Δ
os_linux 78.46% <50.00%> (-0.14%) :arrow_down:
os_macos 76.18% <50.00%> (-0.11%) :arrow_down:
os_windows 78.92% <50.00%> (+0.62%) :arrow_up:
unit 79.53% <50.00%> (+0.57%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Feb 08 '24 21:02 codecov[bot]