Signed-off-by: Evan Jarrett evan@evanjarrett.com
spindle: move the clone step out of nixery into a shared package for all spindle engines #827
expand 1 commit
hide 1 commit
Signed-off-by: Evan Jarrett <evan@evanjarrett.com>
@oppi.li What package would you want this generic cloneStep in?
I think your solution is better, there was no precedent for a custom models.Step outside of nixery, so I was originally trying to avoid that.
I would still eventually want RepoURL and CommitSHA exposed for my usecase. but I might have to just submit a different PR for system-level env vars.
expand 2 commits
hide 2 commits
Signed-off-by: Evan Jarrett <evan@evanjarrett.com>
Signed-off-by: Evan Jarrett <evan@evanjarrett.com>
expand 2 commits
hide 2 commits
Signed-off-by: Evan Jarrett <evan@evanjarrett.com>
Signed-off-by: Evan Jarrett <evan@evanjarrett.com>
Not entirely sure why this says there are merge conflicts when i rebased master This is an attempt to go off of your design with returning a whole step struct. I think it turns out essentially the same code... so maybe i'm missing something obvious.
that is a bit strange, i don't see anything off with the logs on the knotserver itself. that aside, some comments on the code itself:
- don't think we need to
cd workspaceDir, we already have this upon contrainer creation (the WorkingDir is set):
resp, err := e.docker.ContainerCreate(ctx, &container.Config{
Image: addl.image,
Cmd: []string{"cat"},
OpenStdin: true, // so cat stays alive :3
Tty: false,
Hostname: "spindle",
WorkingDir: workspaceDir,
- the rest of the clone code itself looks good to me!
- could you squash the two commits into one? the commit message could be
spindle: introduce common clone stepor similar
expand 1 commit
hide 1 commit
Signed-off-by: Evan Jarrett <evan@evanjarrett.com>
Gave it a once-over; looks good! And thanks for the tests.
thanks for the contribution! couple of nits:
workflowpackage that also definesCloneOpts(to unmarshal the workflow yaml file however), it is a bit confusing to introduce anotherworkflowpackage insidespindlewith a similar structCloneOptions(it also shares some of the same fields)CloneStepmethod that is calculated fromtangled.Pipeline_Workflowand returns a struct that follows themodels.Stepinterface