You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After the v1.12.0 release, you can no longer download a tar.gz archive of a tagged version kubernetes-ingress from github and build the ingress controller because the archive does not contain a .git directory.
make debian-image TARGET=container
Docker version 20.10.7, build f0df350
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
docker build --build-arg IC_VERSION=-SNAPSHOT- --build-arg GIT_COMMIT= --build-arg DATE=2021-06-30T18:13:46Z --target container -f build/Dockerfile -t nginx/nginx-ingress:-SNAPSHOT- . --build-arg BUILD_OS=debian
invalid argument "nginx/nginx-ingress:-SNAPSHOT-" for "-t, --tag" flag: invalid reference format
See 'docker build --help'.
make: *** [Makefile:60: debian-image] Error 125
Expected behavior
I would expect the same behavior present in v1.11.3 where the build process warns about .git not being present, but continues without failure. Many open source applications and tools build directly from source extracted from archives. This is so common that it is a community norm to include everything needed in the distributed archive.
When building with the v1.11.3 source, it executes without a problem as follows.
make debian-image TARGET=container
Docker version 20.10.7, build f0df350
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
docker build --build-arg IC_VERSION=1.11.3- --build-arg GIT_COMMIT= --build-arg VERSION=1.11.3 --target container -f build/Dockerfile -t nginx/nginx-ingress:1.11.3 . --build-arg BUILD_OS=debian
[+] Building 2.5s (19/19) FINISHED
=> [internal] load build definition from Dockerfile 0.1s
=> => transferring dockerfile: 38B 0.0s
=> [internal] load .dockerignore 0.1s
=> => transferring context: 34B 0.0s
=> resolve image config for docker.io/docker/dockerfile:1.0-experimental 0.8s
=> CACHED docker-image://docker.io/docker/dockerfile:1.0-experimental@sha256:cbd6491240cc889 0.0s
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 38B 0.0s
=> [internal] load .dockerignore 0.0s
=> [internal] load metadata for docker.io/library/golang:1.16-alpine 0.6s
=> [internal] load metadata for docker.io/library/nginx:1.21.0 0.7s
=> [debian 1/2] FROM docker.io/library/nginx:1.21.0@sha256:47ae43cdfc7064d28800bc42e79a42954 0.0s
=> [internal] helper image for file operations 0.0s
=> [builder 1/3] FROM docker.io/library/golang:1.16-alpine@sha256:45f32e963bb3cc408cfcd01a8e 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 346.81kB 0.3s
=> CACHED [debian 2/2] RUN apt-get update && apt-get install --no-install-recommends --no-i 0.0s
=> CACHED [files 1/2] RUN mkdir -p /var/lib/nginx /etc/nginx/secrets /etc/nginx/stream-conf. 0.0s
=> CACHED [files 2/2] COPY internal/configs/version1/nginx.ingress.tmpl internal/configs/ve 0.0s
=> CACHED [builder 2/3] COPY . /go/src/github.com/nginxinc/kubernetes-ingress/nginx-ingress/ 0.0s
=> CACHED [builder 3/3] RUN CGO_ENABLED=0 GOFLAGS='-mod=vendor' go build -installsuffix cgo 0.0s
=> CACHED [container 1/1] COPY --chown=nginx:0 --from=builder /nginx-ingress / 0.0s
=> exporting to image 0.1s
=> => exporting layers 0.0s
=> => writing image sha256:0df4c5af657593f644c63868be9b13991ba4b1bfe14e240e2d6c1258d79be2c6 0.0s
=> => naming to docker.io/nginx/nginx-ingress:1.11.3
Your environment
Version of the Ingress Controller: v1.12.0 tag
Additional context
If the build process would output a dummy value for the GIT_COMMIT and GIT_TAG variables in the Makefile, it could complete without errors. A PR will follow this issue with a suggested change to allow builds to still work by using dummy values.
The text was updated successfully, but these errors were encountered:
Fixes#1711
When executing make and building from a downloaded source
archive, there is no git history (.git directory) in the
source directory. This change allows the build to continue
despite that directory being missing. It does that by using
dummy values for GIT_COMMIT and GIT_TAG.
Describe the bug
After the v1.12.0 release, you can no longer download a tar.gz archive of a tagged version kubernetes-ingress from github and build the ingress controller because the archive does not contain a
.git
directory.To Reproduce
Steps to reproduce the behavior:
make debian-image TARGET=container
Expected behavior
I would expect the same behavior present in v1.11.3 where the build process warns about
.git
not being present, but continues without failure. Many open source applications and tools build directly from source extracted from archives. This is so common that it is a community norm to include everything needed in the distributed archive.When building with the v1.11.3 source, it executes without a problem as follows.
Your environment
Additional context
If the build process would output a dummy value for the
GIT_COMMIT
andGIT_TAG
variables in the Makefile, it could complete without errors. A PR will follow this issue with a suggested change to allow builds to still work by using dummy values.The text was updated successfully, but these errors were encountered: