Skip to content

Build fails if workspace is a submodule #275

@menehune23

Description

@menehune23

If running pack with a workspace that is a submodule, the build will fail with a message:

Paketo Buildpack for Git 1.0.6
failed to execute 'git rev-parse HEAD': exit status 128
        fatal: not a git repository: /workspace/../../../../.git/modules/vendor/github.com/triggermesh/triggermesh-event-sources-bundle

For instance:

git clone https://gitlab.eng.vmware.com/tanzu-application-platform/runtime-program/eventing.git
cd eventing
git submodule update --init --recursive
pack build debug --path vendor/github.com/triggermesh/triggermesh-event-sources-bundle --builder paketobuildpacks/builder:tiny --env "BP_GO_TARGETS=cmd/awscloudwatchlogssource-adapter"

I think this might be because the .git file inside of a submodule is different in structure than when at the root of a repo.

I've found that if I simply delete the .git file inside of the submodule, the build will pass. However, this is not a feasible workaround for my scenario (I'll spare the details).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions