Skip to content

Commit

Permalink
start adding images bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
maciaszczykm committed Jan 10, 2025
1 parent 962b939 commit f5caf6b
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
publish:
strategy:
matrix:
image: [ plural-cli, plural-bundle, trust-manager-bundle ]
image: [ plural-cli, plural-bundle, plural-images-bundle ]
name: Build and push ${{ matrix.image }} image
runs-on: ubuntu-22.04
permissions:
Expand Down
2 changes: 1 addition & 1 deletion hack/cloud-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ k3s:
- --node-name=kairos
bundles:
- targets:
- run://ghcr.io/pluralsh/kairos-plural-bundle:0.1.1
- run://ghcr.io/pluralsh/kairos-plural-bundle:0.1.4
plural:
token: @TOKEN@
url: @URL@
1 change: 1 addition & 0 deletions images/plural-images-bundle/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
images
11 changes: 11 additions & 0 deletions images/plural-images-bundle/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM quay.io/skopeo/stable:latest AS builder

WORKDIR /images

ADD --chmod=700 vendor.sh ./vendor.sh

RUN ./vendor.sh

# TODO: Copy to scratch image like in https://kairos.io/docs/examples/airgap/.

RUN ls -al
4 changes: 4 additions & 0 deletions images/plural-images-bundle/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

mkdir -p /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/
cp -rfv ./k3s-airgap-images-amd64.tar.gz /usr/local/.state/var-lib-rancher.bind/k3s/agent/images/
16 changes: 16 additions & 0 deletions images/plural-images-bundle/vendor.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

set -e

IMAGES=(
pluralsh/kairos-plural-bundle:0.1.4
pluralsh/deployment-operator:0.5.6
pluralsh/agentk:0.0.2
)

for IMAGE in "${IMAGES[@]}"; do
ARCHIVE=${IMAGE//\//-}
echo "Copying $IMAGE to $ARCHIVE "
skopeo copy docker://"$IMAGE" docker-archive:"$ARCHIVE".tar:"$IMAGE"
done

0 comments on commit f5caf6b

Please sign in to comment.