Skip to content

Commit

Permalink
buildah-*: re-generate
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Cmiel <[email protected]>
  • Loading branch information
chmeliik committed Sep 12, 2024
1 parent 930c3d5 commit 13b1188
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 12 deletions.
13 changes: 9 additions & 4 deletions task/buildah-oci-ta/0.2/buildah-oci-ta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,16 @@ spec:
# Setting new namespace to run buildah - 2^32-2
echo 'root:1:4294967294' | tee -a /etc/subuid >>/etc/subgid
build_args=("$@")
mapfile -t BUILD_ARGS < <(printf -- "--build-arg=%s\n" "${build_args[@]}")
BASE_IMAGES=$(
dockerfile-json "${BUILD_ARGS[@]}" "$dockerfile_path" |
jq -r '.Stages[] | select(.From | .Stage or .Scratch | not) | .BaseName'
)
BUILDAH_ARGS=()
BASE_IMAGES=$(dockerfile-json "$dockerfile_path" | jq -r '.Stages[] | select(.From | .Stage or .Scratch | not) | .BaseName')
if [ "${HERMETIC}" == "true" ]; then
BUILDAH_ARGS+=("--pull=never")
UNSHARE_ARGS="--net"
Expand All @@ -306,9 +313,7 @@ spec:
BUILDAH_ARGS+=("--build-arg-file=$(pwd)/$SOURCE_CODE_DIR/${BUILD_ARGS_FILE}")
fi
for build_arg in "$@"; do
BUILDAH_ARGS+=("--build-arg=$build_arg")
done
BUILDAH_ARGS+=("${BUILD_ARGS[@]}")
if [ -n "${ADD_CAPABILITIES}" ]; then
BUILDAH_ARGS+=("--cap-add=${ADD_CAPABILITIES}")
Expand Down
13 changes: 9 additions & 4 deletions task/buildah-remote-oci-ta/0.2/buildah-remote-oci-ta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,16 @@ spec:
# Setting new namespace to run buildah - 2^32-2
echo 'root:1:4294967294' | tee -a /etc/subuid >>/etc/subgid
build_args=("$@")
mapfile -t BUILD_ARGS < <(printf -- "--build-arg=%s\n" "${build_args[@]}")
BASE_IMAGES=$(
dockerfile-json "${BUILD_ARGS[@]}" "$dockerfile_path" |
jq -r '.Stages[] | select(.From | .Stage or .Scratch | not) | .BaseName'
)
BUILDAH_ARGS=()
BASE_IMAGES=$(dockerfile-json "$dockerfile_path" | jq -r '.Stages[] | select(.From | .Stage or .Scratch | not) | .BaseName')
if [ "${HERMETIC}" == "true" ]; then
BUILDAH_ARGS+=("--pull=never")
UNSHARE_ARGS="--net"
Expand All @@ -341,9 +348,7 @@ spec:
BUILDAH_ARGS+=("--build-arg-file=$(pwd)/$SOURCE_CODE_DIR/${BUILD_ARGS_FILE}")
fi
for build_arg in "$@"; do
BUILDAH_ARGS+=("--build-arg=$build_arg")
done
BUILDAH_ARGS+=("${BUILD_ARGS[@]}")
if [ -n "${ADD_CAPABILITIES}" ]; then
BUILDAH_ARGS+=("--cap-add=${ADD_CAPABILITIES}")
Expand Down
13 changes: 9 additions & 4 deletions task/buildah-remote/0.2/buildah-remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,16 @@ spec:
# Setting new namespace to run buildah - 2^32-2
echo 'root:1:4294967294' | tee -a /etc/subuid >> /etc/subgid
build_args=("$@")
mapfile -t BUILD_ARGS < <(printf -- "--build-arg=%s\n" "${build_args[@]}")
BASE_IMAGES=$(
dockerfile-json "${BUILD_ARGS[@]}" "$dockerfile_path" |
jq -r '.Stages[] | select(.From | .Stage or .Scratch | not) | .BaseName'
)
BUILDAH_ARGS=()
BASE_IMAGES=$(dockerfile-json "$dockerfile_path" | jq -r '.Stages[] | select(.From | .Stage or .Scratch | not) | .BaseName')
if [ "${HERMETIC}" == "true" ]; then
BUILDAH_ARGS+=("--pull=never")
UNSHARE_ARGS="--net"
Expand All @@ -323,9 +330,7 @@ spec:
BUILDAH_ARGS+=("--build-arg-file=$(pwd)/$SOURCE_CODE_DIR/${BUILD_ARGS_FILE}")
fi
for build_arg in "$@"; do
BUILDAH_ARGS+=("--build-arg=$build_arg")
done
BUILDAH_ARGS+=("${BUILD_ARGS[@]}")
if [ -n "${ADD_CAPABILITIES}" ]; then
BUILDAH_ARGS+=("--cap-add=${ADD_CAPABILITIES}")
Expand Down

0 comments on commit 13b1188

Please sign in to comment.