support --tag in build.yml for packages

Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
Avi Deitcher
2024-12-23 15:24:39 +02:00
parent ad95c6fc2e
commit 4f765b5da0
14 changed files with 82 additions and 5 deletions

View File

@@ -0,0 +1 @@
FROM alpine:3.20

View File

@@ -0,0 +1,3 @@
org: linuxkit
image: image-with-tag
tag: file

View File

@@ -0,0 +1,16 @@
#!/bin/sh
# SUMMARY: Check that tar output format build is reproducible
# LABELS:
set -e
# Source libraries. Uncomment if needed/defined
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
linuxkit pkg build --force .
# just run docker image inspect; if it does not exist, it will error out
linuxkit cache ls 2>&1 | grep 'linuxkit/image-with-tag:file'
exit 0

View File

@@ -0,0 +1 @@
FROM alpine:3.20

View File

@@ -0,0 +1,2 @@
org: linuxkit
image: image-with-tag

View File

@@ -0,0 +1,16 @@
#!/bin/sh
# SUMMARY: Check that tar output format build is reproducible
# LABELS:
set -e
# Source libraries. Uncomment if needed/defined
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
linuxkit pkg build --force --tag cli .
# just run docker image inspect; if it does not exist, it will error out
linuxkit cache ls 2>&1 | grep 'linuxkit/image-with-tag:cli'
exit 0

View File

@@ -0,0 +1 @@
FROM alpine:3.20

View File

@@ -0,0 +1,3 @@
org: linuxkit
image: image-with-tag
tag: file-new

View File

@@ -0,0 +1,22 @@
#!/bin/sh
# SUMMARY: Check that tar output format build is reproducible
# LABELS:
set -e
# Source libraries. Uncomment if needed/defined
#. "${RT_LIB}"
. "${RT_PROJECT_ROOT}/_lib/lib.sh"
linuxkit pkg build --force --tag cli .
# just run docker image inspect; if it does not exist, it will error out
linuxkit cache ls 2>&1 | grep 'linuxkit/image-with-tag:cli'
# specifically, the `file` tag should not exist, so check that it does not exist
if linuxkit cache ls 2>&1 | grep 'linuxkit/image-with-tag:file-new'; then
echo "ERROR: image with tag 'file-new' should not exist"
exit 1
fi
exit 0