Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ImJasonH The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
@imjasonh: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
Is this still WIP? I have #245 that I've been working on concurrently; note that I took a different approach and moved all subsequent build steps into the subdir. I also made the Let me know which way you want to go here -- I'm happy to review this once the "WIP" label is dropped, or you can review #245, which seems to pass in my cluster. |
| if step.WorkingDir == "" { | ||
| step.WorkingDir = "/workspace" | ||
| } | ||
| step.WorkingDir = workdir(srcDir, step.WorkingDir) |
There was a problem hiding this comment.
I don't think Git.Dir works here for e.g. the kaniko builder without also updating the path to the Docker image, which seems like a minus over #245.
| // | ||
| // This must be a relative path. If a step's `workingdir` is specified | ||
| // and is an absolute path, this value is ignored for the step's | ||
| // execution. |
There was a problem hiding this comment.
Do we have a good use case for the absolute vs relative path case?
|
Probably going to go with #245 instead |
Fixes #91
Proposed Changes
DirtoGitSourceSpecand insert this "srcDir" into steps'workingdirs if specified.workingdir, which overrides anysrcDirand the default/workspacedir.git.dirdoes not perform a narrow clone and the entire repo's contents at the specified revision are still fetched. This simply modifies theworkingdirto operate within the specified dir, if the step'sworkingdiris unspecified or relative.This change currently breaks tests because of the lossy conversion when inserting
srcDirbetween/workspaceandstepDir-- it's impossible to know how to convert aBuildinto aPodand back without knowing the borders should be betweensrcDirandstepDir. It's possible we'll decide we don't care about this lossy conversion, since thePodwill execute the same regardless, but in that case we'll need to teach tests how to accept this lossiness.Release Note