mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-04 00:18:53 +00:00
support --tag in build.yml for packages
Signed-off-by: Avi Deitcher <avi@deitcher.net>
This commit is contained in:
1
test/cases/000_build/057_pkg_tag/000_tag_yaml/Dockerfile
Normal file
1
test/cases/000_build/057_pkg_tag/000_tag_yaml/Dockerfile
Normal file
@@ -0,0 +1 @@
|
||||
FROM alpine:3.20
|
3
test/cases/000_build/057_pkg_tag/000_tag_yaml/build.yml
Normal file
3
test/cases/000_build/057_pkg_tag/000_tag_yaml/build.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
org: linuxkit
|
||||
image: image-with-tag
|
||||
tag: file
|
16
test/cases/000_build/057_pkg_tag/000_tag_yaml/test.sh
Normal file
16
test/cases/000_build/057_pkg_tag/000_tag_yaml/test.sh
Normal 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
|
1
test/cases/000_build/057_pkg_tag/001_tag_cli/Dockerfile
Normal file
1
test/cases/000_build/057_pkg_tag/001_tag_cli/Dockerfile
Normal file
@@ -0,0 +1 @@
|
||||
FROM alpine:3.20
|
2
test/cases/000_build/057_pkg_tag/001_tag_cli/build.yml
Normal file
2
test/cases/000_build/057_pkg_tag/001_tag_cli/build.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
org: linuxkit
|
||||
image: image-with-tag
|
16
test/cases/000_build/057_pkg_tag/001_tag_cli/test.sh
Normal file
16
test/cases/000_build/057_pkg_tag/001_tag_cli/test.sh
Normal 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
|
@@ -0,0 +1 @@
|
||||
FROM alpine:3.20
|
@@ -0,0 +1,3 @@
|
||||
org: linuxkit
|
||||
image: image-with-tag
|
||||
tag: file-new
|
@@ -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
|
Reference in New Issue
Block a user