Skip to content

Commit

Permalink
Shrink the buildah task some more
Browse files Browse the repository at this point in the history
  • Loading branch information
ralphbean committed Dec 20, 2024
1 parent 5b22197 commit ba97465
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 20 deletions.
8 changes: 3 additions & 5 deletions task/buildah-oci-ta/0.2/buildah-oci-ta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,7 @@ spec:
elif [ -e "$SOURCE_CODE_DIR/$DOCKERFILE" ]; then
dockerfile_path="$(pwd)/$SOURCE_CODE_DIR/$DOCKERFILE"
elif [ -e "$DOCKERFILE" ]; then
# Custom Dockerfile location is mainly used for instrumented builds for SAST scanning and analyzing.
# Instrumented builds use this step as their base and also need to provide modified Dockerfile.
# Instrumented builds (SAST) use this custom dockerffile step as their base
dockerfile_path="$DOCKERFILE"
elif echo "$DOCKERFILE" | grep -q "^https\?://"; then
echo "Fetch Dockerfile from $DOCKERFILE"
Expand Down Expand Up @@ -330,7 +329,7 @@ spec:
shift
# Note: this may result in multiple --build-arg=KEY=value flags with the same KEY being
# passed to buildah. In that case, the *last* occurrence takes precedence. This is why
# we append BUILD_ARGS after the content of the BUILD_ARGS_FILE - they take precedence.
# we append BUILD_ARGS after the content of the BUILD_ARGS_FILE
while [[ $# -gt 0 && $1 != --* ]]; do
build_args+=("$1")
shift
Expand Down Expand Up @@ -480,8 +479,7 @@ spec:
if [ -n "${ADDITIONAL_VOLUME_MOUNTS-}" ]; then
# ADDITIONAL_VOLUME_MOUNTS allows to specify more volumes for the build.
# This is primarily used in instrumented builds for SAST scanning and analyzing.
# Instrumented builds use this step as their base and add some other tools.
# Instrumented builds (SAST) use this step as their base and add some other tools.
while read -r volume_mount; do
VOLUME_MOUNTS+=("--volume=$volume_mount")
done <<<"$ADDITIONAL_VOLUME_MOUNTS"
Expand Down
8 changes: 3 additions & 5 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 @@ -306,8 +306,7 @@ spec:
elif [ -e "$SOURCE_CODE_DIR/$DOCKERFILE" ]; then
dockerfile_path="$(pwd)/$SOURCE_CODE_DIR/$DOCKERFILE"
elif [ -e "$DOCKERFILE" ]; then
# Custom Dockerfile location is mainly used for instrumented builds for SAST scanning and analyzing.
# Instrumented builds use this step as their base and also need to provide modified Dockerfile.
# Instrumented builds (SAST) use this custom dockerffile step as their base
dockerfile_path="$DOCKERFILE"
elif echo "$DOCKERFILE" | grep -q "^https\?://"; then
echo "Fetch Dockerfile from $DOCKERFILE"
Expand Down Expand Up @@ -363,7 +362,7 @@ spec:
shift
# Note: this may result in multiple --build-arg=KEY=value flags with the same KEY being
# passed to buildah. In that case, the *last* occurrence takes precedence. This is why
# we append BUILD_ARGS after the content of the BUILD_ARGS_FILE - they take precedence.
# we append BUILD_ARGS after the content of the BUILD_ARGS_FILE
while [[ $# -gt 0 && $1 != --* ]]; do
build_args+=("$1")
shift
Expand Down Expand Up @@ -513,8 +512,7 @@ spec:
if [ -n "${ADDITIONAL_VOLUME_MOUNTS-}" ]; then
# ADDITIONAL_VOLUME_MOUNTS allows to specify more volumes for the build.
# This is primarily used in instrumented builds for SAST scanning and analyzing.
# Instrumented builds use this step as their base and add some other tools.
# Instrumented builds (SAST) use this step as their base and add some other tools.
while read -r volume_mount; do
VOLUME_MOUNTS+=("--volume=$volume_mount")
done <<<"$ADDITIONAL_VOLUME_MOUNTS"
Expand Down
8 changes: 3 additions & 5 deletions task/buildah-remote/0.2/buildah-remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,7 @@ spec:
elif [ -e "$SOURCE_CODE_DIR/$DOCKERFILE" ]; then
dockerfile_path="$(pwd)/$SOURCE_CODE_DIR/$DOCKERFILE"
elif [ -e "$DOCKERFILE" ]; then
# Custom Dockerfile location is mainly used for instrumented builds for SAST scanning and analyzing.
# Instrumented builds use this step as their base and also need to provide modified Dockerfile.
# Instrumented builds (SAST) use this custom dockerffile step as their base
dockerfile_path="$DOCKERFILE"
elif echo "$DOCKERFILE" | grep -q "^https\?://"; then
echo "Fetch Dockerfile from $DOCKERFILE"
Expand Down Expand Up @@ -345,7 +344,7 @@ spec:
shift
# Note: this may result in multiple --build-arg=KEY=value flags with the same KEY being
# passed to buildah. In that case, the *last* occurrence takes precedence. This is why
# we append BUILD_ARGS after the content of the BUILD_ARGS_FILE - they take precedence.
# we append BUILD_ARGS after the content of the BUILD_ARGS_FILE
while [[ $# -gt 0 && $1 != --* ]]; do build_args+=("$1"); shift; done
;;
--labels)
Expand Down Expand Up @@ -489,8 +488,7 @@ spec:
if [ -n "${ADDITIONAL_VOLUME_MOUNTS-}" ]; then
# ADDITIONAL_VOLUME_MOUNTS allows to specify more volumes for the build.
# This is primarily used in instrumented builds for SAST scanning and analyzing.
# Instrumented builds use this step as their base and add some other tools.
# Instrumented builds (SAST) use this step as their base and add some other tools.
while read -r volume_mount; do
VOLUME_MOUNTS+=("--volume=$volume_mount")
done <<< "$ADDITIONAL_VOLUME_MOUNTS"
Expand Down
8 changes: 3 additions & 5 deletions task/buildah/0.2/buildah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ spec:
elif [ -e "$SOURCE_CODE_DIR/$DOCKERFILE" ]; then
dockerfile_path="$(pwd)/$SOURCE_CODE_DIR/$DOCKERFILE"
elif [ -e "$DOCKERFILE" ]; then
# Custom Dockerfile location is mainly used for instrumented builds for SAST scanning and analyzing.
# Instrumented builds use this step as their base and also need to provide modified Dockerfile.
# Instrumented builds (SAST) use this custom dockerffile step as their base
dockerfile_path="$DOCKERFILE"
elif echo "$DOCKERFILE" | grep -q "^https\?://"; then
echo "Fetch Dockerfile from $DOCKERFILE"
Expand Down Expand Up @@ -267,7 +266,7 @@ spec:
shift
# Note: this may result in multiple --build-arg=KEY=value flags with the same KEY being
# passed to buildah. In that case, the *last* occurrence takes precedence. This is why
# we append BUILD_ARGS after the content of the BUILD_ARGS_FILE - they take precedence.
# we append BUILD_ARGS after the content of the BUILD_ARGS_FILE
while [[ $# -gt 0 && $1 != --* ]]; do build_args+=("$1"); shift; done
;;
--labels)
Expand Down Expand Up @@ -411,8 +410,7 @@ spec:
if [ -n "${ADDITIONAL_VOLUME_MOUNTS-}" ]; then
# ADDITIONAL_VOLUME_MOUNTS allows to specify more volumes for the build.
# This is primarily used in instrumented builds for SAST scanning and analyzing.
# Instrumented builds use this step as their base and add some other tools.
# Instrumented builds (SAST) use this step as their base and add some other tools.
while read -r volume_mount; do
VOLUME_MOUNTS+=("--volume=$volume_mount")
done <<< "$ADDITIONAL_VOLUME_MOUNTS"
Expand Down

0 comments on commit ba97465

Please sign in to comment.