draft-classic icon indicating copy to clipboard operation
draft-classic copied to clipboard

How to get draft to recognize a new pack

Open XanderM1960 opened this issue 7 years ago • 1 comments

Followed the below instructions:

$ cd $(draft home)/packs
$ mkdir python
$ cd python
$ helm create chart
Creating chart
$ echo "FROM python" > Dockerfile

But when I do draft create --pack python it cannot find the pack. I've also played with draft pack-repo add … but it either says "existing repo" or "cannot determine vcs".

How do I get started with my own packs?

XanderM1960 avatar Oct 13 '18 14:10 XanderM1960

For this draft version, Windows 10:

&version.Version{SemVer:"v0.16.0", GitCommit:"5433afea1421810ae9d828631d8651de913b347a", GitTreeState:"dirty"}

The solution is (for best results):

$ cd $(draft home)/packs
$ mkdir foo.com
$ cd foo.com
$ mkdir packs
$ cd packs
$ helm create python
Creating chart
$ cd python
$ move Chart.yaml charts/
$ echo "FROM python" > Dockerfile
  • Packs are ignored unless they are under a directory named packs. So minimally you have to mkdir $(draft home)/packs/packs
  • helm creates Chart.yaml in python\Chart.yaml but draft wants it in python\charts\Chart.yaml. Odd thing that on draft create draft puts it where helm wants it (above charts) as helm would have created it.

XanderM1960 avatar Oct 13 '18 17:10 XanderM1960