Skip to content

dockerfile: git version check fails in ci #2206

@tonistiigi

Description

@tonistiigi

Something wrong with version detection in Dockerfile. Error is ignored atm.

#14 [version 1/1] RUN --mount=target=.   PKG=github.com/moby/buildkit/frontend/dockerfile/cmd/dockerfile-frontend VERSION=$(./frontend/dockerfile/cmd/dockerfile-frontend/hack/detect "$CHANNEL") REVISION=$(git rev-parse HEAD)$(if ! git diff --no-ext-diff --quiet --exit-code; then echo .m; fi);   echo "-X main.Version=${VERSION} -X main.Revision=${REVISION} -X main.Package=${PKG}" | tee /tmp/.ldflags;   echo -n "${VERSION}" | tee /tmp/.version;
#14 sha256:4351bbde3860bdb9ce4a2c4a2288baca78bff9f373c3e076085f6ebf451387e7
#14 0.069 env: can't execute 'bash': No such file or directory
#14 0.071 /bin/sh: git: not found
#14 0.071 /bin/sh: git: not found
#14 0.074 -X main.Version= -X main.Revision=.m -X main.Package=github.com/moby/buildkit/frontend/dockerfile/cmd/dockerfile-frontend
#14 DONE 0.1s

https://github.com/moby/buildkit/runs/2930628022?check_suite_focus=true#step:7:787

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