Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,16 @@ jobs:
go-version-file: go.mod
cache-dependency-path: "**/*.sum"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker build cache
uses: actions/cache@v4
with:
path: |
./dev/.dockerbuildcache
key: docker-build-cache

- uses: oras-project/setup-oras@v1

- uses: imjasonh/[email protected]
Expand All @@ -193,7 +203,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_SECRET }}
AWS_REGION: "us-east-1"
USE_CHAINGUARD: "1"
USE_CHAINGUARD: "0"
UPLOAD_BINARIES: "1"
SKIP_RELEASE: "1"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -248,6 +258,16 @@ jobs:
go-version-file: go.mod
cache-dependency-path: "**/*.sum"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker build cache
uses: actions/cache@v4
with:
path: |
./dev/.dockerbuildcache
key: docker-build-cache

- uses: oras-project/setup-oras@v1

- uses: imjasonh/[email protected]
Expand All @@ -267,7 +287,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_SECRET }}
AWS_REGION: "us-east-1"
USE_CHAINGUARD: "1"
USE_CHAINGUARD: "0"
UPLOAD_BINARIES: "1"
SKIP_RELEASE: "1"
MANGLE_METADATA: "1"
Expand Down Expand Up @@ -357,6 +377,16 @@ jobs:
go-version-file: go.mod
cache-dependency-path: "**/*.sum"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker build cache
uses: actions/cache@v4
with:
path: |
./dev/.dockerbuildcache
key: docker-build-cache

- uses: oras-project/setup-oras@v1

- uses: imjasonh/[email protected]
Expand All @@ -376,7 +406,7 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.STAGING_EMBEDDED_CLUSTER_UPLOAD_IAM_SECRET }}
AWS_REGION: "us-east-1"
USE_CHAINGUARD: "1"
USE_CHAINGUARD: "0"
UPLOAD_BINARIES: "1"
SKIP_RELEASE: "1"
MANGLE_METADATA: "1"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ go.work
go.work.sum
.gocache
.gomodcache
.dockerbuildcache
/dev/build/
/local-dev/
*.tmp
Expand Down
3 changes: 3 additions & 0 deletions dev/dockerfiles/local-artifact-mirror/Dockerfile.ttlsh
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ RUN cp local-artifact-mirror/bin/local-artifact-mirror-$(go env GOOS)-$(go env G

FROM debian:bookworm-slim

RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/*

COPY --from=build /app/local-artifact-mirror/bin/local-artifact-mirror /usr/bin/local-artifact-mirror
RUN ln -s /usr/bin/local-artifact-mirror /usr/local/bin/local-artifact-mirror
6 changes: 5 additions & 1 deletion local-artifact-mirror/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ build-local-artifact-mirror-image-chainguard:

.PHONY: build-local-artifact-mirror-image-dockerfile
build-local-artifact-mirror-image-dockerfile:
docker build --platform="$(OS)/$(ARCH)" -t "$(IMAGE_NAME):$(call image-tag,$(PACKAGE_VERSION))" -f ../dev/dockerfiles/local-artifact-mirror/Dockerfile.ttlsh ../
docker buildx build --load --platform="$(OS)/$(ARCH)" \
-t "$(IMAGE_NAME):$(call image-tag,$(PACKAGE_VERSION))" \
--cache-from "type=local,src=../dev/.dockerbuildcache,mode=max" \
--cache-to "type=local,dest=../dev/.dockerbuildcache,mode=max" \
-f ../dev/dockerfiles/local-artifact-mirror/Dockerfile.ttlsh ../
mkdir -p build
echo "$(IMAGE_NAME):$(call image-tag,$(PACKAGE_VERSION))" > build/image

Expand Down
4 changes: 3 additions & 1 deletion operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,12 @@ build-operator-image-chainguard:

.PHONY: build-operator-image-dockerfile
build-operator-image-dockerfile:
docker build --platform="$(OS)/$(ARCH)" \
docker buildx build --load --platform="$(OS)/$(ARCH)" \
-t "$(IMAGE_NAME):$(call image-tag,$(PACKAGE_VERSION))" \
--build-arg VERSION=$(VERSION) \
--build-arg K0S_VERSION=$(K0S_VERSION) \
--cache-from "type=local,src=../dev/.dockerbuildcache,mode=max" \
--cache-to "type=local,dest=../dev/.dockerbuildcache,mode=max" \
-f ../dev/dockerfiles/operator/Dockerfile.ttlsh ../
mkdir -p build
echo "Version $(VERSION) k0s $(K0S_VERSION)"
Expand Down
Loading