Skip to content

Commit f86b9ca

Browse files
committed
chore: remove stale gitlab ssh and gowork config
Signed-off-by: Jingxiang Zhang <jingzhang@nvidia.com>
1 parent 9f0b094 commit f86b9ca

File tree

6 files changed

+5
-63
lines changed

6 files changed

+5
-63
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ on:
99
env:
1010
GO_VERSION: '1.24.13'
1111
GOFLAGS: '-trimpath'
12-
GOPRIVATE: gitlab-master.nvidia.com/*
13-
GONOPROXY: gitlab-master.nvidia.com/*
14-
GONOSUMDB: gitlab-master.nvidia.com/*
15-
GOWORK: off
1612

1713
jobs:
1814
secret-detection:
@@ -67,10 +63,6 @@ jobs:
6763
with:
6864
go-version: ${{ env.GO_VERSION }}
6965

70-
- name: Configure Git for private repositories
71-
run: |
72-
git config --global url."https://git:${{ secrets.GITLAB_TOKEN }}@gitlab-master.nvidia.com/".insteadOf "https://gitlab-master.nvidia.com/"
73-
7466
- name: Download dependencies
7567
run: go mod download
7668

@@ -81,8 +73,6 @@ jobs:
8173
8274
- name: Run golangci-lint
8375
uses: golangci/golangci-lint-action@v8
84-
env:
85-
GOWORK: off
8676
with:
8777
version: latest
8878
args: --timeout=5m
@@ -102,10 +92,6 @@ jobs:
10292
with:
10393
go-version: ${{ env.GO_VERSION }}
10494

105-
- name: Configure Git for private repositories
106-
run: |
107-
git config --global url."https://git:${{ secrets.GITLAB_TOKEN }}@gitlab-master.nvidia.com/".insteadOf "https://gitlab-master.nvidia.com/"
108-
10995
- name: Download dependencies
11096
run: go mod download
11197

@@ -141,10 +127,6 @@ jobs:
141127
with:
142128
go-version: ${{ env.GO_VERSION }}
143129

144-
- name: Configure Git for private repositories
145-
run: |
146-
git config --global url."https://git:${{ secrets.GITLAB_TOKEN }}@gitlab-master.nvidia.com/".insteadOf "https://gitlab-master.nvidia.com/"
147-
148130
- name: Download dependencies
149131
run: go mod download
150132

@@ -192,10 +174,6 @@ jobs:
192174
with:
193175
go-version: ${{ env.GO_VERSION }}
194176

195-
- name: Configure Git for private repositories
196-
run: |
197-
git config --global url."https://git:${{ secrets.GITLAB_TOKEN }}@gitlab-master.nvidia.com/".insteadOf "https://gitlab-master.nvidia.com/"
198-
199177
- name: Download dependencies
200178
run: go mod download
201179

@@ -231,10 +209,6 @@ jobs:
231209
with:
232210
go-version: ${{ env.GO_VERSION }}
233211

234-
- name: Configure Git for private repositories
235-
run: |
236-
git config --global url."https://git:${{ secrets.GITLAB_TOKEN }}@gitlab-master.nvidia.com/".insteadOf "https://gitlab-master.nvidia.com/"
237-
238212
- name: Download dependencies
239213
run: go mod download
240214

.github/workflows/release.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ on:
77

88
env:
99
GO_VERSION: '1.24.13'
10-
GOWORK: off
1110

1211
permissions:
1312
contents: write # Needed for creating GitHub releases
@@ -139,7 +138,6 @@ jobs:
139138
tags: |
140139
${{ steps.agent_image.outputs.tags }}
141140
${{ steps.agent_image_ghcr.outputs.tags }}
142-
ssh: default
143141
build-args: |
144142
VERSION=${{ steps.version.outputs.version }}
145143
REVISION=${{ steps.version.outputs.commit }}

Dockerfile

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,20 @@
1-
# This repo depends on a private module on gitlab-master.nvidia.com (see go.mod replace),
2-
# so you must provide credentials at build time via SSH agent forwarding:
3-
# eval "$(ssh-agent -s)"; ssh-add ~/.ssh/id_ed25519
4-
# DOCKER_BUILDKIT=1 docker build --ssh default -t fleet-intelligence-agent:dev .
51
ARG DCGM_VERSION="4.4.2-1-ubuntu22.04"
62

73
FROM golang:1.24.13 AS build
84

95
RUN apt-get update && apt-get install -y --no-install-recommends \
106
ca-certificates \
117
git \
12-
openssh-client \
138
build-essential \
149
&& rm -rf /var/lib/apt/lists/*
1510

1611
WORKDIR /src
1712

18-
RUN git config --global url."ssh://git@gitlab-master.nvidia.com:12051/".insteadOf "https://gitlab-master.nvidia.com/"
19-
RUN mkdir -p /root/.ssh && ssh-keyscan -p 12051 gitlab-master.nvidia.com >> /root/.ssh/known_hosts
20-
21-
ARG GOPRIVATE=gitlab-master.nvidia.com
22-
ENV GOPRIVATE=${GOPRIVATE}
23-
ENV GONOSUMDB=${GOPRIVATE}
24-
# Ignore local go.work during container builds (no ../gpud in context)
25-
ENV GOWORK=off
26-
2713
COPY go.mod go.sum ./
2814
# Local replace target must exist before go mod download (replace => ./third_party/fleet-intelligence-sdk).
2915
COPY third_party/fleet-intelligence-sdk ./third_party/fleet-intelligence-sdk
3016

31-
# Download modules with ephemeral credentials (not persisted in image layers).
32-
RUN --mount=type=ssh /bin/sh -ceu 'go mod download'
17+
RUN go mod download
3318

3419
COPY . .
3520

Dockerfile.citests

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ RUN go install golang.org/x/vuln/cmd/govulncheck@latest && mv /go/bin/govulnchec
5252

5353
WORKDIR /src
5454

55-
ENV GOWORK=off
5655
ENV CGO_ENABLED=1
5756
ENV GOFLAGS=-trimpath
5857

Makefile

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ DOCKER ?= docker
1010
IMAGE ?= fleet-intelligence-agent:dev
1111
DOCKER_BUILDKIT ?= 1
1212
DOCKER_BUILD_PROGRESS ?= auto
13-
# By default, use ssh-agent forwarding for private module access during `docker build`.
14-
# Set DOCKER_SSH= to disable (e.g. when using --secret/netrc in CI).
15-
DOCKER_SSH ?= default
1613
DOCKER_BUILD_EXTRA_FLAGS ?=
1714

1815
# Root directory of the project (absolute path).
@@ -104,22 +101,20 @@ bin/%: cmd/% FORCE
104101
binaries: $(BINARIES) ## build binaries
105102
@echo "Built binaries: $(BINARIES)"
106103

107-
# Build container image (requires BuildKit for --ssh/--secret mounts used in Dockerfile)
104+
# Build container image (BuildKit enabled by default)
108105
docker-build: ## build container image (IMAGE=fleet-intelligence-agent:dev)
109106
@echo "Building container image: $(IMAGE)"
110107
@DOCKER_BUILDKIT=$(DOCKER_BUILDKIT) $(DOCKER) build \
111-
$(if $(DOCKER_SSH),--ssh $(DOCKER_SSH),) \
112108
--progress=$(DOCKER_BUILD_PROGRESS) \
113109
-t $(IMAGE) \
114110
$(DOCKER_BUILD_EXTRA_FLAGS) \
115111
.
116112

117-
# Build test image and run tests in container (requires SSH for private modules)
113+
# Build test image and run tests in container
118114
TEST_IMAGE ?= fleet-intelligence-agent:test
119115
docker-test: ## build test image and run tests in container
120116
@echo "Building test image: $(TEST_IMAGE)"
121117
@DOCKER_BUILDKIT=$(DOCKER_BUILDKIT) $(DOCKER) build -f Dockerfile.citests \
122-
$(if $(DOCKER_SSH),--ssh $(DOCKER_SSH),) \
123118
-t $(TEST_IMAGE) \
124119
.
125120
@echo "Running tests..."
@@ -132,15 +127,15 @@ fleetint: bin/fleetint ## build fleetint binary
132127
lint: ## run linting tools
133128
@echo "Running linting..."
134129
@if command -v $(GOLANGCI_LINT) >/dev/null 2>&1; then \
135-
GOWORK=off $(GOLANGCI_LINT) run ./...; \
130+
$(GOLANGCI_LINT) run ./...; \
136131
else \
137132
echo "golangci-lint not found, running basic checks..."; \
138133
$(GOFMT) -l -s . | tee /tmp/gofmt.out; \
139134
if [ -s /tmp/gofmt.out ]; then \
140135
echo "Code formatting issues found. Run 'make fmt' to fix."; \
141136
exit 1; \
142137
fi; \
143-
GOWORK=off go vet ./...; \
138+
go vet ./...; \
144139
fi
145140

146141
fmt: ## format Go code

docs/development.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,6 @@ cd fleetint
1515
- **GoReleaser**: For building packages (install from [goreleaser.com](https://goreleaser.com/install/))
1616
- **For ARM64 cross-compilation** (optional): `gcc-aarch64-linux-gnu` and `g++-aarch64-linux-gnu`
1717

18-
### Configure Go Environment
19-
20-
For NVIDIA internal development, configure Go for private repository access:
21-
22-
```bash
23-
go env -w GOPRIVATE=gitlab-master.nvidia.com/*
24-
```
25-
2618
### Build
2719

2820
```bash
@@ -200,4 +192,3 @@ make package-snapshot # Build packages (no git tag required)
200192
## Contributing
201193

202194
See [CONTRIBUTING.md](../CONTRIBUTING.md) for detailed contribution guidelines.
203-

0 commit comments

Comments
 (0)