File tree Expand file tree Collapse file tree 5 files changed +83
-0
lines changed Expand file tree Collapse file tree 5 files changed +83
-0
lines changed Original file line number Diff line number Diff line change 50
50
uses : actions/setup-go@v5
51
51
with :
52
52
go-version-file : go.mod
53
+
54
+ - name : Set up Docker Buildx
55
+ uses : docker/setup-buildx-action@v2
56
+
57
+ - name : Login to Registry
58
+ uses : docker/login-action@v2
59
+ with :
60
+ registry : registry.staging.replicated.com
61
+ username : ${{ secrets.REGISTRY_USERNAME_STAGING }}
62
+ password : ${{ secrets.REGISTRY_PASSWORD_STAGING }}
63
+
64
+ - name : Build and push local-artifact-mirror image
65
+ run : |
66
+ export SHORT_SHA=dev-$(git rev-parse --short=7 HEAD)
67
+ export LOCAL_ARTIFACT_MIRROR_IMAGE=registry.staging.replicated.com/library/embedded-cluster-local-artifact-mirror:${SHORT_SHA}
68
+ make local-artifact-mirror-image
69
+ docker push ${LOCAL_ARTIFACT_MIRROR_IMAGE}
70
+
53
71
- name : Build Linux AMD64 and Output Metadata
54
72
run : |
55
73
export SHORT_SHA=dev-$(git rev-parse --short=7 HEAD)
Original file line number Diff line number Diff line change 17
17
uses : actions/setup-go@v5
18
18
with :
19
19
go-version-file : go.mod
20
+
21
+ - name : Set up Docker Buildx
22
+ uses : docker/setup-buildx-action@v2
23
+
24
+ - name : Login to Registry
25
+ uses : docker/login-action@v2
26
+ with :
27
+ registry : registry.staging.replicated.com
28
+ username : ${{ secrets.REGISTRY_USERNAME_STAGING }}
29
+ password : ${{ secrets.REGISTRY_PASSWORD_STAGING }}
30
+
31
+ - name : Build and push local-artifact-mirror image
32
+ run : |
33
+ export SHORT_SHA=dev-$(git rev-parse --short=7 HEAD)
34
+ export LOCAL_ARTIFACT_MIRROR_IMAGE=registry.staging.replicated.com/library/embedded-cluster-local-artifact-mirror:${SHORT_SHA}
35
+ make local-artifact-mirror-image
36
+ docker push ${LOCAL_ARTIFACT_MIRROR_IMAGE}
37
+
20
38
- name : Build Linux AMD64 and Output Metadata
21
39
run : |
22
40
export SHORT_SHA=dev-$(git rev-parse --short=7 HEAD)
Original file line number Diff line number Diff line change 25
25
uses : actions/setup-go@v5
26
26
with :
27
27
go-version-file : go.mod
28
+
29
+ - name : Set up Docker Buildx
30
+ uses : docker/setup-buildx-action@v2
31
+
32
+ - name : Login to Registry
33
+ uses : docker/login-action@v2
34
+ with :
35
+ registry : registry.replicated.com
36
+ username : ${{ secrets.REGISTRY_USERNAME_PRODUCTION }}
37
+ password : ${{ secrets.REGISTRY_PASSWORD_PRODUCTION }}
38
+
39
+ - name : Build and push local-artifact-mirror image (production)
40
+ run : |
41
+ export LOCAL_ARTIFACT_MIRROR_IMAGE=registry.replicated.com/library/embedded-cluster-local-artifact-mirror:${TAG_NAME}
42
+ make local-artifact-mirror-image
43
+ docker push ${LOCAL_ARTIFACT_MIRROR_IMAGE}
44
+
45
+ - name : Login to Registry
46
+ uses : docker/login-action@v2
47
+ with :
48
+ registry : registry.staging.replicated.com
49
+ username : ${{ secrets.REGISTRY_USERNAME_STAGING }}
50
+ password : ${{ secrets.REGISTRY_PASSWORD_STAGING }}
51
+
52
+ - name : Build and push local-artifact-mirror image (staging)
53
+ run : |
54
+ export LOCAL_ARTIFACT_MIRROR_IMAGE=registry.staging.replicated.com/library/embedded-cluster-local-artifact-mirror:${TAG_NAME}
55
+ make local-artifact-mirror-image
56
+ docker push ${LOCAL_ARTIFACT_MIRROR_IMAGE}
57
+
28
58
- name : Build linux-amd64
29
59
run : |
30
60
make embedded-cluster-linux-amd64 VERSION=$TAG_NAME
Original file line number Diff line number Diff line change
1
+ # this dockerfile builds an image containing the local-artifact-mirror binary
2
+ # installed on /usr/local/bin/local-artifact-mirror.
3
+ FROM golang:1.22 AS builder
4
+ WORKDIR /src
5
+ COPY go.mod go.sum ./
6
+ RUN go mod download
7
+ COPY . .
8
+ RUN make pkg/goods/bins/local-artifact-mirror
9
+
10
+ FROM cgr.dev/chainguard/wolfi-base:latest
11
+ COPY --from=builder /src/pkg/goods/bins/local-artifact-mirror /usr/local/bin/local-artifact-mirror
12
+ ENTRYPOINT ["/usr/local/bin/local-artifact-mirror" ]
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ K0S_BINARY_SOURCE_OVERRIDE =
35
35
TROUBLESHOOT_VERSION = v0.92.1
36
36
KOTS_VERSION = v$(shell echo $(ADMIN_CONSOLE_CHART_VERSION ) | sed 's/\([0-9]\+\.[0-9]\+\.[0-9]\+\) .*/\1/')
37
37
KOTS_BINARY_URL_OVERRIDE =
38
+ LOCAL_ARTIFACT_MIRROR_IMAGE ?= ttl.sh/$(shell whoami) /embedded-cluster-local-artifact-mirror:24h
38
39
LD_FLAGS = -X github.com/replicatedhq/embedded-cluster/pkg/defaults.K0sVersion=$(K0S_VERSION ) \
39
40
-X github.com/replicatedhq/embedded-cluster/pkg/defaults.Version=$(VERSION ) \
40
41
-X github.com/replicatedhq/embedded-cluster/pkg/defaults.K0sBinaryURL=$(K0S_BINARY_SOURCE_OVERRIDE ) \
@@ -192,3 +193,7 @@ scan:
192
193
193
194
print-% :
194
195
@echo -n $($* )
196
+
197
+ .PHONY : local-artifact-mirror-image
198
+ local-artifact-mirror-image :
199
+ docker build -t $(LOCAL_ARTIFACT_MIRROR_IMAGE ) -f Dockerfile .
You can’t perform that action at this time.
0 commit comments