mirror of
https://github.com/openshift/source-to-image.git
synced 2026-02-05 12:44:54 +01:00
Adding check to ensure the s2i assemble user is allowed if the --allowed-uids flag is set. The assemble user can come from one of two sources: 1. --assemble-user flag 2. builder image io.openshift.s2i.assemble-user label The assemble user overrides the default image user for an s2i build. However, if the base image has ONBUILD instructions with USER directives, all USER directives will be checked to ensure compliance. Bug 1582976
37 lines
1001 B
Bash
Executable File
37 lines
1001 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script builds all images locally (requires Docker)
|
|
|
|
set -o errexit
|
|
set -o nounset
|
|
set -o pipefail
|
|
|
|
readonly S2I_ROOT=$(dirname "${BASH_SOURCE}")/..
|
|
|
|
s2i::build_test_image() {
|
|
local image_name="$1"
|
|
local tag="sti_test/${image_name}"
|
|
local src="test/integration/images/${image_name}"
|
|
cp -R test/integration/scripts "${src}"
|
|
docker build -t "${tag}" "${src}"
|
|
rm -rf "${src}/scripts"
|
|
}
|
|
|
|
(
|
|
# Go to the top of the tree.
|
|
cd "${S2I_ROOT}"
|
|
|
|
s2i::build_test_image sti-fake
|
|
s2i::build_test_image sti-fake-assemble-root
|
|
s2i::build_test_image sti-fake-assemble-user
|
|
s2i::build_test_image sti-fake-env
|
|
s2i::build_test_image sti-fake-user
|
|
s2i::build_test_image sti-fake-scripts
|
|
s2i::build_test_image sti-fake-scripts-no-save-artifacts
|
|
s2i::build_test_image sti-fake-no-tar
|
|
s2i::build_test_image sti-fake-onbuild
|
|
s2i::build_test_image sti-fake-numericuser
|
|
s2i::build_test_image sti-fake-onbuild-rootuser
|
|
s2i::build_test_image sti-fake-onbuild-numericuser
|
|
)
|