Skip to content

Commit 6a6b6a7

Browse files
committed
f
1 parent 046bc9d commit 6a6b6a7

File tree

9 files changed

+25
-10
lines changed

9 files changed

+25
-10
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,8 +290,8 @@ jobs:
290290
uses: actions/cache@v4
291291
with:
292292
path: |
293-
./dev/.gocache
294-
./dev/.gomodcache
293+
./dev/build/.gocache
294+
./dev/build/.gomodcache
295295
key: dryrun-tests-go-cache-${{ hashFiles('**/go.sum') }}
296296
restore-keys: |
297297
dryrun-tests-go-cache-

dagger.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
"include": [
88
"!build",
99
"!cmd/installer/goods/bins/**",
10+
"cmd/installer/goods/bins/.placeholder",
1011
"!cmd/installer/goods/internal/bins/**",
12+
"cmd/installer/goods/internal/bins/.placeholder",
1113
"!dagger/embedded-cluster",
1214
"!dev/build",
1315
"!local-artifact-mirror/bin",

dagger/cmx.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ func (i *CmxInstance) CommandWithEnv(
339339
"-i", "/root/.ssh/id_rsa",
340340
"-o", "StrictHostKeyChecking=no",
341341
"-o", "BatchMode=yes",
342+
"-o", "ServerAliveInterval=60",
343+
"-o", "ServerAliveCountMax=10",
342344
"-p", fmt.Sprintf("%d", i.SSHPort),
343345
fmt.Sprintf("%s@%s", i.SSHUser, i.SSHEndpoint),
344346
remoteCmd,
@@ -382,6 +384,8 @@ func (i *CmxInstance) UploadFile(
382384
"-i", "/root/.ssh/id_rsa",
383385
"-o", "StrictHostKeyChecking=no",
384386
"-o", "BatchMode=yes",
387+
"-o", "ServerAliveInterval=60",
388+
"-o", "ServerAliveCountMax=10",
385389
"-P", fmt.Sprintf("%d", i.SSHPort),
386390
tempPath,
387391
fmt.Sprintf("%s@%s:%s", i.SSHUser, i.SSHEndpoint, tmpDest),
@@ -677,6 +681,8 @@ func (i *CmxInstance) DownloadFile(
677681
"-i", "/root/.ssh/id_rsa",
678682
"-o", "StrictHostKeyChecking=no",
679683
"-o", "BatchMode=yes",
684+
"-o", "ServerAliveInterval=60",
685+
"-o", "ServerAliveCountMax=10",
680686
"-P", fmt.Sprintf("%d", i.SSHPort),
681687
fmt.Sprintf("%s@%s:%s", i.SSHUser, i.SSHEndpoint, remotePath),
682688
localPath,

dagger/operator.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,12 @@ func (m *EmbeddedCluster) BuildOperatorPackage(
111111
melangeFile := m.melangeTemplateOperator(src, ecVersion, kzerosMinorVersion)
112112

113113
dir := dag.Directory().
114-
WithDirectory("operator", src.Directory("operator"))
114+
WithDirectory("operator",
115+
src.Directory("operator").
116+
WithoutDirectory("bin").
117+
WithoutDirectory("build").
118+
WithoutDirectory("cache"),
119+
)
115120

116121
build := m.chainguard.melangeBuildGo(
117122
directoryWithCommonGoFiles(dir, src),

dev/patches/operator-up.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ spec:
1616
mountPath: /replicatedhq/embedded-cluster # parent of workdir in the container
1717
env:
1818
- name: GOCACHE
19-
value: /replicatedhq/embedded-cluster/dev/.gocache # from dev volume mount
19+
value: /replicatedhq/embedded-cluster/dev/build/.gocache # from dev volume mount
2020
- name: GOMODCACHE
21-
value: /replicatedhq/embedded-cluster/dev/.gomodcache # from dev volume mount
21+
value: /replicatedhq/embedded-cluster/dev/build/.gomodcache # from dev volume mount
2222
livenessProbe: ~
2323
readinessProbe: ~
2424
resources: ~

dev/scripts/up.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if [ -z "$component" ]; then
1313
fi
1414

1515
# Ensure dev go cache / go mod cache directories exists
16-
mkdir -p dev/.gocache dev/.gomodcache
16+
mkdir -p dev/build/.gocache dev/build/.gomodcache
1717

1818
# Build and load the image into the embedded cluster
1919
ec_build_and_load "$component"

local-artifact-mirror/deploy/melange.tmpl.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ environment:
1717
- git
1818
- go
1919
environment:
20-
GOMODCACHE: /var/cache/melange
20+
GOCACHE: /cache/melange/gocache
21+
GOMODCACHE: /cache/melange/gomodcache
2122
K0S_MINOR_VERSION: ${K0S_MINOR_VERSION}
2223

2324
pipeline:

operator/deploy/melange.tmpl.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ environment:
1717
- git
1818
- go
1919
environment:
20-
GOMODCACHE: /var/cache/melange
20+
GOCACHE: /cache/melange/gocache
21+
GOMODCACHE: /cache/melange/gomodcache
2122
VERSION: ${PACKAGE_VERSION}
2223
K0S_MINOR_VERSION: ${K0S_MINOR_VERSION}
2324

scripts/dryrun-tests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ plog "INFO" "Compiling test binary..." "🔨"
2020
docker run --rm \
2121
-v "$(pwd)":/ec \
2222
-w /ec \
23-
-e GOCACHE=/ec/dev/.gocache \
24-
-e GOMODCACHE=/ec/dev/.gomodcache \
23+
-e GOCACHE=/ec/dev/build/.gocache \
24+
-e GOMODCACHE=/ec/dev/build/.gomodcache \
2525
ec-dryrun \
2626
go test -c -o /ec/dev/build/dryrun.test ./tests/dryrun/...
2727

0 commit comments

Comments
 (0)