-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
rhel-9.4
-
None
-
None
-
Low
-
2
-
rhel-sst-pt-llvm-rust-go
-
ssg_platform_tools
-
0
-
Dev ack
-
False
-
-
None
-
SST LLVM/Rust/Go Sprint 12, SST LLVM/Rust/Go Sprint 13
-
None
-
None
-
None
What were you trying to do that didn't work?
When building a go application within the go-toolset-container, the build fails if the go source code has the `.git` directory present.
Please provide the package NVR for which bug is seen:
go-toolset-1.20.12-4.el9_3.x86_64
How reproducible:
Always if `.git` repository is present
Steps to reproduce
- Clone an example git repository - `git clone https://github.com/sclorg/golang-ex`
- Create a Containerfile to build the application using the entire source tree:
FROM registry.redhat.io/ubi9/go-toolset:1.20.12 AS builder COPY . . RUN go build -o /tmp/hello FROM registry.redhat.io/ubi9/ubi-minimal:9.4 WORKDIR /app COPY --from=builder /tmp/hello . CMD ["./hello"]
- Build the container using Podman build:
podman build -t localhost/sclorg/hello-openshift:latest .
Expected results
Build succeeds
Actual results
Build fails with the following:
[1/2] STEP 1/3: FROM registry.redhat.io/ubi9/go-toolset:1.20.12 AS builder [1/2] STEP 2/3: COPY . . --> 76206d3c3e1d [1/2] STEP 3/3: RUN go build -o /tmp/hello error obtaining VCS status: exit status 128 Use -buildvcs=false to disable VCS stamping. Error: building at STEP "RUN go build -o /tmp/hello": while running runtime: exit status 1
Additional Notes
With the VCS Stamping feature, go developers may explicitly want `-buildvcs=auto` to work in all circumstances, so that git version information is automatically present in binary.
- is related to
-
WINC-1290 Fix v7 and v8 WMCO pipelines
- Closed
- links to