Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/multiarch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
env:
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
run: |
buildah login -u "poseidon+github" -p "$QUAY_TOKEN" quay.io
podman login -u "poseidon+github" -p "$QUAY_TOKEN" quay.io

- name: Push Image
if: github.ref == 'refs/heads/main'
Expand All @@ -51,7 +51,7 @@ jobs:
env:
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
run: |
buildah login -u "poseidon+github" -p "$QUAY_TOKEN" quay.io
podman login -u "poseidon+github" -p "$QUAY_TOKEN" quay.io

- name: Push Image
if: github.ref == 'refs/heads/main'
Expand All @@ -77,7 +77,7 @@ jobs:
env:
QUAY_TOKEN: ${{ secrets.QUAY_TOKEN }}
run: |
buildah login -u "poseidon+github" -p "$QUAY_TOKEN" quay.io
podman login -u "poseidon+github" -p "$QUAY_TOKEN" quay.io

- name: Push Multi-Arch
run: make manifest
23 changes: 12 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ REPO=github.com/poseidon/fleetlock
LOCAL_REPO=poseidon/fleetlock
IMAGE_REPO=quay.io/poseidon/fleetlock

PLATFORM_amd64=linux/amd64
PLATFORM_arm64=linux/arm64/v8

LD_FLAGS="-w -X main.version=$(VERSION)"

.PHONY: all
Expand Down Expand Up @@ -38,26 +41,24 @@ image: \
image-arm64

image-%:
buildah bud -f Dockerfile \
podman build -f Dockerfile \
-t $(LOCAL_REPO):$(VERSION)-$* \
--arch $* --override-arch $* \
--format=docker .
--platform $(PLATFORM_$*) .

push-%:
buildah tag $(LOCAL_REPO):$(VERSION)-$* $(IMAGE_REPO):$(VERSION)-$*
buildah push --format v2s2 $(IMAGE_REPO):$(VERSION)-$*
podman tag $(LOCAL_REPO):$(VERSION)-$* $(IMAGE_REPO):$(VERSION)-$*
podman push $(IMAGE_REPO):$(VERSION)-$*

manifest:
buildah manifest create $(IMAGE_REPO):$(VERSION)
buildah manifest add $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)-amd64
buildah manifest add --variant v8 $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)-arm64
buildah manifest inspect $(IMAGE_REPO):$(VERSION)
buildah manifest push -f v2s2 $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)
podman manifest create $(IMAGE_REPO):$(VERSION)
podman manifest add $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)-amd64
podman manifest add $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)-arm64
podman manifest inspect $(IMAGE_REPO):$(VERSION)
podman manifest push $(IMAGE_REPO):$(VERSION) docker://$(IMAGE_REPO):$(VERSION)

lock:
curl -H "fleet-lock-protocol: true" -d @examples/body.json http://127.0.0.1:8080/v1/pre-reboot

unlock:
curl -H "fleet-lock-protocol: true" -d @examples/body.json http://127.0.0.1:8080/v1/steady-state


Loading