Skip to content

Commit

Permalink
Merge branch 'main' into git-ca-bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
gbenhaim authored Mar 4, 2024
2 parents 7314153 + 6c0dade commit 8e9d7bf
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
4 changes: 3 additions & 1 deletion task/acs-deploy-check/0.1/acs-deploy-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ spec:
env:
- name: PARAM_INSECURE_SKIP_TLS_VERIFY
value: $(params.insecure-skip-tls-verify)
- name: PARAM_GITOPS_REPO_URL
value: $(params.gitops-repo-url)
script: |
#!/usr/bin/env bash
set +x
Expand Down Expand Up @@ -88,7 +90,7 @@ spec:
echo "Using rox central endpoint ${ROX_CENTRAL_ENDPOINT}"
# Clone gitops repository
git clone $(params.gitops-repo-url) --single-branch --depth 1 gitops
git clone "${PARAM_GITOPS_REPO_URL}" --single-branch --depth 1 gitops
cd gitops
echo "Configuration"
Expand Down
9 changes: 7 additions & 2 deletions task/buildah-remote/0.1/buildah-remote.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,11 @@ spec:
BUILDAH_ARGS=()
BASE_IMAGES=$(grep -i '^\s*FROM' "$dockerfile_path" | sed 's/--platform=\S*//' | awk '{print $2}')
if [ "${HERMETIC}" == "true" ]; then
BUILDAH_ARGS+=("--pull=never")
UNSHARE_ARGS="--net"
for image in $(grep -i '^\s*FROM' "$dockerfile_path" | sed 's/--platform=\S*//' | awk '{print $2}'); do
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
unshare -Ufp --keep-caps -r --map-users 1,1,65536 --map-groups 1,1,65536 -- buildah pull $image
fi
Expand Down Expand Up @@ -287,7 +288,11 @@ spec:
fi
# Expose base image digests
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' | grep -v $IMAGE > $(results.BASE_IMAGES_DIGESTS.path)
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' --filter reference="$image" >> $(results.BASE_IMAGES_DIGESTS.path)
fi
done
buildah push "$IMAGE" oci:rhtap-final-image
REMOTESSHEOF
Expand Down
9 changes: 7 additions & 2 deletions task/buildah/0.1/buildah.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,11 @@ spec:
BUILDAH_ARGS=()
BASE_IMAGES=$(grep -i '^\s*FROM' "$dockerfile_path" | sed 's/--platform=\S*//' | awk '{print $2}')
if [ "${HERMETIC}" == "true" ]; then
BUILDAH_ARGS+=("--pull=never")
UNSHARE_ARGS="--net"
for image in $(grep -i '^\s*FROM' "$dockerfile_path" | sed 's/--platform=\S*//' | awk '{print $2}'); do
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
unshare -Ufp --keep-caps -r --map-users 1,1,65536 --map-groups 1,1,65536 -- buildah pull $image
fi
Expand Down Expand Up @@ -238,7 +239,11 @@ spec:
fi
# Expose base image digests
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' | grep -v $IMAGE > $(results.BASE_IMAGES_DIGESTS.path)
for image in $BASE_IMAGES; do
if [ "${image}" != "scratch" ]; then
buildah images --format '{{ .Name }}:{{ .Tag }}@{{ .Digest }}' --filter reference="$image" >> $(results.BASE_IMAGES_DIGESTS.path)
fi
done
securityContext:
capabilities:
Expand Down

0 comments on commit 8e9d7bf

Please sign in to comment.