kata-deploy: Add a basic script to build & upload a CCv0 image

This is a dirty hack, that we should expand later so we can pass one or
n number of repos where we'll upload our images, and use it as part of
the release scripts.

For now, however, let's just do this quick & dirty hack so we can
present the CCv0 demo using the operator, even knowing that the
kubernetes part of the work is not done yet and that the demo itself
will be done connecting to a node and doing all the shenanigans
manually.

Fixes: #2854

Signed-off-by: Fabiano Fidêncio <fabiano@fidencio.org>
This commit is contained in:
Fabiano Fidêncio
2021-10-15 21:20:44 +02:00
committed by stevenhorsman
parent f2bdd846fd
commit 7854cf007a
2 changed files with 27 additions and 0 deletions

View File

@@ -59,3 +59,6 @@ merge-builds:
install-tarball:
tar -xvf ./kata-static.tar.xz -C /
image: kata-tarball
$(MK_DIR)kata-deploy-build-and-upload-image.sh $(CURDIR)/kata-static.tar.xz

View File

@@ -0,0 +1,24 @@
#!/usr/bin/env bash
#
# Copyright 2021 Fabiano Fidêncio
#
# SPDX-License-Identifier: Apache-2.0
#
KATA_DEPLOY_DIR="`dirname $0`/../"
KATA_DEPLOY_ARTIFACT="$1"
echo "Copying $KATA_DEPLOY_ARTIFACT to $KATA_DEPLOY_DIR"
cp $KATA_DEPLOY_ARTIFACT $KATA_DEPLOY_DIR
pushd $KATA_DEPLOY_DIR
IMAGE_TAG="quay.io/kata-containers/kata-deploy-cc:v0"
echo "Building the image"
docker build --tag $IMAGE_TAG .
echo "Pushing the image to quay.io"
docker push $IMAGE_TAG
popd