Skip to content

Can't get .git directory to show up in remote builds #236

@abevoelker

Description

@abevoelker

I'm submitting a remote build with gcloud container builds submit --config cloudbuild.yaml and no matter what I try, the .git directory is not showing up in the temporary tarballs. My Dockerfile needs to access the .git directory for the build and obviously it can't find it and all my remote builds fail (local builds work fine).

There is no .dockerignore, no .gitignore, no .gcloudignore, and no "Some files were not included in the source upload." message like I get in other projects where I use those ignore files.

If I create a different hidden directory:

mkdir .foo
touch .foo/bar

that directory does show up in the tarball, so I know it's not excluding all hidden directories.

Is there some hardcoding specifically to exclude .git when creating the tarball?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions